-
Notifications
You must be signed in to change notification settings - Fork 358
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
Proposal : Improvements to double sided surface shading. #2086
Comments
In the name of all artist users, thank you Lee! |
q1. I'm fine with it only being boolean. Seems easy enough to covert to int if needed. |
I agree it's not hard to convert' I think more places use integer than boolean (i.e. |
I really like the idea of a Perhaps we should start with this, since more complex nodes such as As a historical note, we originally had a Here is the relevant section of the MaterialX 1.37 specification, for those interested in the history:
https://materialx.org/assets/MaterialX.v1.37REV2.PBRSpec.pdf |
Instead of adding |
Introduction
This document summarizes a couple of recent conversations surrounding how shading the front and surface of an object might be improved in MaterialX. It’s broken down into a number of separate proposals. One of the benefits of this proposal is that it would allow artists to construct materials with different values or surface shaders on each side of a surface, and use that MaterialX material in USD without requiring changes to USD. To be clear, this proposal does not preclude USD adding support for the
backsurfaceshader
terminal in the<surfacematerial>
, but it would eliminate a potential complication regarding USD supporting MaterialX 1.39 early next year.Proposal :
<frontface>
NodeThis node accepts no input, returns
true
if the front surface is being shaded, andfalse
for the back surface. This node will allow the MaterialX graph to make decisions based on which side of the surface is being shaded.Questions:
integer
version of this node that returns0
and1
? This would make it easier to use as an input to<switch>
.Proposal :
<twosides>
This node allows two different input values to be switched between, based on which side of the surface is being shaded. For instance, this node could be used to swap the color of a surface between the front and back sides of a surface.
Its noted that this node could be implemented as a nodegraph implementation if the proposal for adding the
<frontface>
node above is accepted.It is proposed that this node would have node definitions for the following types.
float
integer
color3
color4
vector2
vector3
vector4
matrix33
matrix44
surfaceshader
This last type is an important one. It would allow us to address the current conversation surrounding having different shaders on each side of a surface. Allowing two surfaces to be combined into a single port, and then connected to a downstream
<surfacematerial>
node, this is the critical component to gain the advantage of easier MaterialX 1.39 adoption in USD early next year.This proposal is intentionally not taking any stance around considerations for
uniform
data, to keep the focus on double sided aspect of this proposal. We would expect thistwosides
node to follow any future introduced conventions to accommodateuniform
data.The text was updated successfully, but these errors were encountered: