Graphics

 View Only
  • 1.  AVI material source not swapping when using Dynamic Materials

    Posted 02-08-2021 22:38

    I have a video promo delivered in 2 "looks" (Gold & Silver). I have used Dynamic Materials to swap between the 2 colors using a text object tied to a Widget. 

    I created a simple scene using the silver version which I control on the timeline/Scene director. The scene uses an ON and an OFF scene director (with a blank scene director as default, so 3 total SDs) and Transition Logic to animate. However, when I bring the scene over to the sequencer, the movie file disappears in my render. 

    The following is an example of my file paths:

    D:\Project\Video\Silver\promo.avi

    The idea here is to use the Dynamic material to point to a different folder with a similarly named AVI file. For example:

    D:\Project\Video\Gold\promo.avi

    In my project, I have a text object tied to a widget called SHOW. This has only 2 options, GOLD or SILVER.

    The filepath on my Dynamic Material Line is:

    D:\Project\Video\@SHOW@\promo.avi

    I have been successful in making this swap using PNGs but for some reason the video just goes blank does not play out. Does the Dynamic Material not work for video that is controlled on a scene director? Any tips help! Thank you in advance!

     



  • 2.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 03-19-2021 12:14

    For me I tested a few different videos. 

    I was changing the file not the folder but both should work fine. 

    E:\Xpression Projects\201\Video\@Text1@.avi

    THe change does only show in preview and output FYI. 


    #XPression


  • 3.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 03-19-2021 12:17

    Out of interest I made the folder dynamic as well and this also works for videos for me. 

    E:\Xpression Projects\201\@Text2@\@Text1@.avi 


    #XPression


  • 4.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-08-2021 13:16
    The dynamic material works for folder or file, but what if the avi is also on the scene director to be controlled with pauses and events? Can those materials be dynamic? Thanks!

    #XPression​​


  • 5.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-09-2021 01:24

    Dynamic materials can still be used for video files by taking on the Video Shader properties of the original material (Play Mode, Auto Start, etc.,) but a dynamic material resolving to a file path will not be controlled by the original material's clip on a scene director. XPression will create a temporary material for the file, much like it does if you publish an object's material and select a new file in the sequencer or the MOS plugin.  


    What you could do, however, is create separate materials for each of your videos in your project, place both of those materials on the scene director alongside your pauses and events, and use the object's dynamic materials to point to those project material instead of a file path (so if your materials are named Gold Promo and Silver Promo, your dynamic material could be set to "@SHOW@ Promo".) No matter which material gets bound to the object, its clip will be on the scene director to control its playout. 



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



  • 6.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-09-2021 05:21
    Another way you can have some control over dynamic materials is through visual logic. 

    For example you can get the face values of a quad object such as pause and play. 

    You can then get the scene director position property and use greater than, less than etc to control pause and play. 

    For example if you don't want a video to play until 60 frames into a graphic regardless of the video you could do something like this. 




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



  • 7.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-11-2021 19:03
    @Jeff Thanks, that works in the case of switching between two filepaths. In my case, I'm looking at switching between 32 different video files for different team styles in each scene.

    @Red Thank you for the visual logic example. That helps me get a little further. The next question is, can I use the visual logic to make a clip play in reverse, like it can on the scene director? Using visual logic is letting the clip on the face of the quad play forward tied to a position on my scene director, but what if at another position, I need a clip to play in reverse? If it's not possible in visual logic, is there a script that can help?

    Otherwise, I'm looking at datalinq'ing the materials to an Excel with filepaths or rendering out the reverse video clips for 32 variations of a dozen different​ shells.

    Thanks again!​

    ------------------------------
    Rachel
    Freelancer
    ------------------------------



  • 8.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-13-2021 11:13
    Hey,

    Nope you'll need to use script to play it backwards. 

    You can use playrange to do that. 

    dim scene as xpScene

    dim fb as xpOutputFramebuffer

    dim scenedir as xpSceneDirector

     'this will get the first framebuffer

    engine.GetOutputFramebuffer(0, fb)
    'this will get the scene of layer 0, change the number to the layer you want

    fb.GetSceneOnLayer(0, scene)
    'this will get your scene director

    scene.GetSceneDirectorByName("YOUR DIRECTOR", scenedir)
    'this will play it from any frame to any frame, in this case 150 back to 0

    scenedir.PlayRange(150, 0)




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



  • 9.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-13-2021 14:47
    I also found by using the script below in Scene OnLine, I could get the dynamic material to respond to events on the scene director such as Reverse and Jump to and Take Offline. It might not have been the most direct way, but it's working.

    This script is from Simon on another thread.
    MyVideoQuad can be replaced with the name of the quad and VideoDir with the name of the scene director as well as putting in the desired Track for Track 1.

    dim quad as xpQuadObject
    dim mat as xpMaterial
    dim newSceneDirClip as xpSceneDirectorClip
    dim dir as xpSceneDirector
    dim trk as xpSceneDirectorTrack

    self.GetObjectByName("MyVideoQuad", quad)
    quad.GetMaterial(0, mat)
    self.GetSceneDirectorByName("VideoDir", dir)
    dir.GetTrackByName("Track1", trk)
    trk.CreateMaterialClip(0, mat, newSceneDirClip)

    dir.AutoStop = true
    dir.PlayRange(0, dir.Duration)

    Thanks for the help!

    ------------------------------
    Rachel Hinshaw
    Freelancer
    ------------------------------



  • 10.  RE: AVI material source not swapping when using Dynamic Materials

    Posted 06-14-2021 04:10
    Hey Rachel,

    Well done on finding that I actually forgot you were trying to control the quad directly not the scene director hence my script haha!

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