can i set time in shader graph

can i set time in shader graph

Anonymous
Not applicable
884 Views
3 Replies
Message 1 of 4

can i set time in shader graph

Anonymous
Not applicable

in shader graph can I set time to it ? Like I want node flipbook can set time when will it on/active or after touch trigger node flipbook then ... active

Reply
Reply
0 Likes
885 Views
3 Replies
Replies (3)
Message 2 of 4

Shanii2
Collaborator
Collaborator

There is a time node that gets engines runtime delta.. bet if you want to programatically control it you can use the IF switch node (The one which is used to toggle the use of color map or rgb color). You can set up some material varible which can be triggered by flow logics and start the time or stop.

Reply
Reply
0 Likes
Message 3 of 4

Anonymous
Not applicable

If I make node like this

sss.JPG

 

how to use time node like you said. I have no idea , could you give me some example please.

Reply
Reply
0 Likes
Message 4 of 4

Shanii2
Collaborator
Collaborator

so you mean you want to control when the flipbook animation plays. Well to do that you need to add IF switch node before plugiing in time of flipbook. A fimiliar switch node is one which swaps the material option that you see on regular shaders (that say 'use color map' and the node that contains A, B True and false an an output) This output could be anything a scaler, a color value or whatever depending on the condition. Now you can plug the 'Time' node in True' of If switch node, and just a regular variable from 0-100 in 'False' input. And enter value of '1' in  'B' input and A material Variable (Checkbox) named 'start' and plug it in 'A' input of switch node . Now when ever you check the Checkbox material varible the flipbook plays, animation and when unchecked it'll stop and you can use the Static variable ranging from (0-100) to drive the animation manually. Hence You can control Both Material Variables In Flow graph logic pretty easily, whatever situation you want to pursue.

Reply
Reply
0 Likes