Constraining an object to a rig

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  02 February 2013
Constraining an object to a rig

Sorry to post this one--theres a ton of threads like this, and several ways to do it, but looking to find the best solution.

I have a small object that is free-floating which eventually lands on a particular spot on a rigged object. Its not a character---its a sort of complex protein (medical stuff).

Once the object lands on the larger object, I want that object to stick to its surface, so as the larger object bends and changes shape (via its joints) it will move accordingly.

Basic stuff, but still giving me a headache..

Here are the options I'm aware of.
I could:

A. Just drop the small object as a child beneath the particular joint that will move it.

B. Use a constraint tag. Theres a clamp function that allows me to choose surface or point, but not getting good results.

C. I usually use the point node in xpresso for things like this, but that doesnt handle rotation, just position. I can sometimes update rotation using the point normal port linked to HPB of the small object but not exact enough.

D. Polygon node? not working for me.

E. Could just make a poly selection and use matrix or cloner object to lock a clone to it.

F. One of the deformers?

Whats the best way to go?
  02 February 2013
I would use the spring constraint, Joel. Just animated the strength up when you want it to "stick" to the surface.
C4D R14.034 Studio/MacPro/8gbRAM/Snow Leopard 10.6.8
"Yeah, it could be anything, but it's got to be something!"
  02 February 2013
Thanks for the suggestion ernia.

I havent looked at the spring mode (not for a while at least).
My only question would be how to lock to a particular point so it adheres to the surface normal as well.

I just did this test using a matrix object locked to a poly selection of a deformed object. Then using a single clone to lock to that matrix object. Only awkward part is animating the clone.

Will look again at the constraints now...
  02 February 2013
Using Clamp constraint utilizing a poly selection and setting that to surface mode works...however, there is quite a bit of lag. The object isn't locked to the poly/normal direction.

"Align": is set to "Normal" and use normals and lock position are checked.

Tried adjusting the tag's priorities and placed the object low on the OM list.
Also tried point caching the rigged object.

Still getting lag.

The mograph method seems to be working best so far.
  02 February 2013
Pumping out a dozen mograph clips on a daily basis,
many of the C4D tools are the base of most of them, sadly
90% of the work can not trust the broken priority options
of many of the native tools, constrains being one of the worst offenders.

The sooner you can take a few weeks getting into basic scripting/expressions,
getting control of basic animation functions, the better.

MSA | OSX | xfiles ...Cinema4D Tools
  02 February 2013
Thanks Lennart. Good advice.

And good to know there are issues there and its not all me.
  02 February 2013
SURFACE deformer may work, depending on he mesh it lands upon.
1berto Rodrigues
  02 February 2013
Thanks olrgpin

I was going to try the surface deformer too. There are some issues with that one that make it not the best choice for what I need to do, but will try anyway.
  02 February 2013
One other option is the CD Nail constraint in the CD Constraints plugin. I use it for things like attaching face sculptor control objects to a morphing face and that kind of thing when face rigging (similar to how people use Follicle nodes in Maya, my 'Lowman4D' face rig uses several of them). I find it works pretty consistently even if the mesh it's attaching to is deforming. The native Clamp constraint should work too, but it's not as easy to work with in my experience (the CD Nail has attach/release buttons and the object doesn't even have to be directly on a surface to be nailed to it) and was buggy up to R14 (it would act weird with rotation as you mentioned).

  02 February 2013
Thanks Brian

I dont have cactus dans tools. I dont do much character work. If I did, it seems like I'd need to purchase it--as I've noticed many here find it a better alternative to the native character tools.

As mentioned above, I have tried the clamp mode, but I get lag and the object isnt perfectly "nailed" to the surface.

Appreciate the input.
  02 February 2013
Yeah, that's the thing with the native stuff sometimes, it can be tricky to get the priority right, this is compounded by the fact that we don't have priority control access to lots of the deformers and effectors in Cinema. I've requested that we get more control, hopefully in a future version.

Re CD constraints, it has many uses outside character stuff, for me it's well worth the $50, it's paid for itself many times over even in just time saved and bugs avoided .

  02 February 2013
what if you added a 'phantom' joint to the chain that's unseen by the weight tag and PSR constrain to that?
  02 February 2013
Thats a good idea! Thanks for that. Will give it s shot. And for the record--the object I used in my example was vastly simplified. Its pretty complex and the several sticking objects needs to lodge into a specific grooves and stay locked.

Nonetheless, your idea should work.
Attached Images
File Type: jpg Screen Shot 2013-02-19 at 3.54.25 PM.jpg (70.7 KB, 23 views)
  02 February 2013
Have you tried the parent constraint? Seems to me you should be able to animate the object into position and then turn on the parent constraint (constraining to the appropriate joint).
  02 February 2013
Originally Posted by AdamT: Have you tried the parent constraint? Seems to me you should be able to animate the object into position and then turn on the parent constraint (constraining to the appropriate joint).

Hi Adam--thanks

I did try that--I dont remeber exactly what the outcome was---maybe will try again.

I need the connecting object to lock to a specific spot on the mesh. (actually, many such objects at different locations)

As mentioned above--I've used the point node to do this but rotation becomes an issue.
I've used the clamp constraint using a poly or point selection but I get lag and incorrect rotation. Mograph seems to work well.

demafleez suggests adding joints into the rig that are there solely for the purpose of being there for the object)s) to bind to. I have yet to try this.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 02:04 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.