Promote Parameter = swimming displacement ?

   2220   4   1
User Avatar
Member
6 posts
Joined: April 2015
Offline
Hi there folks,

My very first post seems like such a silly question, but no amount of logic / reading / tutorials seems to point me as to why this is the case so here it goes.

Disclaimer - I'm relatively new to Houdini, month into it, but not 3d, which I've been doing for decades.

This is a very simple setup, box>poly bevel>transform> then time blend held at frame 1 into rest position etc.

Then I simply setup a principled shader and enable noise displacement.
Noise sticks with transformed object - YAY! (top part of GIF)
If I then simply Promote Parameter - Amplitude then the whole thing breaks (bottom part of GIF)
Any parameter it seems?

Why is this the case and what am I doing wrong/ missing as a concept here ?

Cheers

Attachments:
Promote_paramater.gif (119.2 KB)

User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
This is a limitation of called/nested shaders.

Connecting an input to a shader causes it to be called by an outer shader, passing the inputs to it, and passing the called shaders outputs to the output. The caller only knows about the parameters wired directly into the callee, and not about any attributes that may have been bound by the shader.

You will find that as soon as any wire is connected to a shader, attributes that it bound no longer work, such as Cd/Alpha/rest/uv, etc. The only way to get bound attributes to the called shader is by binding them in the outer shader and passing them in as inputs. For now, only uv is exposed for this purpose. The preferred work around is to probably compute displacement externally, and wire in a displacement amount to ‘disp’. The noise inside the principled shader is nothing special, just a turbulence vop.

Attachments:
shader_example.hip (436.7 KB)

User Avatar
Member
6 posts
Joined: April 2015
Offline
Thanks for that thorough explanation and great example jsmack. Really appreciated. The aim was mask where the displacement takes place and I was trying to pipe in an attribute for that. Knowing what happens underneath makes it obvious why it didn't work.
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
It's unfortunate that the initial release of the mat context contains so many limitations that prevent the more direct workflows from functioning as expected. I hope the next release can address the many gotchas present in 16.0.
User Avatar
Member
6 posts
Joined: April 2015
Offline
Not knowing the old shop context too well makes me pretty unaware of these limitations, so knowing that my hard wired functional expectation were at least in the ballpark is a relief. One thing is pretty clear tho , I should have started my Houdini journey eons ago. Thanks again jsmack.
  • Quick Links