garin2
June 10, 2016 05:37:22
a quick question.
i have a simple setup. a grid with attribute vop.
i have a aaflownoise and added “$FF/240” in “flow” field hoping it gives me animated noise. but it doesn't. when i just scrub through the value it moves but not with expression.
is it a bug or something i missed?
thanks,
hb
Enivob
June 10, 2016 08:57:47
The $FF variable is not available in the VOPs context. However, it is piped in as a global named Time that you can route directly to flow. Throw in a multiply or divide math node and you can re-construct the typed expression as a node setup.
old_school
June 10, 2016 13:33:16
Just a word to the wise and the reason why you don't want to do this. You never want to use expressions inside VOPs. This will force the VOP network to compile all the time to evaluate the expression. This will really slow things down as some complex VOP networks take time (milliseconds more but still) to compile.
As mentioned above, use attributes and variables passed in to VOPs with Bind VOPs or use the supplied Global Variables like Time in this case.
garin2
June 10, 2016 17:47:09
thank you Enivob & jeff.
as a beginner, where to use expressions, global or standard variables, or attributes are the most confusing things for me. but i feel like i'm understanding the concept slowly…
hb
punkweazel
April 25, 2018 17:27:33
Hi,
So this works in VOPs, but it doesn't seem to work when I try the same thing in a material network… How does Global Time work in mat?
Thanks
jsmack
April 26, 2018 11:23:42
There is no global time in mat. You will have need to use $T or $FF on a parameter. Note that you cannot put it for the default value, only the initial value with be used. If you collapse your vop network into a material builder, then the parameters' values will be accessible and you can add an expression to the parameter. If collapsing into a material builder is too much of a hassle, a workaround is to use a user property with an expression for time, and use a renderstate vop to import the user property.
punkweazel
April 27, 2018 05:24:34
Ok cool. Thanks for that. That makes sense with the material builder thing. Similar idea to promoting a parameter from a VOP network. I'm still very much learning Houdini, so dealing with context levels and parameters is new to me. Especially in shading. And yeh, I haven't been using material builders yet, and mostly work in mat with a flat node network.
Outputing user property gtime from a ROP is sneaky. I had no idea you could use a ROP like that. I think it's also possible to generate the noise in a COP and output the channel into the shader. Now I have various ways to skin this cat
Much appreciated.