-
Notifications
You must be signed in to change notification settings - Fork 23
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
Marble and Speckle procedurals plus minor fixes #1407
Marble and Speckle procedurals plus minor fixes #1407
Conversation
Adding Marble and Speckle nodedefs and nodegraphs. This includes a small utility node called util_specklenoise. Note that this is classified as an utility node rather than a new noise because it's just an existing noise with some multiply and range adjustments that is re-used multiple times in Marble and Speckle. It has no real use outside of that. Couple of more fixes 1) The legacy_noise procedural transform order has changed. Now rotate is execute before translate. (small node connection changes from line 440 to 510 in nodegraph file) 2) Small formatting/space changes to legacy_noise nodedef. (line 69 to 80)
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.
LGTM, we need to add documentation of the formula and math used for future reference.
<input name="offset_x" type="float" value="0" uimin="0.0" uisoftmax="10.0" unittype="distance" /> | ||
<input name="offset_y" type="float" value="0" uimin="0.0" uisoftmax="10.0" unittype="distance" /> | ||
<input name="offset_z" type="float" value="0" uimin="0.0" uisoftmax="10.0" unittype="distance" /> | ||
<input name="rotate_x" type="float" value="0" uimin="0.0" uisoftmax="360.0" unittype="angle" /> | ||
<input name="rotate_y" type="float" value="0" uimin="0.0" uisoftmax="360.0" unittype="angle" /> | ||
<input name="rotate_z" type="float" value="0" uimin="0.0" uisoftmax="360.0" unittype="angle" /> |
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.
Can we make these vector3
offset and vector3
rotation? It will reduce the number of uniforms, I guess we can't extract them for fractal 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.
I matched the UI inputs, where we have 6 separate fields, 3 offsets and 3 rotations.
I'd like to revise one day, but I lack the knowledge. In RRT the transforms are a 4x4 matrix. Not sure where that comes from.
It's possible that when we will work on the converter for these, we realize the inputs are different. For now this is good for graph testing.
@@ -516,6 +516,497 @@ | |||
<output name="output_color3" type="color3" xpos="21.615942" ypos="0.560345" nodename="mix_colors" /> | |||
</nodegraph> | |||
|
|||
<nodegraph name="NG_util_specklenoise_float" nodedef="ND_util_specklenoise_float"> |
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.
We probably need a readme in future to document the math used here.
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.
The RRT code just say "taken from the Max code".
Basically the noise is multiplied by 1.65, clamped, and the range adjusted. No idea why.
Adding Marble and Speckle nodedefs and nodegraphs. This includes a small utility node called
util_specklenoise
. Note that this is classified as an utility node rather than a new noise because it's just an existing noise with some multiply and range adjustments that is re-used multiple times in Marble and Speckle. It has no real use outside of that.Couple of more fixes
The
legacy_noise
procedural transform order has changed. Now rotate is execute before translate. (small node connection changes from line 440 to 510 in nodegraph file)Small formatting/space changes to
legacy_noise
nodedef. (line 69 to 80)