Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Daryl Dunlap

Constraint Network - Constraint_Type = 'rotation'

I posted this on the sidefx forums as well with no luck after 70 views.

Does anyone know how to use the 'rotation' constraint type in a Constraint Network?

Bonus Points:  How to use the condir and condof attributes as well.

Edited by Daryl Dunlap

Share this post


Link to post
Share on other sites

I have no idea if this is any use to you but here's a scene that shows condir in action (with condof set to 2). The first .gif (condir.gif) has both position and rotation constrained whilst the second has just rotation. The constraint axis is Y. In the first gif you can see how movement is only allowed along Y and rotation is only allowed around Y. If you go into the pointwrangle and change the constraint to rotation only you get the second .gif where movement is allowed anywhere but rotation is still only allowed around Y. This scene does not work properly prior to version 16.0.642 as a bug with condir was fixed from that point onwards (i.e rotation about x was the same as rotation about z).

hard_hinge_daryl.hip

condir.gif

condir_a.gif

1 person likes this

Share this post


Link to post
Share on other sites

If you switch the condof to 1 and constrain both rotation and position you're limiting movement to anywhere in the plane whose normal is y (which is why in the .gif below you can see the box only moves along x and z) and you're limiting rotation to any rotation axis that can sit on that plane..

condir_b.gif

hard_hinge_daryl2.hip

1 person likes this

Share this post


Link to post
Share on other sites

I haven't had time to explore the rest but you would imagine that a condof of 0 would allow the object to go anywhere and a condof of 3 would constrain it completely but, hopefully, with this scene you can check that all out.

Share this post


Link to post
Share on other sites

Awesome examples, thanks for taking the time to make those!

Share this post


Link to post
Share on other sites

After playing with this scene for a couple hours....I really love the flexibility this attribute based system provides.  It makes me wish there was something similar in CHOPs for SOP constraints.  CHOP Constraints just seems weird after understanding Constraint Networks in DOPs.

What really made it clear for me was the Constraint Relationship Guide - set it to a primary color, move to Frame 1, and then change the constraint_type, condir, and condof attribute values - the Constraint Relationship Guide actually updates to display different Guide Geo based on these attributes.  Makes it super clear why things are responding they way they are to forces.

Edited by Daryl Dunlap

Share this post


Link to post
Share on other sites

What I'm STILL not crystal clear on is the relationship between the Anchor + Constraint + Constraint Relationship.

Is it:  I can have an Anchor, and an Anchor has a Constraint Type/Direction/DOF, and an Anchor Constraint can have a Relationship to one or more Anchor Constraint(s)?

edit:  I read the Docs one last time....summarizing: A Constraint is made up of (2) Anchors defined by a (2) point polygon.  Each point in the polygon is an Anchor that can define a type/direction/dof.

Edited by Daryl Dunlap

Share this post


Link to post
Share on other sites
2 hours ago, Daryl Dunlap said:

 I read the Docs one last time....summarizing: A Constraint is made up of (2) Anchors defined by a (2) point polygon.  Each point in the polygon is an Anchor that can define a type/direction/dof.

Exactly. In the example below the position and rotation constraints have different condofs...

walker_c.gif

walkerc.hipnc

Edited by julian johnson
6 people like this

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