The attached file contains a simplified shader to show our problem.
In this file we create a simple grid and add a primitive attribute to store a vector. (named colorTest with a value of 1,0,0)
We then want to import this attribute into our shader network, multiply it with some noise
and then pipe the result into the color channel of a Classis Shader.
For some reason this only works if we import the colorTest attribute outside of the Material Builder and
then pipe it into the Material Builder (versionWorking)
To keep things clean however we would like to import the colorTest attribute inside of the Material Builder
and use it from there (versionNotWorking)
We want to keep the noise_creation as a separate node (will later be turned into an HDA) because
there will be different versions of this noise and this way we can easily swap them.
Any ideas what we might be doing wrong?
Thanks in advance
Shader building, questions regarding importing attributes228 2 0
Your ‘versionWorking’ is the required workflow when connecting an input to a builder/shader node. Any connection to a shader triggers the automatic creating of a wrapper shader that calls the builder node as an import shader. Bound attributes such as in your example require re-binding outside the material that had the inputs connected.
- Quick Links