Jump to content

Sop To Dop Rotation


watson

Recommended Posts

Hello, thanks in advance.

I've been trying to do something I fear is probably very simple yet nothing I've attempted has worked, I'll spare you the details.

Anyway, I'm attempting to sim feather motion on a head but it doesn't turn as the head turns. It wobles and bobles and moves around the head but doesn't rotate with the head (when head faces back feather should face back). IMPORTANT detail is that it needs to get its rotation data from a geometry sequence, in other words it needs to get its rotation information from points. The EXAMPLE transform with RY animated is only for this simplified version.

So how do I go about rotating the feather via point movement.

Thanks for the time

w

feather_example_01.hip

Link to comment
Share on other sites

The reason your constraint isn't working is that it depends on an attribute, by default called "goalpoint", being there to define which point on your glue object that it should attach to. You didn't have that attribute. I've added the SOP that creates it, which is in the yellow network box.

Hey Craig thanks for the responce and example, that confuses me a little cus I had a goalpoint attribute, its in the feather network, and it seemed to do what its supposed todo. That aside: What the system is still missing is tha ability for the feather to face the same direction as the sphere/head, it rotates around the head but does not turn with it, ie. when sphere faces back so does feather, this is not happening yet, I'd love any ideas as to how to make this happen, one idea was to simulate how maya would do it using pin constraints, I'm still working with that idea but have not had success yet. I'm also currious about DOPS/ConstaintTools/Anchor: Object Space Rotaion, whats it do??? I love this program but man I wish there were more example files.

Thanks again

w

Link to comment
Share on other sites

What was missing from the hip file was an attribute on the base telling the feather how it should be oriented. This can be accomplished by creating either an orient attribute (a quaternion) or an up and an out vector. The latter approach I find a little easier to understand, so that's what I did in the attached file. First I create a normal attribute. Then I set the up vector to (0,1,0), and the out vector to the same as the normal. The way the wire glue orientation constraints work is to assume the wire geometry faces down the +ve z axis, so I added a node to reorient the feather. And there you have a feather glued to the sphere point.

Of course feathers don't really stick straight out, so you can either adjust the out attribute, or just bypass the rotation of the feather and you can get a look where the feather is more tangent to the sphere.

I hope this gets you up and running...

As for your question about the object space rotation anchor, the way constraints work in DOPs is that there are three components: the constraint relationship, the current anchor, and the goal anchor. The anchors are just data that calculate a value. The purpose of a constraint is to make the two anchor values satisfy the relationship. So imagine an rbd object pinned to the origin. The current anchor would be an "object space position" anchor, which calculates a value that is the world space position of a particular point in the RBD object's space. The "goal" anchor would be a world space position anchor which always returns (0,0,0). The relationship between these two anchors might be a "hard point" relationship, which means that the two anchor values must be equal at all times in all three dimensions. In other words, the object space location specified in the current anchor should always be set such that the anchor calculates a world space position of (0,0,0) - the goal anchor's value.

So an object space rotation anchor is simply a piece of data that calculates a world space orientation given an orientation expressed in the local space of a DOP object. This can be combined with a relationship to another anchor (which may be another object space rotation, or a fixed world space rotation). These three pieces of data tell the solver that it should adjust its objects (change their orientation) such that the two anchors satisfy the relationship.

Also note that the relationship may not be absolute. Rather than saying that the two anchor values must be equal, it can specify a spring such that the solver is expected to exert a force (that scales with the squareof the distance) that pushes the anchors values towards each other, but doesn't require that the anchor values be equal.

I don't know if that long winded explanation cleared anything up, bt hopefully with the working hip file, it doesn't matter if you're still confused by the anchors. Unless you need to design a new type of constraint (which hopfully you don't because the wire glue constraint give you a _lot_ of control), you should never have to use that node.

Mark

feather_example_03.hip

Link to comment
Share on other sites

You Rock Mark, I really appreciate the depth you went into in your response, I'm on day three on DOPs and your explanation goes a long way to making things more clear. Admittedly I'll be reading your response several more times to gleam all that I can from it, but your example file hits it on the head and is as clear as day, thank man.

Cheers

w :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...