MildlyRedBeard Posted January 14, 2019 Share Posted January 14, 2019 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? Quote Link to comment Share on other sites More sharing options...
woodenduck Posted January 14, 2019 Share Posted January 14, 2019 Try collapsing your shader network in to a material, then promoting the switch parameter up to the material level. Quote Link to comment Share on other sites More sharing options...
toadstorm Posted January 14, 2019 Share Posted January 14, 2019 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. Quote Link to comment Share on other sites More sharing options...
anim Posted January 14, 2019 Share Posted January 14, 2019 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 Quote Link to comment Share on other sites More sharing options...
MildlyRedBeard Posted January 15, 2019 Author Share Posted January 15, 2019 Thanks for the tip guys. Its really frustrating but I guess it'll have to do. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.