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

Various Pattern nodes for AEC and MFG #1411

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
c3e0bc8
Patterns for circles/hexagons/cloverleafs/grecian/squares
zicher3d Jul 13, 2023
dd05e9d
Patterns for circles/hexagons/cloverleafs/grecian/squares refinement
zicher3d Jul 14, 2023
f74fe2e
Test files for procedurals
zicher3d Jul 14, 2023
7e718c6
Delete imgui.ini
zicher3d Jul 14, 2023
c345778
Update .gitignore
zicher3d Jul 14, 2023
7058edc
Remove unused attributes
jstone-lucasfilm Jul 14, 2023
1057a7a
Remove gitignore update for now
jstone-lucasfilm Jul 14, 2023
08f2652
Remove pre-release versioning data
jstone-lucasfilm Jul 14, 2023
b1afbd2
Remove pre-release versions in graphs
jstone-lucasfilm Jul 14, 2023
60ae1e5
Remove explicit node outputs
jstone-lucasfilm Jul 16, 2023
ffa6651
Update comments for consistency
jstone-lucasfilm Jul 21, 2023
1c02ba4
Remove layout details
jstone-lucasfilm Jul 21, 2023
e73c29f
Remove layout details
jstone-lucasfilm Jul 21, 2023
c00eefe
Remove layout details
jstone-lucasfilm Jul 21, 2023
2bd07a3
Remove layout details
jstone-lucasfilm Jul 21, 2023
beebf2d
Remove layout details
jstone-lucasfilm Jul 21, 2023
4df7fd8
Remove layout details
jstone-lucasfilm Jul 23, 2023
eb8a262
Clarify example materials
jstone-lucasfilm Jul 24, 2023
0bcd16e
Update comments
jstone-lucasfilm Jul 24, 2023
1d8f6af
Optimize circle computation
jstone-lucasfilm Jul 24, 2023
2a35036
Clarify cloverleaf computation
jstone-lucasfilm Jul 24, 2023
bd5ecd6
Define hexagon in processing order
jstone-lucasfilm Jul 24, 2023
3f2ca3e
Optimize hexagon computation
jstone-lucasfilm Jul 24, 2023
7d28ad9
Optimize line computation
jstone-lucasfilm Jul 24, 2023
ea183f6
Align node names with tiledimage
jstone-lucasfilm Jul 24, 2023
aa7bfcb
Align node inputs with tiledimage
jstone-lucasfilm Jul 24, 2023
10a4d12
State grecian definition in processing order
jstone-lucasfilm Jul 25, 2023
c0707ad
Minor clarity improvements
jstone-lucasfilm Jul 25, 2023
390bbff
Align grecian with tiledimage
jstone-lucasfilm Jul 25, 2023
b77510a
Prefer convert over combine
jstone-lucasfilm Jul 25, 2023
fa1a77c
Merge branch 'main' into zicher3d/patterns
jstone-lucasfilm Aug 4, 2023
c98e5a7
Minor optimization to grecian pattern
jstone-lucasfilm Aug 4, 2023
c782e03
Define line patterns after tiled shapes
jstone-lucasfilm Aug 4, 2023
44397ed
Minor optimizations to tiledcircles
jstone-lucasfilm Aug 4, 2023
719e701
Minor optimizations to tiledcloverleafs
jstone-lucasfilm Aug 4, 2023
4da9cea
Additional optimizations to tiledcircles
jstone-lucasfilm Aug 4, 2023
3f2f727
Minor optimizations to tiledhexagons
jstone-lucasfilm Aug 4, 2023
e101bae
Minor optimizations to tiledsquares
jstone-lucasfilm Aug 4, 2023
b5e216c
Split grecian into grid and crosshatch
jstone-lucasfilm Aug 15, 2023
3795d5b
Expand line pattern examples
jstone-lucasfilm Aug 15, 2023
55704c4
Minor refinements
jstone-lucasfilm Aug 15, 2023
783c5c5
Remove default input
jstone-lucasfilm Aug 15, 2023
198c648
Reorder definitions for clarity
jstone-lucasfilm Aug 15, 2023
69bda9f
Use distance node for clarity
jstone-lucasfilm Aug 15, 2023
5bc5796
Remove extra newline
jstone-lucasfilm Aug 15, 2023
f857773
Remove unused inputs
jstone-lucasfilm Aug 15, 2023
b0960b6
Merge branch 'main' into zicher3d/patterns
jstone-lucasfilm Aug 20, 2023
65b67cc
Merge branch 'main' into zicher3d/patterns
jstone-lucasfilm Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 119 additions & 0 deletions libraries/stdlib/stdlib_defs.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,125 @@
<output name="out" type="color3" />
</nodedef>

