Graphics

 View Only
  • 1.  Scripting: Set Material method issue

    Posted 06-03-2021 12:39
      |   view attached

    I created a scene that uses scripting to take a comma-separated list of us states and then fills in the outlines of those states with a solid color. The state outlines are in a 3d model and I used the "Set Material" method to assign from a list of materials that are in the project.
    This works fine in the Xpression Designer, but not in Xpression Studio​ (or the Xpression MOS Plugin inside ENPS). On either of those platforms, the outlines just disappear (as if their opacity has been set to 0%).
    Example: Xpression Designer:

    US MAP showing Texas and Florida highlighted in red, while California and New York are highlighted in Blueand in Xpression Studio:
    US Map with Texas, Florida, California and New York missing

    I use the materials on quads that show up in a key in the title bar, and they do show up correctly when I run them through Xpression Studio, so I know they've been uploaded to the Project Server.

    Is there a step that I'm missing somewhere? 
    I'll add the project to this message


     


    ------------------------------
    Bill Schocke
    Art Director
    WHO 13
    Des Moines, IA

    ------------------------------

    Attachment(s)

    xpp
    Maps.xpp   22.20 MB 1 version


  • 2.  RE: Scripting: Set Material method issue

    Posted 06-03-2021 12:48
    Hey Bill,

    What version are you using of Studio as I just tested on mine and your map works correctly. 


    ------------------------------
    Simon Redmile
    Ross Video
    ------------------------------



  • 3.  RE: Scripting: Set Material method issue

    Posted 06-03-2021 13:10
    Xpresion Studio v9.0 build 4862
    Xpression Designer v9.0 build 4862

    We call up our cg with OverDrive-- would that make a difference?


    ------------------------------
    Bill Schocke
    ------------------------------



  • 4.  RE: Scripting: Set Material method issue

    Posted 06-03-2021 13:12
    Hey Bill,

    I have just tested on that version and it appears to work fine for me. 

    Is it possible for you to test the scene when opened directly in your studio cutting out MOS / OVD etc?

    ------------------------------
    Simon Redmile
    Ross Video
    ------------------------------



  • 5.  RE: Scripting: Set Material method issue

    Posted 06-03-2021 14:46
    We don't have a way to pull it up directly-- we only use OverDrive. Is it possible that everything in the chain just needs a re-boot?

    ------------------------------
    Bill Schocke
    ------------------------------



  • 6.  RE: Scripting: Set Material method issue
    Best Answer

    Posted 06-03-2021 15:02
    Bill,

    In your script, you're calling on the materials using the Engine.GetMaterialByName method:

    Engine.GetMaterialByName("mapRed",redMat)
    Engine.GetMaterialByName("mapBlue",blueMat)
    Engine.GetMaterialByName("mapGreen",greenMat)
    Engine.GetMaterialByName("mapYellow",yellMat)
    Engine.GetMaterialByName("mapOrange",orangeMat)
    Engine.GetMaterialByName("mapPurple",purpleMat)

    But when a scene is played out through the MOS workflow, either on the BlueBox OFL for Plugin previews, or on the Studio Engine for output, the project never becomes active in the engine, so the Materials aren't available that way. Try changing your OnOnline and OnPreviewRender scripts to get the materials using the Self.Project.GetMaterialByName method. This should allow the script to retrieve those materials from the Project for preview and playout.

    ------------------------------
    Jeff Mayer
    Ross Video
    ------------------------------



  • 7.  RE: Scripting: Set Material method issue

    Posted 06-03-2021 18:41
    Thanks! This works in the MOS plugin. I'll have to wait until after the evening shows to try it out on our Xpression studio output, but I'm pretty confident that it will work there as well.

    Thanks again!

    ------------------------------
    Bill Schocke
    ------------------------------