Graphics

 View Only
  • 1.  Scripting VolatileTextureFile playout

    Posted 11-25-2021 20:08
    Hi there,

    I am in the midst of learning and testing using scripts to bring video content into a project without having it within the Material Manager.
    However, the videos loop, and I am looking for them to be "forced" to play once.
    Looking at the SDK file I cannot see how formulate this request in script.

    Presently I have the following:

    dim logoone as xpbaseobject
    dim teamone as xpTextObject
    dim teamcolourone as xpbaseobject

    self.getObjectByName("Logo 1", logoone)
    self.getObjectByName("team 1", teamone)
    self.getObjectByName ("team colour 1", teamcolourone)

    logoone.SetVolatileTextureFile(0, "D:\GraphiteProjects\Twenty20 Big Bash\Video\" & teamone.text & ".avi")
    teamcolourone.SetVolatileTextureFile(0, "D:\GraphiteProjects\Twenty20 Big Bash\Images\Team Colours\" & teamone.text & " COLOUR.png")

    Would I be trying to control the "volatile texture" and it's attributes or it's container?

    Thanks for your time
    T

    ------------------------------
    Tai Newman
    Xpression operator/designer
    Melbourne Australia
    ------------------------------


  • 2.  RE: Scripting VolatileTextureFile playout

    Ross Staff
    Posted 11-26-2021 16:16
    Volatile textures take on the properties of the material they are replacing. Configure a "dummy" video material on the object with the properties you want the volatile texture to have. 

    Otherwise use the xpMaterial calls (Play/Pause/PlayRange/SetPlayMode/etc...) to control the behavior of the material.


  • 3.  RE: Scripting VolatileTextureFile playout

    Ross Staff
    Posted 11-26-2021 16:19
    An example of an xpMaterial call that plays a volatile texture. 

    Play video that has been assigned via set volatile texture script (requires you to have a video material with no video assigned to it and the play mode set to play once)

     

    dim Wipe as xpBaseObject

    dim WipeMat as xpMaterial

     

    scene.GetObjectByName("WIPE", Wipe)

    Wipe.GetMaterial(0,WipeMat)

     

    WipeMat.Playrange(0,WipeMat.Duration)




  • 4.  RE: Scripting VolatileTextureFile playout

    Posted 11-28-2021 18:51
    Thanks Garner!

    I have tested both options and they both work, the dumby material is the easiest to implement however so I might stick with that.

    Cheers
    T

    ------------------------------
    Tai Newman
    Xpression operator/designer
    Melbourne Australia
    ------------------------------