Graphics

 View Only
  • 1.  Changing quad based on text input

    Posted 05-09-2023 13:16

    Currently working on automating my xpression project and want to start with the standings graphic that I have. Currently I have a standings graphic that is connected to an excel sheet that i update before every game, but i have to go in and manually change the quads myself to the corresponding team and then put it back into the sequence. Im not too good with scripting and am much better at visual logic but i am still lost. Im sure others have been in similar situations on here but i haven't been able to find a thread that helps me get to where i need to be. Any help is greatly appreciated :)



    ------------------------------
    Aaron Paladino
    ------------------------------


  • 2.  RE: Changing quad based on text input

    Posted 05-09-2023 14:13

    Do you mean that you're changing the team logos on each quad corresponding to the teams?

    If so this is how I have my standings graphic set up.
    I have all the team logos as materials and named them as the team's name. Then I named the quads where the logos go as Team Logo 1, Team Logo 2, and so on.
    Then I just put the following script in each text object for each team and changed the bolded red text (put the name of the quad you want it to target) and it will apply the team logo to that quad.

    dim image as xpBaseObject
    dim mat as xpMaterial


      Scene.GetObjectByName("Team Logo 1", image)
      Engine.GetMaterialByName(text, mat)

      image.SetMaterial(0, mat)



    ------------------------------
    Omar Reyes
    ------------------------------



  • 3.  RE: Changing quad based on text input

    Posted 05-09-2023 15:05

    Perhaps I'm missing something here, but this shouldn't require extra work.

    Set the quad up to the max height and size using width and height properties. Set "Auto Size" to disabled. Check "Maintain Aspect Ratio of Texture". Make "Mode" : "Best Fit".

    In the "Texture Coords" set "Mode" to "Clamp".

    Make sure all logos have a 1 or 2 pixel transparent border.

    The linked images from excel sheet will stay in bounds, won't distort, and the transparent pixels stop you from getting any weird bleeding.



    ------------------------------
    Azathoth
    Son of Cthulhu
    ------------------------------



  • 4.  RE: Changing quad based on text input

    Posted 05-09-2023 21:35

    I'm not at my xpression right now but.....publish the material of the quad and point it to your spreadsheet. Have a column that has a file path to the specific logo and it will load the logo to the quad. However you have to update file path each time you change the order of the standings. You might be able to concatenate the file path right up to the logo name, then add the team-code (or however you do it). That way you could just type a 3 letter code for the team and the excel sheet would use that 3 letter code as part of the file path. It's kind of wordy, but this might work. 



    ------------------------------
    Malcolm Thorpe
    Free Lance Xpression Designer/Carbonite TD
    ------------------------------



  • 5.  RE: Changing quad based on text input

    Posted 05-17-2023 10:37

    thanks everyone, this worked great!!!



    ------------------------------
    Aaron Paladino
    ------------------------------



  • 6.  RE: Changing quad based on text input

    Posted 05-10-2023 08:05

    Can you not just use the above advice re: sizing etc but just use dynamic materials for the logos. The you just have the logo use a tricode in the path i.e D"\project\images\logos\@tricode@_pri_logo.png
    then you just have MIN_pri_logo.png, VAN_pri_logo.png etc in the folder and then you sent the tricode only via excel or type in in sequencer, your preference but every item using the above dynamic path for material will be changed at once.



    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------