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

Marble and Speckle procedurals plus minor fixes #1407

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

zicher3d
Copy link
Collaborator

@zicher3d zicher3d commented Oct 1, 2024

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)

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)
@zicher3d zicher3d self-assigned this Oct 1, 2024
Copy link
Collaborator

@ashwinbhat ashwinbhat left a 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.

Comment on lines +124 to +129
<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" />
Copy link
Collaborator

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?

Copy link
Collaborator Author

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">
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@zicher3d zicher3d merged commit 8c9747a into adsk_contrib/dev Oct 2, 2024
30 of 32 checks passed
@zicher3d zicher3d deleted the zicher/marble_and_speckle_procedurals branch October 2, 2024 17:22
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.

2 participants