-
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 2d checkerboard pattern node #1328
Merged
jstone-lucasfilm
merged 6 commits into
AcademySoftwareFoundation:main
from
sideeffects:checkers2d
May 18, 2023
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
de2bdc5
Add a 2d checkerboard pattern node
crydalch 4d74363
Renamed from checkers2d to checkerboard.
crydalch 6cf78f9
Omit default inputs
jstone-lucasfilm acd4a21
Changed to color signature, added 2 color inputs.
crydalch f8e11af
Minor newline fix
jstone-lucasfilm 4598a8a
Minor whitespace fix
jstone-lucasfilm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@crydalch The design of this node seems very reasonable to me, though it seems worthwhile to consider the idea of returning a
color3
value instead of a float, with the two colors of the checkerboard specified ascolor1
andcolor2
inputs (defaulting to white and black).I don't have a strong opinion on which design is better for MaterialX, but for reference here are a few examples of
checkerboard
nodes that use the color1/color2 approach:https://docs.unity3d.com/Packages/[email protected]/manual/Checkerboard-Node.html
https://learn.foundry.com/mari/Content/reference_guide/nodes/Checkerboard.html
https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_user_guide_ac_texture_shaders_ac_texture_checkerboard_html
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.
It would be nice to cover a reasonable "maximum" possible flexibility (which seems to be Arnold) and anything that supports less can restrict what inputs are modifiable / exposed. e.g. frequency in u and v allows for "stripe" textures to be created. A "customized" version of this would sync u and v values. Does this sound reasonable?
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 like this idea @jstone-lucasfilm
An early version of the node did have color inputs/outputs, but I don't recall why I went away from that... but regardless, I'll make that change. Thank you for the suggestion and references.