constraint:condir & condof Clarification/Example

   6956   5   4
User Avatar
Member
30 posts
Joined: Oct. 2011
Offline
The help card is confusing regarding the use of condir&condof. I'm trying to limit the axis of rotation on a contraint.

condir: Class-Point Type-Vector
If the number of constrained degrees of freedom is 1, this value defines the normal of a plane that the object can move along or rotate in. If the number of constrained degrees of freedom is 2, this value defines an axis that the object can move or rotate about.


condof:Class-Point Type-Int
Identifies the number of constrained degrees of freedom for an anchor (0 to 3).


I've taken the chain example scene: (…/examples/nodes/dop/constraintnetwork/Chains.otl)

and set s@constraint_type = “all” , as I want the position constraint as well, with just modifying the amount of rotation freedom.

I just cant seem to wrap my head around the help cards explanation though. condir looks up conof's integer value from 0-3? How does condir define the vector value with a conof's value of 0 or 3, as it only mentions 1 &2 ?

Lets just say I want the constraints to limit the rotations on the chain to 15 degrees in all axis, how would I go about write the condir and conof attributes, in a new wrangle node? Is there any examples with the proper use of these attributes?

Cheers
User Avatar
Member
951 posts
Joined: April 2008
Online
I am also looking for a clarification of those attributes.

Anyone?
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
8595 posts
Joined: July 2007
Online
without trying it looks pretty self explanatory
condof:
0 -> 0 axis constrained = free movement so it probably ignores condir
1 -> 1 axis constrained = free to move on the plane perpendicular to condir or rotate in
2 -> 2 axes constrained = free to move along or rotate about the condir axis
3 -> 3 axes constrained = not free at all = completely constrained

but I guess for your needs (15 degrees about any axis) you'll probably need to use Cone Twist Constraint Relationship and just drive it's parameters with corresponding prim attributes on your links
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
951 posts
Joined: April 2008
Online
Thanks for the explanation but how do I use it with bullet? I tried to use it in a sop solver with the constraint network but it doesn't seem to work at all, maybe the question more like how do I use it than what it does.

Do you have an example?

Thanks.
https://vimeo.com/user2163076 [vimeo.com]
User Avatar
Member
30 posts
Joined: Oct. 2011
Offline
Thanks Tomas,
That makes much more sense looking back on it.
ConeTwist constrain was what I was after, didn't end up using condir.
Cheers

If anyone is interested here is my messy scene, with bullet/conetwist:

Attachments:
coneTwist.v04.hip (175.1 KB)

User Avatar
Member
951 posts
Joined: April 2008
Online
Thanks for the file Alex it really helps a lot!
https://vimeo.com/user2163076 [vimeo.com]
  • Quick Links