<!--
Node: <line>
Returns 1 if sample is at less than radius distance from a line segment defined by point1 and point2; otherwise returns 0.
Segment ends will be rounded.
Uses formulas from Inigo Quilez SDF samples (iquilezles.org)
-->
<nodedef name="ND_line_float" node="line" nodegroup="procedural2d">
<input name="sample" type="vector2" value="0, 0" />
<input name="center" type="vector2" value="0, 0" />
<input name="radius" type="float" value="0.1" />
<input name="point1" type="vector2" value="0.25, 0.25" />
<input name="point2" type="vector2" value="0.75, 0.75" />
<output name="out" type="float" />
</nodedef>

<!--
Node: <circle>
Returns 1 if sample is inside a circle defined by center and radius; otherwise returns 0.
-->
<nodedef name="ND_circle_float" node="circle" nodegroup="procedural2d">
<input name="sample" type="vector2" value="0, 0" />
<input name="center" type="vector2" value="0, 0" />
<input name="radius" type="float" value="0.5" />
<output name="out" type="float" />
</nodedef>

<!--
Node: <cloverleaf>
Returns 1 if sample is inside a cloverleaf shape inscribed by a circle defined by center and radius; otherwise returns 0.
-->
<nodedef name="ND_cloverleaf_float" node="cloverleaf" nodegroup="procedural2d">
<input name="sample" type="vector2" value="0, 0" />
<input name="center" type="vector2" value="0, 0" />
<input name="radius" type="float" value="0.5" />
<output name="out" type="float" />
</nodedef>

<!--
Node: <hexagon>
Returns 1 if sample is inside a hexagon shape inscribed by a circle defined by center and radius; otherwise returns 0.
Uses formulas from Inigo Quilez SDF samples (iquilezles.org)
-->
<nodedef name="ND_hexagon_float" node="hexagon" nodegroup="procedural2d">
<input name="sample" type="vector2" value="0, 0" />
<input name="center" type="vector2" value="0, 0" />
<input name="radius" type="float" value="0.5" />
<output name="out" type="float" />
</nodedef>

<!--
Node: <grid>
Creates a grid pattern with the given tiling, offset, and line thickness.
Pattern can be regular or staggered.
-->
<nodedef name="ND_grid_color3" node="grid" nodegroup="procedural2d">
<input name="texcoord" type="vector2" defaultgeomprop="UV0" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
<input name="uvoffset" type="vector2" value="0.0, 0.0" />
<input name="thickness" type="float" value="0.05" />
<input name="staggered" type="boolean" value="false" />
<output name="out" type="color3" />
</nodedef>

<!--
Node: <crosshatch>
Creates a crosshatch pattern with the given tiling, offset, and line thickness.
Pattern can be regular or staggered.
-->
<nodedef name="ND_crosshatch_color3" node="crosshatch" nodegroup="procedural2d">
<input name="texcoord" type="vector2" defaultgeomprop="UV0" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
<input name="uvoffset" type="vector2" value="0.0, 0.0" />
<input name="thickness" type="float" value="0.05" />
<input name="staggered" type="boolean" value="false" />
<output name="out" type="color3" />
</nodedef>

<!--
Node: <tiledcircles>
Creates a black and white pattern of circles with a defined tiling and size (diameter).
Pattern can be regular or staggered.
-->
<nodedef name="ND_tiledcircles_color3" node="tiledcircles" nodegroup="procedural2d">
<input name="texcoord" type="vector2" defaultgeomprop="UV0" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
<input name="uvoffset" type="vector2" value="0.0, 0.0" />
<input name="size" type="float" value="0.5" />
<input name="staggered" type="boolean" value="false" />
<output name="out" type="color3" />
</nodedef>

<!--
Node: <tiledcloverleafs>
Creates a black and white pattern of cloverleafs with a defined tiling and size (diameter of the circles circumscribing the shape).
Pattern can be regular or staggered.
-->
<nodedef name="ND_tiledcloverleafs_color3" node="tiledcloverleafs" nodegroup="procedural2d">
<input name="texcoord" type="vector2" defaultgeomprop="UV0" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
<input name="uvoffset" type="vector2" value="0.0, 0.0" />
<input name="size" type="float" value="0.5" />
<input name="staggered" type="boolean" value="false" />
<output name="out" type="color3" />
</nodedef>

<!--
Node: <tiledhexagons>
Creates a black and white pattern of hexagons with a defined tiling and size (diameter of the circles circumscribing the shape).
Pattern can be regular or staggered.
-->
<nodedef name="ND_tiledhexagons_color3" node="tiledhexagons" nodegroup="procedural2d">
<input name="texcoord" type="vector2" defaultgeomprop="UV0" />
<input name="uvtiling" type="vector2" value="1.0, 1.0" />
<input name="uvoffset" type="vector2" value="0.0, 0.0" />
<input name="size" type="float" value="0.5" />
<input name="staggered" type="boolean" value="false" />
<output name="out" type="color3" />
</nodedef>

<!-- ======================================================================== -->
<!-- Geometric nodes -->
<!-- ======================================================================== -->
Expand Down
Loading