Cartesian Join / Multi-SOP Instancing

Hey folks,

I’ve been trying to create complex instancing systems where the points generated by one instancing can be use to instance another and then another.

Since instancing does not allow for the export of instanced points, and the Copy SOP is highly limited in the operations you can execute, I was looking to do this in the following manner:

  1. Convert two SOPs to CHOPs.
  2. Perform a cartesian join between the two CHOPs. Every x, y, and z coord from the 2nd CHOP is copied and multiplied against every sample from the first CHOP.
  3. Use the resulting CHOP as the master OP for instancing, or, use it as yet another building block to create the final master OP.

Just to give an example of what this could look like:

Use a circle with 6 points to “instance” a square that has 4 points. Now you have 6x4=24 points. You then use the 24 points to instance a triangle that has 3 points. You can either render that out… or use the resulting 72 points to instance yet another SOP.

I explored doing this by transforming the CHOPs to TOPs and multiplying, but the performance was horrible. I feel like there’s a CHOP that should be able to do this but I wasn’t able to find it.

Looking forward to hearing your thoughts.

O

For anyone wondering, the correct solution is to use the Copy SOP with fetchStamp.