Material overrides using nodes, not layers

   1153   4   0
User Avatar
Member
340 posts
Joined: June 2017
Offline
I have used layer based and node based software for years: After Effects vs Nuke, Modo vs Blender, Substance Painter vs almost every 3D texturing system. There are advantages and disadvantages to each. But on this forum, it is implied that material overrides are easy with a nodal system. These actually are very easy in a layer based system, but how would one solve a simple issue like having material overrides on just one channel.

As an example I've explained before, if I have multiple dials (for a radio, television, audio mixer, etc.) where the dials are rotated slightly differently, but I want to have just the anisotropic direction stay the same for each dial, the only way I know in Houdini is to set up different materials for each dial. There is tons of overhead with that, but it allows me to reverse the dial rotation in the anisotropic UV map ("UV_Xform13" is controlled by the relative reference to the z rotation of the preceding transform node). The attached object nodes show basically how one dial is reused with transforms for the set of dials. But after each dial, I have to assign a different material to the front face group to control for the anisotropic direction. The material shader for one such dial is shown in the second attachment.

Is there a way to not have to recreate a shader for each dial but just override the UV's for a single channel in a node based system (without using Python)?
Edited by Island - Feb. 1, 2022 21:59:57

Attachments:
Dials.jpg (146.4 KB)
AnisotropicMaterial.jpg (135.4 KB)

User Avatar
Member
8531 posts
Joined: July 2007
Offline
you can create an attribute on your geo, different value for every dial
and just bind it (Bind VOP) in material and use for whatever you want
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
340 posts
Joined: June 2017
Offline
Are you saying you would add an attribute wrangle node before each transform with code something like:
f@zrot = -30;
And have the transform use this attribute for the z rotation (which I can't get to work)
and have the material use this attribute for the UVtransform of the channel you wish to change using a bind? I don't see where I could connect this to the UVtransform node to alter the UV rotation.
Edited by Island - Feb. 1, 2022 22:30:50
User Avatar
Member
7741 posts
Joined: Sept. 2011
Offline
Island
And have the transform use this attribute for the z rotation (which I can't get to work)

no, you can't do that. You can create a matrix attribute and use transform by attribute though.

Island
and have the material use this attribute for the UVtransform of the channel you wish to change using a bind? I don't see where I could connect this to the UVtransform node to alter the UV rotation.

Yes, a bind node with the same parameter name as the attribute will insert the value from the geometry into the shader. Connect it where you would connect that value in the shader. If it's a z rotation, build an appropriate vector and connect it to the rot input of the uvtransform node.
User Avatar
Member
340 posts
Joined: June 2017
Offline
Thank you jsmack and Tomas. Thanks for confirming that you can't use an attribute directly in a transform node (but it is fairly easy with a few lines of VEX to accomplish the same thing). I think based on the suggestions above that I was able to get it to work but it is certainly a lot more complicated to set up compared with a layer based system. (See attachment, if anyone else wants to solve a similar problem). Second image is a more complicated version for controlling anisotropic direction. This is glacially show on my Mac Pro 2019.
Edited by Island - Feb. 5, 2022 13:35:24

Attachments:
BindControl.jpg (104.5 KB)
TestAttributeMaterial.jpg (166.9 KB)

  • Quick Links