Skip to content
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

Merged
merged 6 commits into from
Oct 25, 2022

Conversation

crydalch
Copy link
Contributor

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.

mtlxbump

Thanks!

Adds a node to simplify adding bump to shading graphs. It's just a wrapper around existing nodes.
libraries/stdlib/stdlib_defs.mtlx Outdated Show resolved Hide resolved
libraries/stdlib/stdlib_defs.mtlx Outdated Show resolved Hide resolved
libraries/stdlib/stdlib_ng.mtlx Outdated Show resolved Hide resolved
libraries/stdlib/stdlib_ng.mtlx Outdated Show resolved Hide resolved
<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'" />
Copy link
Member

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.

crydalch and others added 2 commits October 25, 2022 11:03
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.)
Copy link
Member

@jstone-lucasfilm jstone-lucasfilm left a 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!

@jstone-lucasfilm jstone-lucasfilm merged commit 869ffe2 into AcademySoftwareFoundation:main Oct 25, 2022
Michaelredaa pushed a commit to Michaelredaa/MaterialX that referenced this pull request Oct 21, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants