All is in the title… My Patch is really simple : a sphere SOP (polygon mode) > Facet SOP > Primitive SOP.
I can do transformation on each poly, thanks to the primitive SOP, but rotation and translation seems to happen from world axis…
I put this expression on XYZ pivot parameters :
me.inputPrim.normal[0]
to point to each polygon axis, but obviously, it didn’t do the trick.
I bit of help please
Thanks by advance ! Mograph.toe (6.32 KB)
Maybe the problem wasn’t clearly formulated :
The polygons turns around their own axes but those ones aren’t well oriented…
I would like that each primitive (or polygons…) turn and translate around their own normal…
An other example wich illustrate the issue: if i do a translation on x axis on the promitive SOP all the sphere translate (in fact each polygon translate on the x world axis).
you first have to rotate each primitive such that they all face the same direction.
Now you apply the rotation and then rotate back to the initial normal.
This can be done via the second input of the primitive SOP.
So first I had to fetch the primitive normals and center position and convert them to an attribute I can actually pull into a DAT.
These I used to create a new geometry.
To rotate each primitive to a uniform normal, I used a point SOP on the new geometry to set a normal of 0, 0, 1. Now I used this as the second input to the Primitive SOP and used the “Rotate to Template” Parameter which I set to “Match Normals”
Next step is to use another primitive SOP to do the rotation and finally use the original new geometry as the second input to a third primitive SOP to rotate the primitives back into position.
The result is the ability to rotate each primitive as if the normal is the z axis.
It’s seems to be what i need !
Now I just have to catch what exactly happen in your patch…
I’m pretty new to TD and need some time to understand the logic…