scrolling instanced geometry


I have got some instanced geometry spread out in space and I am scrolling the instances toward the camera and trying to re-spawn them close to the camera’s far plane once they have gone past my camera. I have no idea how to do that. Should I be using python to check the z position of my instances at each frame? Is there maybe a better way to do this and avoid using python?


can you post an example tox or toe file? i’m thinking of a few ways you might do this, but it would help to take a look at the network you have already and what your method is so far.

without that, though, i’d say you don’t want to check the z position every frame, instead you might want to drive the z position with a chop, and when that chop hits a certain value, then trigger a python script. there may also be a way to do this through some parameter references and a little CHOP network that doesn’t require a script.

Initially what I was trying to do is to move the instances closer to the camera and respawn them in the distance after they go behind my camera. Kind of like a very basic start field or something, but I think my question is more generic than that because what I am trying to figure out is how to control each instance’s parameters (position, scale, …)

I have attached a sample of how I am setting up my instancing.
instancing.toe (4.13 KB)

To control rotation and scale you select a channel from your instancing CHOP in the same way as translation. Usually you’ll have to generate this data some other way, and there are many ways to do that. Generally speaking, though, you’ll want to synthesize a CHOP with the same number of samples as you have points/instances, and then merge that with your instancing CHOP. I’ll upload an example when I can, but we lost internet at the theater just in time for a 12 hour day :open_mouth: