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

Procedural Wood #1404

Open
wants to merge 4 commits into
base: adsk_contrib/dev
Choose a base branch
from
Open

Procedural Wood #1404

wants to merge 4 commits into from

Conversation

Starry316
Copy link

@Starry316 Starry316 commented Aug 27, 2024

Add a procedural wood material node graph (wood3d) which includes following custom nodes/node graphs as its components:

  • two custom noise node (wood3d_util_noise1d and wood3d_util_hashnoise2d),
  • a custom node for wood pore calculation (wood3d_util_pore_impulse), and
  • many sub-graphs that improve readability / help reduce complexity of the wood3d node graph.

This commit also contains a 3dwood_prests.mtlx which has many pre-defined parameters that helps to create different types of wood.

Add a 3d wood material node graph (wood3d) which includes following custom nodes/node graphs as its components:

- two custom noise node (wood3d_util_noise1d and wood3d_util_hashnoise2d),
- a custom node for wood pore calculation (wood3d_util_pore_impulse), and
- many sub-graphs that improve readability / help reduce complexity of the wood3d node graph.

This commit also contains a 3dwood_prests.mtlx which has many pre-defined parameters that helps to create different types of wood.
Update some ui input limitation in node def and add a hard limitation to pore_cell_dim since it may cause divide by zero issue.
-->
<nodedef name="ND_wood3d" node="wood3d" nodegroup="texture3d">
<input name="seed" uiname="Wood generation seed" uifolder="Wood Space Settings" type="float" value="2" uimin="0" uisoftmax="4096" xpos="-107.971016" ypos="-45.672413" />
<input name="scale" unittype="distance" uivisible="false" uiname="Scale (should not be changed by user)" uifolder="Wood Space Settings" type="float" value="0.1" uimin="0" uisoftmax="10" xpos="-110.057968" ypos="-47.879311" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove "(should not be changed by the user)". It's legit for the user to adjust the overall size if desired.
Why is the default 0.1? It should be 1.0.
I verified that with scale 1.0 and units in cm, the rings are correctly spaced.

<input name="early_color" type="color3" interfacename="early_color" />
<input name="radius" type="float" nodename="final_radius" />
</wood3d_util_earlywood_color>
<wood3d_util_latewood_color name="latecolor_prelin" type="color3" xpos="-63.217392" ypos="-46.258621">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "prelin", also line 1606

@zicher3d
Copy link
Collaborator

I see the comments on defs file about the subgraphs with single-use. I'm still of the opinion we should remove them.
Let's discuss on slack or in a quick meeting.

@zicher3d
Copy link
Collaborator

Just for the record (no need to add anything now). The defs should include a namespace="adsk" like for Prism nodes when final.
My Legacy Protein defs also lack the namespace now, and the reason is that there is a bug in Graph Editor that prevents nodes with a namespace to be created. That's reason enough to skip, as it makes working and debugging the nodes basically impossible.
But if we are tracking issues in Jira or somewhere else, we should put this in the list.

@zicher3d
Copy link
Collaborator

We have a few instances of Graph Editor auto-naming of nodes that are misleading (in sub-graphs).
Example: "ray_combine2_vector3", which is a combine 2 floats into a vector2.
In many cases the last part (the type, like "_vector3" in the above sample) can always be removed, but doing it now is a bit difficult.
This is just for readability, low priority.

- Fix scale's description and the default value.
- Fix a "prelin" typo.
- Rename misleading node names. Any node ending with "_vectorxx" or "_floatxx" is renamed to "_vector_xx" and "_float_xx".
- Rename nodes in a better way.
- Move "wood3d_util_pore_color" from a predefined graph to the main graph because it's a very small graph .
@ashwinbhat ashwinbhat changed the title First commit of 3d wood material Procedural Wood Oct 16, 2024
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