Controlling individual instances of geometry?

Hello all,

I have recently been learning the basics of python in conjunction with learning the Touchdesigner platform. I have attached a basic example of what I am trying. I have a line SOP with 4 points, which is controlling the instancing of the box SOP.

Say for example, I want to adjust the width and height of the 3rd instance of the box SOP, what is the best way of getting in and really making adjustments? I’m guessing it would be something like, converting the line SOP to a CHOP, selecting a channel and using a merge CHOP to change it. I have tried something similar to this method before but I didnt achieve success.

Any help would be really appreciated!

Thanks!

instancingEx.toe (5.1 KB)

Hi @anthonyfdunphy have you looked at the videos here about instancing:

They’re a few years old now, but still cover the basic principles. In the experimental version of Touch you can use a separate operator to set position, scale, rotation, and many other values. In the current stable, for now, you need to pack those attributes into a single referencing operator. That can be a SOP, CHOP, or DAT. CHOPs are generally the most efficient data source for your instances, but which one you choose often depends on how complex your scene is going to be. 10 or 20 instances, use source operator you want, 10,000 or more, it’s better to use CHOPs.

To get the result you want you could either pack the data about rotation into a custom attribute in your SOP with something like a point SOP, or you could convert your line SOP to another family and merge the data into that operator.

Are you wanting to just set static rotations, is this something you want to change dynamically, does it react to something else in your scene? There are lots of ways to approach this kind of question, so knowing a little more about the direction you’re moving in would help folks here push you in a direction that’s going to be the most helpful.

I’m attaching your original file with a point SOP so you can see how those values where added to a SOP pipeline.instancingEx-mr.toe (5.3 KB)

You might also look through these examples:

There’s lots in there with instancing, and hopefully those examples can help answer some of your questions.

1 Like

thanks you a lot for your job, so brillant and clear as usual !

It’s answer to a lot of questions, and open a lot new but still going on !

thank you so much !