How can I make and control multiples of this .tox

Hello,

I am trying to make a bunch of 2d lines move across the screen. Currently, the crawlers move in an upwards and right direction, but eventually they will move with other behaviors.

My question is simple, how can I create hundreds of these crawlers and control their animation via python scripts. I can’t seem to wrap my brain around how to have a dynamic amount of SOPs inside a GEO that is rendering out. The crawlers will not always be straight, so their geometry needs to be able to be individual.

Two more things:

  1. How can I make their overall length longer without being tied to speed?
  2. How do I stop the flicker?
    crawler_scriptSOP.tox (5.06 KB)

I continued to dig and while I can’t seem to figure out how to manage large amounts of SOPs with changing geometry, I did stumble on perhaps why the line is flickering. I ran into this post from 2014: derivative.ca/Forum/viewtopic.php?f=4&t=6107

This post shows another example of a flickering line while using the LineThick SOP.

From what I can tell, the line keeps flipping the inside vs outside of the curve. This causes the flicker. I have included .toe (modified from the linked post) that illustrates this issue.

I was able to determine this by adjusting the settings of the LineThick SOP so only the inside of the curve was being extruded.

Does anyone know how to force a line to maintain an inside/outside curve relationship relative to the camera?


lineflicker_additionalTesting.toe (5.67 KB)

I did not mean for the image to be that giant. Sorry about that.

Try this: Send your Trail CHOP directly into a Limit CHOP. Set its X Y and Z Channel to x y and z. Set its Output Type to Strips or Tubes.

You can continue to use python to manipulate your data, but you may want to use the Script CHOP to work in CHOPs. Up to you. But many things you would do with python you can do with native CHOPs and SOPs, so I would look at the Help → OP Snippets for ideas. What you are doing in your script is kinda like what the Math CHOP does - adding 2 vectors together.

g

Hello Greg,

Thanks for your reply. Your solution worked pretty good, though it was a limit SOP not a limit CHOP that I connected my trail CHOP into.

Now that my crawler does not flicker anymore, is there anyway to draw hundreds of these guys? I tried to use instancing, but I can’t seem to gain access to each instances individual geometry. As in, I want to control the different points of the “line” that builds the tubes. Some of the crawlers will be straight and others will be bent at times. Instancing seems to take oneset of geometry and multiply it, allowing you to change position, rotation, scale, and color.

I am looking for a way to generate hundreds of these independent crawlers, that make all different manner of movements. They are kind of like snakes, generally speaking they look similar, but the way they move causes them to have a unique set of points that define their geometry.

I hope I am making sense with my question.
Cheers!