Q about rotating boxes

   1580   2   0
User Avatar
Member
109 posts
Joined: June 2008
Offline
Hi, im trying to create a circle of boxes that points to center of the circle.
I am using Copy SOP with ‘Transform using Template Point Attributes’ option ON.

I am calculating the point normals, for the circle, in Attribute VOP, by subtracting point position from constant (0, 0, 0(

My question is: why are the boxes rotating?

-Kimmo

Attachments:
ratation.hipnc (68.2 KB)
img.png (44.1 KB)

User Avatar
Member
8595 posts
Joined: July 2007
Offline
one vector doesn't define full rotation so while your N attribute defines which way points z-axis of your box it doesn't define the twist around it, hence it's unpredictable

you can add up attribute defining up-vector for your rotation, then on top of z-axis being pointed in N dir, y-axis will always lie on plane defined by N and up
(file attached)

you can as well define rotation by orient attrib, see the example on following link:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=185816#185816 [sidefx.com]

Attachments:
ratation_fix.hipnc (84.6 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
109 posts
Joined: June 2008
Offline
Haa Thank you Sir!
  • Quick Links