Jump to content
MildlyRedBeard

Animation in material context not working?

Recommended Posts

Hey guys I have a rather frustrating problem. I've got a standard principled shader. Into the base color I've plugged a switch node, and into that i have a few different constants and ramps. I want the switch to change over time, so I added the expression "$F%9" into the "Switcher Index" parameter. Problem is instead of selecting the right index, it just stays on index 0. I've tried a bunch of things, including keyframing, using a separate constant node that has the animation applied to it, collapsing everything down into a subnet and imbedding said subnet into the material iteself and promoting parameters. I even tried creating a point attribute and using that to drive the material. Nothing has worked. Just changing the index normally without any animation works fine. But it seems that as soon as anything becomes time dependant then thats when I get issues. Has anyone encountered this and knows how to fix it?

Share this post


Link to post
Share on other sites

Try collapsing your shader network in to a material, then promoting the switch parameter up to the material level.

Share this post


Link to post
Share on other sites
2 hours ago, woodenduck said:

Try collapsing your shader network in to a material, then promoting the switch parameter up to the material level.

This is the correct answer... materials don't recompile themselves on a per-frame basis, so any parameters that are supposed to change over time need to be promoted in order to function.

Share this post


Link to post
Share on other sites

this is very annoying but unfortunately still the only workflow

Houdini should be smart enough to push the animation on Parameter VOPs to the wrapper shader without recompiling, otherwise a lot of the advantages of open Material context are lost

what's worse all animation or even $F expressions on the Material Builder nodes will be ignored as soon as you connect anything to any of it's inputs so you'd have to wrap that again, hopefully it will be streamlined one day, but for now collapse everything per material

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×