Move Points of SOP along point normals

Hi

I’m having trouble figuring out how to move points along their normal.

My situation is as follows: I have a circle sop with 360 divisions. So I have 360 points on this circle. I have a CHOP that has 360 samples with each sample being a value between (-1 and 1).

I’d like to move the points of the circle along their point normals using this CHOP. So that when the CHOP transformation is applied I get a kind of blobby thing. As the CHOP changes over time, the blob changes too.

How should I approach this?

PS: I don’t want to use the Noise SOP to get a blobby thing, the data in my CHOP is dynamic from an input (FFT in my case, resampled to 360 samples).

It sounds like you might want to use a SOP to CHOP → CHOP to SOP kind of approach here.

One approach would be to extract the normals from your original SOP, multiply your displacement value by the normal, then add the result to your original point position. If you need this as a SOP you can convert back to SOPs with a CHOP to SOP. You could also use drive instances directly from this CHOP data.

Here’s that example:
displace_along_normal.toe (4.0 KB)

One note here is that this works with your circle SOP’s existing normals. You can always re-arrange your SOP’s normals with a point SOP like this:\

Resulting in this:

2 Likes

You are a hero!

I’ve had some time to try this out and seems to work. Your answer helped me to find the right documentation and get it to work how I wanted it :slight_smile:

Thanks!

Glad that helped @polyclick! There are some faster ways to implement this with displacement maps on the material family, or to write a custom vertex shader.

If you’re driving instances you can also do this operation in TOPs so you can handle many more instances or points. Let me know if you need any other nudges for ways to explore this.

1 Like

Hi,
I just found this on my journey into touch designer.
I plugged your answer into a render and the line is not closed.
How can I change that?
Markus - Knoedel

@knoedel - not sure what’s different here. Checking this again, it does look like this is still working the way I’d expect:

displace_along_normal_closed.toe (4.6 KB)

If you upload your toe file I’d be happy to take a look to see what’s different.

Hi Matthew,
I have 100 divisions in the circle and used a noise to displace the normals of the circle.
I had the number of the channel samples connected to the circle (via op(‘sopto1’).numSamples) and this gave me one sample more since the number of divisions is different from the number of points…
But “op(‘sopto1’).numSamples - 1” worked fine.
Thank you for your input, it got me on the right track…
Markus