3
$\begingroup$

Combine waves generated with float curve node to create new wave using geometry nodes.

I'm trying to combine two "signals" generated using the float curve node and combine them to generate a third to show what happens when the second wave is phase shifted in the x direction. However when I shift the 2nd signal in the x direction the 3rd signal doesn't change in the y direction (amplitude).

Main Signal created at 1st join node:

img000

img00

Note: I know I can use the math trig functions to do this but would like to learn how to do this with the float curve node.

My thought process:

1st wave + 2nd phase shifted wave in x direction = 3rd new combined wave.

See attached blend file.

img0

img1

$\endgroup$

1 Answer 1

3
$\begingroup$

Two important points:

  • Don't join the curves (you want to sample two independent curves, not sample a joined curve - joined curves change indices)
  • You need to offset the curve before the "Float Curve".
    • Since you're sampling by index, moving the points won't change which point you're sampling, it's Y will remain unchanged

So, for shifting the curve, change the value in the add node below (for curves whose X length is different from 1, you can take the "fac" instead of the "length")

Shift

Result

This is where you should do all the shifting math (you can multiply the length in both curves if you want to have a zoom out, for instance):

Zoom out example

You can make it upside down after the float curve as the original file, you just shouldn't shift X after.

I tidied up the rest of the nodes:

  • Notice that the curves are not joined until the end
  • Simplified many things

New Nodes


Making a two part wave

Two part result

For your goal of making a two part wave, I guess you should create a node group that makes the wave and then you control it from outside.

  • Use a single X parameter for offseting
  • Notice the length of the line is 2 now
  • To sample the second half, offset X
    • First half will work from length 0 to 1
    • Second half will work from length 1 to 2

Wave maker

Then outside you make the two waves and follow the same idea as before:

  • The first add is the X offset
  • The floored modulo makes it cyclic (if you want flat ends, remove it)

Combine

File

$\endgroup$
5
  • $\begingroup$ Thanks the reason I joined waves so early was that those two float curve nodes where used / joined to create one wave (two hales of one main wave) $\endgroup$ Commented Jan 22 at 13:36
  • $\begingroup$ So, are you trying to combine the wave with itself, is that it? $\endgroup$ Commented Jan 22 at 13:40
  • $\begingroup$ Yes, If you look at the output of my first joined node I added another image above you will see the full signal (half is positive and half is negative) I want to see the combined wave when the same wave is combined with itself when one wave is being phase shifted with itself. $\endgroup$ Commented Jan 22 at 13:55
  • 1
    $\begingroup$ @RickT, check updated solution $\endgroup$ Commented Jan 22 at 14:02
  • $\begingroup$ Thanks, adding the floored modulo to add a repeat is a nice touch! $\endgroup$ Commented Jan 22 at 14:12

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.