Basic material connections with smoke

   1682   1   0
User Avatar
Member
31 posts
Joined: Feb. 2017
Offline
Hi,

I have what I hope is a simple questions about connections with a Material Builder.

I have a simple object turned into a vdb that has density with a material applied. The material is a constant smoke.

If I change the smoke color on the material, then I see the smoke color change in the render.

However, when I hook a Constant field up as an input to the smoke color, then I am left with just black. I've changed the constant to Color and set it to blue.

Is there any reason I shouldn't be able to pipe in something to a Material Builder?

I've attached the file for reference, I assume I am missing a very basic step.

Thanks for any help

Attachments:
Smoke_Color.hipnc (362.3 KB)

User Avatar
Member
7737 posts
Joined: Sept. 2011
Offline
One of the drawbacks of the mat context is that when a material is called by an outer wrapper material, any bound attributes must be explicitly bound to the called material.

When a material, in your case a material builder, has an input connected the new collection of nodes is wrapped in an automatically generated shader that calls the shaders used as building blocks. Because ‘density’ is bound through the parameter called ‘density,’ it is not automatically bound to the outer materials shader call.

For cases where the parameter has a visible input pin, such as your material, there is a remedy. Create a new parameter and bind it to density, connecting the bound value to the density input of the constantsmoke material.

Unfortunately there are cases where the input is not visible, such as if bind nodes are used. In this case there is no remedy and any bound attributes simply cannot be passed to the inner shader. This is true for attributes such as Cd or Alpha that may be used by a classic or principled shader that is part of a larger shader network.

To avoid this issue entirely, it is probably best to never connect anything to a material node unless absolutely necessary, e.g. layered materials.
  • Quick Links