Transforming primitives

Hello,
I’m trying to find a way to transform primitives (with unique points) independently, rather than transforming the whole geometry. See screenshot and .toe for how I do it in SOPs, and how I’m attempting to do it in POPs. I’m creating a custom attribute, but how can I use that to scale each primitive?


prim_transform_pops.toe (4.0 KB)

Hi @kskene,

currently I’d be using the Copy POP in combination with the PointScale Attribute.

In the example here using a Pattern POP to create a index attribute that can be used in the Lookup Channel POP to replace / modify the PointScale.

cheers
Markus

1 Like

We also currently have it as an RFE internally to have a way to transform prims individually in POPs, as the workaround from Markus only works when all primitives are the same. please let us know any particular features you’d like to see!
Currently you could also use the Advanced GLSL POP for that purpose if you have some GLSL knowledge, see attached toe for starting point
GlslAdvanced.toe (5.4 KB)

1 Like

Thank you @snaut! This is a great solution for scaling the primitives.

Thank you for the starting point @vincentDev ! I don’t have much GLSL knowledge, so that’s definitely helpful. It’s great that the Advanced GLSL POP allows for translate (and probably rotate?) as well as scale of prims individually, and of different prim types simultaneously. It could be nice if there was also a non-GLSL way to do translate and rotate of prims, if there isn’t already.

Indeed, we are planning on adding a non GLSL way to do this, stay tuned!

1 Like

Still no dedicated POP but updating this with a new no GLSL solution leveraging the new pointItr expression in Transform POP.

Primitive center is calculated converting P to a primitive attribute (which averages values over the primitive), then you need to convert back all the primitive attributes you want to use back to point attributes.

PerPrimTransformPOP.toe (4.8 KB)