2
$\begingroup$

Phase shifting imported data using Floored Modulo Node.

I'm trying to phase shift imported data using geometry nodes (left or right).

I'm trying to use the floored modulo node since the data imported will be "complex" and not just a square wave.

In this example a square wave is being shifted see animation below. (What I want)

ani1

But when I try and shift the data I get. (What I have)

ani2

img1

See attached blend file

$\endgroup$

1 Answer 1

3
$\begingroup$

Here:

Result

  • First we create a flat line:
    • Length = max time
    • Direction = X
  • Resample the curve to the number of points in the data
    • This means each point X coordinate will be the time value (unless the data points aren't evenly spaced -- see below)
  • Then we transfer the amplitude to this curve ("Capture Attribute"):
    • (optional, depending on data) sort the original points by time
    • sample these points by index
    • (if the data points aren't evenly spaced, not only capture the amplitude, but also set position X, but not Y. You might want to resample again to an arbitrary number after that, with a resolution good enough to show the graph properly)

With this flat line as our time domain, without setting Y:

  • We can sample by "length" (equivalent to time) instead of sampling by index.
  • The "length" parameter will be our time and we shift this parameter
  • The floored modulo goes after adding something to the length
  • Finally, for setting the curve Y:
    • we sample the flat line using this shifted floored length
    • we don't change X!!!

Nodes

$\endgroup$

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.