Constrain to point - cannot match constraint to point and instance orientation

   1551   3   1
User Avatar
Member
2 posts
Joined: Jan. 2017
Offline
I have a problem I can't wrap my head around and would kindly appreciate any help on how to solve this:

The setup: I created a particle system, the points have an orientation attribute and tumble about. Instanced to each point are 48 objects.

The problem: I need to constrain an alembic object and camera to one of the points and match the points orientation (and thus the orientation of the instanced geometry). A point constraint works for the position. The constrained geometry also tumbles by using the orient attribute with look at mode set to ‘direction attribute from points’. However I can't get the constrained geometry to match the orientation of the instanced geometry. I tried getting an up vector from the points y axis, which didn't work either.

Am I at least moving in the right direction, or is the point constraint a dead end? Might maketransform be a solution?

Thanks in advance for any suggestions.
User Avatar
Member
8551 posts
Joined: July 2007
Online
since Points constraint is just copying what Rivet Object does, it doesn't offer more commonly used attributes like orient, so you have to decompose your orient to Y-axis for upvector and Z-axis for direction
to do that you can use following pointwrangle on your points:
v@yaxis = qrotate(p@orient, {0,1,0});
v@zaxis = qrotate(p@orient, {0,0,1});

then in Points constraint put
zaxis in Direction Attribute
yaxis in Up Attribute
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7762 posts
Joined: Sept. 2011
Offline
tamte
since Points constraint is just copying what Rivet Object does, it doesn't offer more commonly used attributes like orient, so you have to decompose your orient to Y-axis for upvector and Z-axis for direction
to do that you can use following pointwrangle on your points:
v@yaxis = qrotate(p@orient, {0,1,0});
v@zaxis = qrotate(p@orient, {0,0,1});

then in Points constraint put
zaxis in Direction Attribute
yaxis in Up Attribute

I smell an RFE
User Avatar
Member
2 posts
Joined: Jan. 2017
Offline
tamte
since Points constraint is just copying what Rivet Object does, it doesn't offer more commonly used attributes like orient, so you have to decompose your orient to Y-axis for upvector and Z-axis for direction
to do that you can use following pointwrangle on your points:
v@yaxis = qrotate(p@orient, {0,1,0});
v@zaxis = qrotate(p@orient, {0,0,1});

then in Points constraint put
zaxis in Direction Attribute
yaxis in Up Attribute

That certainly does it, thank you very much!
  • Quick Links