PDA

View Full Version : control object constrained to arc/sphere/surface

 frilansspion08-03-2010, 01:56 AMhey there! Im poking around for different techniques for general rigging; and I was wondering if anyone knows any good technique for having a control object move, in real-time, along an arc, along a sphere or along a surface? I mean that the actual control sticks to the surface as you move it, not just something being aimed at. I know you can use the geometry constraint for surfaces, but this is pretty advanced, and I reckon heavy, to move along something mathematically simpler like a sphere or arc? is there any other, faster, way? as for the purpose its mainly just to have a nicer way of rotating certain controls without switching from the move tool.
mduvekot
08-03-2010, 03:00 AM
Use the geometry constraint. I don't see any noticeable delays on a +20K mesh. Or point constraint something to an IK handle on a single joint.

frilansspion
08-03-2010, 03:11 AM
so its actually pretty fast? I wasnt so much thinking of its performance over a high res mesh but if I had 10+ on a character. but yeah, maybe its not a problem!

thats a good idea! hadnt thought of that. it may not stick to the "sphere" while moving but it snaps right back. I may go with that if no other options. thanks for that!
/m

Kinematics
08-03-2010, 10:50 AM
Interesting enough. I was asking something along those lines on the forums. Take a look at the file. I am using the single joint with IK method that Michiel suggested. Technically you could scale the X axis of the joints to increase the size. of the radius to match ur surface.

Hope it helps somehow. =)

http://forums.cgsociety.org/showthread.php?f=7&t=906915

frilansspion
08-04-2010, 07:27 AM
yes thats some other good stuff there - adding a shape to the handle to move it without a constraint.

scale? you can just change the translate x of the child joint as any joint length surely?

Kinematics
08-04-2010, 08:12 AM
Yes that is what I am doing. Right now I am just trying to find a way to lock the shape controller to the length set by the bone joint.

frilansspion
08-04-2010, 09:03 AM
I dont get it. the handle snaps to the end of the joint even if you change the length, dont it? it does for me.

Kinematics
08-04-2010, 10:41 AM
Well yeah if I scale the joint in the appropriate axis. It scales the handle accordingly. The issue comes about when I have someone grabbing the "instanced" shape controller to move the camera around. If it stretches further then the joints length. It then just stays there and tries to reach the target. Ideally, I'd prefer them 'feeling' the limitations in reach when grabbing that controller.

frilansspion
08-04-2010, 11:20 AM
I guess you want the same thing I was talking about above - to have it lock to that rotation in realtime as you drag it about. that would be neat, eh...hmm! tricky stuff.

Kinematics
08-05-2010, 03:53 AM
Trickier then I thought really. I thought this would be a one day rig. Damned it. I hate it when I budget my time wrongly. Anyone here has any advice?

frilansspion
08-05-2010, 04:13 AM
but mate. you were only doing a pretty simple (not as in easy I mean. but you dont need 10s or 100s of constraints?) camera rig, right? so you could just use a nurbs sphere with the radius the same as your joint/object, and then geometry constrain a locator/handle/whatever to it. cause that gave the behaviour I wanted, but I felt there must be something computationally simpler. (like a "visual" quaternion object if that makes any sense. or something)
although the animation curves the geometry constraint method produces are a bit confusing and strange to edit since they are pre-constraint translates...(but the ik handle method should suffer from similar problems?) maybe one could make a system where you move the object with the constraint and then what you key is just the rotation. depends on how important the curves are for you and how you work maybe. Ill think about it some more.

BoostAbuse
08-05-2010, 06:58 PM
hey there!
Im poking around for different techniques for general rigging; and I was wondering if anyone knows any good technique for having a control object move, in real-time, along an arc, along a sphere or along a surface? I mean that the actual control sticks to the surface as you move it, not just something being aimed at. I know you can use the geometry constraint for surfaces, but this is pretty advanced, and I reckon heavy, to move along something mathematically simpler like a sphere or arc? is there any other, faster, way?

as for the purpose its mainly just to have a nicer way of rotating certain controls without switching from the move tool.

There is the Point on Poly constraint in Maya 2011 that will allow you to attach an object to a component of a mesh (face, edge, vert) and then offset it along the U and V parameters. I've found it works quite well for doing facial controls for rigging and doesn't get as bogged down if you were to use lots of rivets. The only issue I know of with it is if you are following along a path and start to approach the end of the UV's it will snap off because you've reached the end of the data the constraint uses to read from.

The geometry constraint is good but it's prone to a lot of hopping and jumping which is why we put Point on Poly in for 2011 :)

frilansspion
08-06-2010, 12:39 AM
I dont currently use 2011 (2009 still) but Ill keep that in mind for when I do! thanks a lot!

hopping and jumping you say? like how do you mean? when its interpolating across or if the geometry is a bit funky (as you can tell Ive not that much experience with it) - or do you mean it happens all the time regardless? the use Im thinking about involves pretty smooth surfaces mainly...and from what Ive tested so far Ive not really picked up any jumping. but Id rather know about it before I actually use it in a rig of course...=)

rasamaya
08-06-2010, 08:49 AM
Try the new soup scripts. The author has been very generous.
It should be a fresh thread in dynamics.
I was just using one of his shelf items for this.

You could also use a follicle parenting technique which also UV info, i think the script is called polyonsurface.mel at the area. I will probably have to correct myself later.

BoostAbuse
08-07-2010, 05:59 PM
I dont currently use 2011 (2009 still) but Ill keep that in mind for when I do! thanks a lot!

hopping and jumping you say? like how do you mean? when its interpolating across or if the geometry is a bit funky (as you can tell Ive not that much experience with it) - or do you mean it happens all the time regardless? the use Im thinking about involves pretty smooth surfaces mainly...and from what Ive tested so far Ive not really picked up any jumping. but Id rather know about it before I actually use it in a rig of course...=)

Ah with 2009 there's the closestPointOnMesh and closestPointOnSurface that will give you roughly the same result but can be rather crude in setting it up. Last I remember they were included in the bonus tools as plug-ins but I believe there were devkit samples that you could compile as well.

I've never had any luck sticking an object to a mesh using the geometry constraint as if it's a deforming mesh I find the constraint tends to hop around and not stay fixed. In production I always used rivets or follicles to attach stuff to surfaces if needed which if you're using tons of them can bog down the scene but was always the most precise way to attach objects for me. At least with the rivet I knew if I riveted the object to the exact face of my mesh it would adhere through the entire deformation process... I didn't have the same luck years ago when I looked at geometry constraints in production (I had to attach 1200 suction cups to 10 tentacles of a gigantic squid).

frilansspion
08-09-2010, 01:46 AM
ok mate, thanks! thats good to know...maybe Ill steer clear of them geometry constraints then. thank god you had trouble with your octopus. =)

Ill look into rivets and soup and stuff then. (tried a little bit of the soup but the way it derives the rotation seems a little bit funky to me? its not constrained in the U - V direction like I had expected? on the other hand I could create over a thousand constraints without lag so thats good!)

CGTalk Moderation
08-09-2010, 01:46 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.