Graphics

Expand all | Collapse all

Material Layer selected based on Datalinq?

  • 1.  Material Layer selected based on Datalinq?

    Posted 07-23-2020 15:32

    Awhile ago I setup a Cube Object to change its face color based on a datalinq value. The problem is I can not find, or figure out how I did it.

    Inside my material I have several layers all with Gradient textures. When I change my datalinq value, it hides or turns on the correct . There is no script in the scene, there is no script in the scene director,  there is no visual logic and there is no datalinq attached to the object. Can anyone help me remember how I did this?



  • 2.  RE: Material Layer selected based on Datalinq?

    Posted 08-07-2020 18:12

    Hey Jeff, the only thing I can think of is by assigning columns in the data input tab. But you also say you do it via datalinq but without a datalinq attached?


    #XPression


  • 3.  RE: Material Layer selected based on Datalinq?

    Posted 20 days ago

    Jeff,

    Did you figured this out? It sounds like just the solution to a challenge I'm facing.  Dynamically turning layers on and off would be helpful.



    ------------------------------
    Daryl Judd
    Sbgtv
    ------------------------------



  • 4.  RE: Material Layer selected based on Datalinq?

    Ross Staff
    Posted 19 days ago
    Not sure how you were doing it without script or vl, it would need to use the API is my guess. If you want an easy way to do it here's how to solve it using VL. All you'd have to do is change where I have used a text block to a datalinq block. 

    If the data isn't numbers you can either use VL to convert or assign columns in user input control lists to convert. Let me know if you need help with this. 





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



  • 5.  RE: Material Layer selected based on Datalinq?

    Posted 17 days ago
    Thank you for the idea Simon. Here is the challenge. We are creating a state map that gives the user a choice of five colors for each county. Using materials It works, but there are 39 counties so there are 195 materials for just the counties. We're looking for different ways to accomplish this without all the materials. We tried via script to change the change the .r .g and .b values, but the problem is when you have a map online and have a 2nd map that you select in preview that has a different color for a county, it changes the on-air value. 

    If you have a better idea, please pass it along. I've been playing with VL, scripting and various material options like multiple layers/shaders, but have not come up with a solution so far.

    ------------------------------
    Daryl Judd
    Sbgtv
    ------------------------------



  • 6.  RE: Material Layer selected based on Datalinq?

    Ross Staff
    Posted 17 days ago
    Under datalinq connection uncheck this. 


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



  • 7.  RE: Material Layer selected based on Datalinq?

    Posted 15 days ago
    • The Live Update checkbox solution does not work because while it stops the on air from being changed, it does not allow us to go back to back. Also it involve and extra step for the end user
    • Your VL solution works, but we were concerned about the performance of multiple VL trees. For a U.S. map there would be 50 of them.
    • The solution we came up with is using a SetVolatileTextureFile. We set the state map (png) file to the quad. Next we use getmaterial to grab the material and then change the colorDiffuse according to the selected color (static list radio buttons).


    ------------------------------
    Daryl Judd
    Sbgtv
    ------------------------------



  • 8.  RE: Material Layer selected based on Datalinq?

    Ross Staff
    Posted 13 days ago
    Yes with that many items to change perhaps a script would be best. 

    Did you use an array and select group to get all the 50 objects in the script or did you put a script on each text object? 


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



  • 9.  RE: Material Layer selected based on Datalinq?

    Posted 13 days ago
    Yes, we are using an array.

    ------------------------------
    Daryl Judd
    Sbgtv
    ------------------------------



  • 10.  RE: Material Layer selected based on Datalinq?

    Posted 13 days ago
    How about having the 5 colors all in one material, and then using a 1-5 value to change what the material offset is? I haven't tested this out, though.

    ------------------------------
    Zachary Fradette
    ------------------------------



  • 11.  RE: Material Layer selected based on Datalinq?

    Ross Staff
    Posted 12 days ago
    That's basically what I suggested if you see my comment using the output block to change the layers in a single material. It works but they have 50 objects that need that which could cause a slowdown using VL depending on Hardware. In this case script using an array and volatile texture is much more efficient which is sounds like that's the route they took.  That said they could have equally used the array to change the layer in script as well in a single material which I believe is what you're suggesting which is a combination of the two techniques and also a good idea. All 3 methods would work which is the find side of making real-time graphics, many methods to get to the same result but figuring out which is the most efficient can be fun, if you're that way inclined :) 

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