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

Add triangle wave node #1334

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0b3d48e
Adding ping pong math node
Cinifreak Apr 19, 2023
5e8dc6b
Adding Herringbone Tilling
Cinifreak Apr 24, 2023
d3dfadd
cleaning
Cinifreak Apr 24, 2023
1ce2442
changing name
Cinifreak Apr 28, 2023
df51fb5
Minor layout update
jstone-lucasfilm May 26, 2023
d39e8d9
Minor layout update
jstone-lucasfilm May 26, 2023
caf528d
Merge branch 'main' into pingpog-node
jstone-lucasfilm May 26, 2023
922476b
fixing points in the review
Cinifreak May 27, 2023
e1b49e9
change scale to implitude
Cinifreak May 28, 2023
d695cc5
List nodes in processing order
jstone-lucasfilm May 31, 2023
730cc6f
Minor clarity improvement
jstone-lucasfilm May 31, 2023
9f2f22f
Minor clarity improvement
jstone-lucasfilm May 31, 2023
bfbc8d4
Updates According to reviews
Cinifreak Jul 2, 2023
4ac2811
Update description
jstone-lucasfilm Jul 6, 2023
0a72507
Update description
jstone-lucasfilm Jul 6, 2023
270e4f7
Merge branch 'main' into pingpog-node
jstone-lucasfilm Jul 6, 2023
77d5f22
Minor interface clarifications
jstone-lucasfilm Jul 7, 2023
4e5d754
Unify Frequency name across nodes
Cinifreak Jul 9, 2023
954bbae
Additional triangle wave improvements
jstone-lucasfilm Jul 9, 2023
79ffea1
Update comment
jstone-lucasfilm Jul 9, 2023
f53362f
Minor clarification to order
jstone-lucasfilm Jul 9, 2023
a3cb1dd
Additional improvements
jstone-lucasfilm Jul 9, 2023
83bca65
Simplify triangle wave interface
jstone-lucasfilm Jul 10, 2023
d5522e4
Remove extra uiname
jstone-lucasfilm Jul 10, 2023
f4933b6
Update description
jstone-lucasfilm Jul 10, 2023
70ec304
Update description
jstone-lucasfilm Jul 10, 2023
9de2b4d
update the node with period parameter
Cinifreak Jul 12, 2023
c064db9
Revert "update the node with period parameter"
jstone-lucasfilm Jul 12, 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
10 changes: 10 additions & 0 deletions libraries/stdlib/stdlib_defs.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,16 @@
<output name="out" type="stringarray" defaultinput="in1" />
</nodedef>

<!--
Node: <trianglewave>
Generate a triangle wave from the given scalar input.
The generated wave ranges from zero to one and repeats on integer boundaries.
-->
<nodedef name="ND_trianglewave_float" node="trianglewave" nodegroup="math">
<input name="in" type="float" value="0" />
<output name="out" type="float" />
</nodedef>

<!-- ======================================================================== -->
<!-- Adjustment nodes -->
<!-- ======================================================================== -->
Expand Down
26 changes: 26 additions & 0 deletions libraries/stdlib/stdlib_ng.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,32 @@
</magnitude>
<output name="out" type="float" nodename="N_mtlxmagnitude" />
</nodegraph>

<!--
Node: <trianglewave>
Generate a triangle wave from the given scalar input.
The generated wave ranges from zero to one and repeats on integer boundaries.
-->
<nodegraph name="NG_trianglewave_float" nodedef="ND_trianglewave_float">
<absval name="absval1" type="float">
<input name="in" type="float" interfacename="in" />
</absval>
<modulo name="modulo1" type="float">
<input name="in1" type="float" nodename="absval1" />
</modulo>
<subtract name="subtract1" type="float">
<input name="in1" type="float" nodename="modulo1" />
<input name="in2" type="float" value="0.5" />
</subtract>
<absval name="absval2" type="float">
<input name="in" type="float" nodename="subtract1" />
</absval>
<subtract name="subtract2" type="float">
<input name="in1" type="float" value="0.5" />
<input name="in2" type="float" nodename="absval2" />
</subtract>
<output name="out" type="float" nodename="subtract2" />
</nodegraph>

<!-- ======================================================================== -->
<!-- Adjustment nodes -->
Expand Down