Template:TimeProxy: Difference between revisions
Jump to navigation
Jump to search
Note: you don't need to declare "CurrentTime" Proxie in cases where you don't need to relative modify time scale.
Deprecated (talk | contribs) (Created Time Proxy template) |
mNo edit summary |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
=== Time Proxy === | |||
For any reason, you may want to modulate time by scale it. The below [[Material proxies|material proxy]] is a simple sample to work properly. | |||
{{note| you don't need to declare "CurrentTime" Proxie in cases where you don't need to relative modify time scale.}} | |||
<source lang=php> | <source lang=php> | ||
"$time" "0.0" | "$time" "0.0" | ||
"$CurrentTime" "0.0" // declare a custom VMT Parameter to "CurrentTime" Proxie output | |||
"$timeMult" "0.5" // declare a custom VMT Parameter to use at "Multiply" Proxie | |||
"Proxies" | "Proxies" | ||
{ | { | ||
"CurrentTime" | "CurrentTime" | ||
{ | { | ||
"resultVar" "$time" // | // It pass CurrentTime Proxie to "$CurrentTime" variable to scale materials effects such $emissiveblendscrollvector. | ||
"resultVar" "$CurrentTime" | |||
} | |||
"Multiply" | |||
{ | |||
"srcVar1" "$CurrentTime" // get $CurrentTime VMT parameter to multiply with srcVar2 | |||
"srcVar2" "$timeMult" // get $timeMult VMT parameter to multiply with srcVar1 | |||
"resultVar" "$time" // writes multiplication product into $time, scaling "CurrentTime" | |||
} | } | ||
} | } | ||
</source> | </source> |
Latest revision as of 19:26, 28 March 2023
Time Proxy
For any reason, you may want to modulate time by scale it. The below material proxy is a simple sample to work properly.

"$time" "0.0"
"$CurrentTime" "0.0" // declare a custom VMT Parameter to "CurrentTime" Proxie output
"$timeMult" "0.5" // declare a custom VMT Parameter to use at "Multiply" Proxie
"Proxies"
{
"CurrentTime"
{
// It pass CurrentTime Proxie to "$CurrentTime" variable to scale materials effects such $emissiveblendscrollvector.
"resultVar" "$CurrentTime"
}
"Multiply"
{
"srcVar1" "$CurrentTime" // get $CurrentTime VMT parameter to multiply with srcVar2
"srcVar2" "$timeMult" // get $timeMult VMT parameter to multiply with srcVar1
"resultVar" "$time" // writes multiplication product into $time, scaling "CurrentTime"
}
}