Control Instances Attributes in Copy POPs

Hi everyone,

I’m working with POPs and I’m trying to understand the best way to control copied geometry instances independently.

My current setup is something like:

rectangle1 → copy1
line1 → copy1

So I’m using a Line POP as the template/source of points, and a Rectangle POP as the geometry being copied. This gives me multiple rectangle instances along the line.

What I want is to control each copied rectangle attribute independently.

Conceptually, I understand that the copied rectangles are driven by the template points, so I assume the solution is probably to create or modify attributes on the points before they go into the Copy POP.

What is the usual POPs workflow for this?

Would you use attributes on the template points? A Noise POP? Math/Mix operators? CHOP/DAT-driven attributes? GLSL POP? Something else?

Any examples or minimal network suggestions would be very helpful.

Thanks.

Hello,

Wiith copy POP, you can add scale, or rot attibute and use it as template.

Butt I prefer to use instancing in geometry where do you have much more possibilities for multdimensional scale, color, rotation, texture etc.

Here is a quick example with both solutions.

Hope that helps,

Jacques

copyVSInst.toe (4.5 KB)

and for some more examples on how to use Copy POP and controlling the transform of each instance, also see Help→ Operator Snippets → POP → Copy POP

Thanks, that helps.

I understand the procedural variation approach using attributes, Noise POP, lookup textures, pointscale, etc.

But what I’m looking for is a way to address each copied instance individually.

For example, if I have 20 copied rectangles, is there a way to get a stable index/ID for each instance, so I can drive instance 0, 1, 2, etc. with specific values?

Would the usual POPs workflow be to create a custom point ID/index before the Copy POP and use that to control each instance?

Do you want to drive each Copy/instance to do what?

That is the most important! With attribute and Instance, you can change all what is available in instance pages plus what you can write in GLSL mat (Vertex/Geometry/Pixel shaders). What else ?

well good to realize is that for anything you want to happen to a copy/instance (and this is valid for both approaches; Copy POP and Geo Instancing) you’ll need to provide that information upstream(=before) from the Copy POP or Geometry COMP, not afterwards.

And yes you can address each instance individually. The order in which copies/instances are created is always the same as the order in which template data is provided by you, so to change instance 5, apply your desired data to the 5th datapoint you send to Copy POP / Geometry COMP.

And as always in TouchDesigner there are dozens of different ways to provide that data, and from any operator family. Which one is best for you probably depends on your usecase, and where your data for each instance is coming from (is it coming from CHOP/POP/TOP/DAT, do you want manual control, is it static, animated, etc). If you can be more specific in what your end-goal is we can give a more specific example.

for some more inspiration also see Operator Snippets, the instancing examples under the Geometry COMP.

Thanks everyone for the helpful insights.

I have this scene where I’m copying several body geometries along a Line POP, and I need to change attributes of specific instances. For example, the third copied body should be higher than the first one, another one should have a different scale/rotation, etc.

So I’m not only looking for procedural/random variation across all copies, but a way to address specific copied instances and assign values to them individually.

Also, what would be the best POPs workflow to copy more than one source geometry? For example, if I have 10 different body poses/geometries, how can I distribute those different bodies along the same template points, instead of copying only one body everywhere?

Thanks.

Hello,

You can change individually each instance using choptopop POP and mathmix POP to combine attributes. In geometry COMP instance page, you can affect attribute to any available parameter. With GLSL MAT you can make more complicated compute.

Here is a quick example where you can edit a table with each line corresponding to each instance

Considering different structure, you can use an attribute to set group number and at the end, use delete POP to separate the groups and use a geometry for each structure instanced by each group.

attributeSetting.toe (4.5 KB)

3 Likes

and for the fun, an augmented version with different object and different textures managed by the same table

attributeSetting.3.toe (6.2 KB)

1 Like

This might be useful. Showing how to create attributes or use groups to have control of specific inputs through the copyPOP. There’s also an exmaple of how to use the templateID attribute to stamp an id to each copy. I skimmed the post so may have missed if someone already mentioned this but thought I’d share anyway

CopyAttributes_example.toe (9.5 KB)

1 Like