materialx support material variation node?
4007 6 3-
- Piledriver
- Member
- 99 posts
- Joined: Nov. 2018
- Offline
-
- npetit
- Staff
- 449 posts
- Joined: Feb. 2008
- Offline
-
- Piledriver
- Member
- 99 posts
- Joined: Nov. 2018
- Offline
-
- npetit
- Staff
- 449 posts
- Joined: Feb. 2008
- Offline
It's really up to how you want to author your shader. Same with the primvar name, give it a name that makes sense to you.
Here's an example where I'm adding a mtlx color correct driven by a "hue" and a "saturation" primvars to color correct a base image texture. The material variation LOP node will show them as potential primvar names you can use to vary the material.
By assigning them random values (enable "use snippet") you can very them per instance.
As a side note, the primvar interpolation created by the material variation LOP node, when used on mesh primitives, will be respected so you can very the material per USD primitive (constant), per face (uniform), per vertex (vertex) or per point (face varying)...
Here's an example where I'm adding a mtlx color correct driven by a "hue" and a "saturation" primvars to color correct a base image texture. The material variation LOP node will show them as potential primvar names you can use to vary the material.
By assigning them random values (enable "use snippet") you can very them per instance.
As a side note, the primvar interpolation created by the material variation LOP node, when used on mesh primitives, will be respected so you can very the material per USD primitive (constant), per face (uniform), per vertex (vertex) or per point (face varying)...
-
- Piledriver
- Member
- 99 posts
- Joined: Nov. 2018
- Offline
-
- Piledriver
- Member
- 99 posts
- Joined: Nov. 2018
- Offline
-
- AnimGraphLab
- Member
- 67 posts
- Joined: May 2019
- Offline
Piledriver
how i can control how much change the hue?
2 years later.. Piledriver, I'm grateful that you asked this question. npetit, I'm grateful for your replies.
In the provided HIP by npetit, add an MTLX Multiply node after
hue_primvar, and change the input 2value. Value of 0 = no hue change. Values above 0 increase hue change. You can add MTLX Add node before MTLX Multiply to shift hue (cycle).
For saturation primvar, add MTLX Multiply after
saturation_primvar. Value of 0 = desaturated look.Edited by AnimGraphLab - Sept. 16, 2024 05:44:04
-
- Quick Links


