Morphing Pointclouds Transition

Hi everyone,

I’m working on a project in TouchDesigner and I want to switch between different point clouds, with a smooth morphing transition instead of a hard switch. After morphing to a different pointcloud, it should stay for at least a couple seconds.

I was already able to achieve a transition between the pointclouds by connecting them to switch tops and creating a slider comp, where I’ve put this expression into value: (math.sin(absTime.seconds * 0.09) + 1) * 4.
This achieves the pointclouds switching automatically, but it all happens to fast and when ever one pointcloud has formed, it almost immediatlly switches to the next one.

I tried using a Timer CHOP, but I’m not sure how to properly set it up so that it automatically increments the slider every 10 seconds.

Also it is pretty buggy so far, as my computer is not able to render it fast enough, is there a way to optimize it?

I will be adding a screenshot of my set up. Any help would be greatly appreciated!

Thanks! :blush:

Hi @KRISANDERS,

switching, morphing, and holding might be nicer to setup with the help of a LFO CHOP, a Count CHOP and a Filter CHOP.
You can connect the output of the LFO CHOP to the first input of the Count CHOP and see the increase happen in regular intervals. Now switch the LFO CHOP to a Pulse type and set the Frequency parameter to 0.1 to have the Count CHOP{ increase it’s value every 10 seconds. You can now also change the Limit parameters on the Count CHOP’s Count parameter page to zigzag between the number of inputs in your Switch TOP.
Next append a Filter CHOP and set the Filter Width parameter to the length of the morphing you’d like to see. Append a Null CHOP and reference the Index parameter on your Switch TOP from this operator’s channel.

For optimizing the performance, check how much GPU memory you are using with all the TOPs in your network. There is also a chance that your GPU might be running low on power from rendering it all.

There is an article on our wiki going through basic optimization techniques that might proof helpful:

cheers
Markus

Thank you so much, it seems to work better!!

Is there also a way, to create a loop? So it starts again, after reaching the last pointcloud. As to right now, it stops switching after the last one.

Also, it seems as if its holding on the wrong value, is there a way to fix this?

Hi @KRISANDERS,

for looping this becomes a bit more tricky but solvable.
Unfortunately the Switch TOP currently has no way to loop back from the last to the first and interpolate, so we have to build that by ourselves.

For this we need to attach a Level TOP to each input and control the brightness before adding them all together with a Composite TOP.

To control the brightness in a loop, we can employ the Fan CHOP with it’s Fan Out feature.

Check out the OP Snippets of each operator to see in what situations they might be used.

cheers
Markus
TOPBlendFan.tox (1.3 KB)

PS: just for reference, a similar approach on blending here just with SOPs instead of TOPs: How to continuously "rotate" a set of given 3d models - #2 by snaut

AMAZING, this works! Thank you!!

1 Like