-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a simple Bump node #1085
Add a simple Bump node #1085
Conversation
Adds a node to simplify adding bump to shading graphs. It's just a wrapper around existing nodes.
…'scale' to drive the normalmap node.
libraries/stdlib/stdlib_defs.mtlx
Outdated
<nodedef name="ND_bump_vector3" node="bump" nodegroup="geometric"> | ||
<input name="height" type="float" uiname="Height" uisoftmin="0.0" uisoftmax="1.0" value="0" doc="Amount to offset the surface normal." /> | ||
<input name="scale" type="float" uiname="Scale" uisoftmin="0.0" uisoftmax="1.0" value="1" doc="Scalar to adjust the height amount." /> | ||
<input name="space" type="string" value="tangent" enum="tangent, object" uniform="true" doc="The space to transform the normal from ('tangent' or 'object'); defaults to 'tangent'" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can remove this space
input, and assume the normal map is in tangent space, since the heighttonormal
node is designed to generate a map in this space. In the latest draft of MaterialX 1.39, the space
input has been removed from the normalmap
node, so removing the input should make the bump
node more forward-looking.
This changelist removes the input elements from the functional nodegraph for the new bump node, since they don't have any effect in MaterialX. (In an upcoming change, I'd like to add a validation warning for this case, since it comes up often.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ready to merge, thanks @crydalch!
This adds a MtlX Bump node. It simplifies adding bump to shaders by wrapping up the necessary nodes, which helps artists using MaterialX. Having a node called 'bump' also makes it easier to discover.
This adds a MtlX Bump node. It simplifies adding bump to shaders by wrapping up the necessary nodes, which helps artists using MaterialX. Having a node called 'bump' also makes it easier to discover.
Thanks!