connecting texture node to principled shader bump channel

   2085   6   1
User Avatar
Member
340 posts
Joined: June 2017
Offline
It is easy to specify a texture path directly in the principled shader bump tab, but how does one connect a texture node to the principled shader by nodes? There are ways of connecting a texture node to displacement or normal, but the texture node only has a color output and the input for "baseBump_bumpTexture" is a string. There are times I would like to modify the texture image in Houdini to change the bump with nodes.
User Avatar
Member
8531 posts
Joined: July 2007
Offline
Island
"baseBump_bumpTexture" is a string
as any other texture path parameter/input, you use those only to provide texture path and let internal logic handle how its used
which is usually to interpret the color values as heightmap and convert to normal

so if you want to do the same externally you'd use
Displacement Texture VOP (set to Bump) outN -> baseN (or coatN) Principled Shader (Core) VOP

or on more granular level:
Displacement Texture VOP is a hda combining following, so you can also use Texture VOP with Displace VOP instead if you want to modify the values before they are turned into normal values:
Texture VOP -> (do stuff) -> Displace VOP -> baseN ...
Edited by tamte - Jan. 30, 2022 14:50:49
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
340 posts
Joined: June 2017
Offline
Thank you, Tomas. I had done the method you suggested but don't know why there is an input parameter on the principled shader for baseBump_bumpTexture or how that might be connected to anything. This comes up when I want to have a separate displacement and bump texture. Is there anything that can be connected to the baseBump texture input channel itself?

Using a node based system for materials unlike a layer based system definitely makes certain things more complicated. For instance, if I want a set of dials rotated to different angles but keep the anisotropic direction the same for each but the dial marker rotated, it requires a lot of different materials (one for each dial). In a layer based system, one would just create a dial marker rotation override but keep the anisotropic direction the same for all dials.
Edited by Island - Jan. 30, 2022 17:30:21
User Avatar
Member
8531 posts
Joined: July 2007
Offline
to combine multiple bumps just plug outN from one as input to another bump so as input N to the Displace VOP used for bump

the actual displacement shader that uses disp input will be evaluated first so all your "bumps" will already use displaced P and N automatically
Edited by tamte - Jan. 30, 2022 18:07:13
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
Island
Using a node based system for materials unlike a layer based system definitely makes certain things more complicated. For instance, if I want a set of dials rotated to different angles but keep the anisotropic direction the same for each but the dial marker rotated, it requires a lot of different materials (one for each dial). In a layer based system, one would just create a dial marker rotation override but keep the anisotropic direction the same for all dials.

I'm not sure how node based differs from layer based except that layer based is a subset of what nodes can do.

There's no reason to use a different material for each part that has different material properties. This is what material overrides are for. Attributes on the geometry override parameters on the material automatically. Material overrides can also be created explicitly with the material sop.

Anisotropy direction is implied by uv coordinates. If the knobs all have the same uv layout, then rotated knobs should automatically have the anisotropy direction rotated to match.
User Avatar
Member
340 posts
Joined: June 2017
Offline
Thank you both. I see how to combine bump and displacement as Tomas suggests (and was the method in a tutorial I saw), but I don't understand what the input channel is for on the principled shader for bump texture. What would connect with it?

Anisotropic direction can be simulated by a color map easily created with blends in illustrator. (see attachment) But the direction does not change as the dials are rotated even though an arrow or line texture connected to the diffuse color does. Rotating the dial shifts the anisotropic direction unlike in real life, so I need to add separate uv transforms to each dial face anisotropic direction connection to reverse the dial rotation, leaving the apparent anisotropic direction unchanged. There are lots of images showing this like:

https://www.123rf.com/photo_45537064_control-panel-of-old-classic-color-analog-television-it-has-channel-selector-dials-push-power-switch.html [www.123rf.com] or

https://www.pinterest.com/pin/835488168353982828/ [www.pinterest.com] or

https://www.sidefx.com/forum/topic/82528/ [www.sidefx.com]

Layer shaders can mask just the anisotropic direction for each dial, so they don't require rebuilding any of the other parts of the shader for each dial. It is much simpler and quicker. In a node based system like Houdini, I had to use the relative reference to rotation in z of the dial to rotate in the opposite direction the anisotropic direction's UV transform. But that required separate materials for each node.
Edited by Island - Feb. 1, 2022 11:59:59

Attachments:
AnisotropicDirection.ai (404.9 KB)

User Avatar
Member
8531 posts
Joined: July 2007
Offline
Island
but I don't understand what the input channel is for on the principled shader for bump texture. What would connect with it?
as I mentioned the string bump texture input is for the path to the texture that is used internally as a heightmap for bump, just unlock the Principled Shader and dive inside to see how its used

essentially bump and normal maps ultimately affect normal of the surface, both need some processing before usable as N
- normal maps have to be transformed from tangent space
- bump maps have to be evaluated as a normal of the slope of the heightmap
for both those conversions you can use Displace VOP

Displace VOP can additionally also compute P displacement by heightmap or by vector usually in tangent space, but there are options

so essentially Displace VOP is your go to node when dealing with Normal or Vector displacement as well as Normal or Bump Map
again look inside of Principled shader for example of use, even though they use above mentioned higher level wrapper called Displacement Texture VOP so you have to dive in there too to see
or if you are curious about math behind Displace VOP feel free to dive in there too, even though there is really no need
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links