Jump to content
agharraph

Copy SOP and Rotations

Recommended Posts

Hi everyone. I'm hoping one of you clever people will be able to help me with this little problem I'm having.

 

When copy-stamping objects onto some animated points, the copied objects are transformed along with the points, but they do not fully respect the rotations.

 

I have a feeling the solution will require a vopsop, with some kind of vector math to get Y normal rotations, but my knowledge of vector math is very limited and I'm struggling to find an elegant solution.

 

I've created a simple scene to demonstrate the issue. You'll see that the teapots do not rotate along with the grid that they are copied onto.

 

Any help would be much appreciated!

rotNotWorking.hip

Share this post


Link to post
Share on other sites

Hi loudsubs, thanks for the quick reply!

 

Your solution works for the example scene I provided, but is easily broken if the rotation is adjusted in the xform, for example setting it to << -50, $FF, 50 >>

Share this post


Link to post
Share on other sites

Here it is working. the problem was that the up vector was not getting updated by the rotations.  You can see this by looking in the details view, or by creating a custom attribute to visualize.

rotWorking.hip

Share this post


Link to post
Share on other sites

Hey thanks loudsubs! That's definitely working better than before.

 

Though I can't get it to work if I use a scatter after the grid GEO.. any thoughts as to why that is?

Share this post


Link to post
Share on other sites

If you look at the attrib reorient help card, it says that it only works with polygons.  That's why it breaks when using scatter.  Here it is working with scatter.  I need to do a little reading on why it wont work using the orient attribute, but at least it works using N and up.

rotWorking1.hip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×