Jump to content
Sign in to follow this  
iline

Meshing Gears: Getting Up to Speed: Dynamic Radian Offset Nightmare

Recommended Posts

Screen-Shot-2015-02-06-at-5.42.00-PM.png

 

I have no idea how to neatly move pink onto purple without the teeth intersecting, how to make the pink rotation wait until the correct contact with purple's teeth (on the sides, not the top of the teeth) before picking up purple's rotation.
I've tried almost everything except cold hard mathematics and COFFEE nodes.

The rotation speed is the major thing. Need to evaluate the radians of the purple per turn. That's easy, that's just a rangemapper on Modulo set to radians. How do I then set 3 ranges (between each of the three teeth) which are clear for the Pink to enter and mesh with the purple? Or am I thinking far too complex?

 

any ideas? Douwe? Base80?

Share this post


Link to post
Share on other sites

I'm not quite sure I understand the issue/question.

What's supposed to happen when they connect together….do they both continue to rotate? at the speed of the purple one?

….or are they supposed to lockup and stop?

 

How would it work in the real world?

Share this post


Link to post
Share on other sites

It's a real-world object, which is why I can't really cheat. But you're right, once the teeth of the purple wheel collide with those of the pink, the assembly is meshed and the pink is driven round by the purple.

 

For a very good reason, the teeth are far apart so that if the motor is put into reverse, there's an impact when the teeth collide.

 

Doing this with Simulation tags looks like a horrible job, but it might be the only way to get a reliable collision detection for the teeth instead of trying to calculate a floating offset.

 

At the moment the pink wheel snaps back to its original offset when it detects the purple wheel, and that's bad, or else the teeth intersect.

Share this post


Link to post
Share on other sites

Probably a stupid question, but why is manual animation out of the picture? I'm sure you have your reasons, but I'm curious because I'd be interested in what you are doing if its not for a typical video piece.

 

I'd love to poke around a project file if you can provide one... I'm trying to learn more about rigging things in a smart fashion with xpresso and things as it seems you are attempting to do.

Edited by AromaKat

Share this post


Link to post
Share on other sites

Have you considered doing a rigid dynamics tag with "follow position/rotation" set to a low value ….you might be able to get the collisions you want but let the expresso or manual animation drive the turning etc….(just a thought).

Share this post


Link to post
Share on other sites

I've tried putting the dynamics tags on. I was using them on Ghost to be able to read the collisions inside of xpresso's Mograph nodes, but it wasn't really useful. I suppose if there are no collisions that's fine, I need to stop the two intersecting and yet be totally under my control and I can't remember how to use Follow Position/Rotation. Wish I'd started making tutorials years ago, I'd have remembered.

 

What I have to figure out, in the next 20 hours, is how to move the child gear towards the parent gear. If the top edges of the gear collide, the child gear stops, waits for the tooth to clear its way, then move into position for the next tooth to mesh with it, and then the child gear receives the rotation of the parent.

 

So. Child gear moves -------->| to position along X.

 

On the way, if the teeth of the two gears collide, the child gear has to stop its X-axis movement and wait for a gap in the traffic.

 

Once no collision between the teeth is detected, the child gear moves into resting place along X and waits for the teeth of the parent gear to mesh with it and it rotates with the parent.

I'd love to rig this with inertia too so once you disengage the child gear it spins down.

 

Probably a stupid question, but why is manual animation out of the picture? I'm sure you have your reasons, but I'm curious because I'd be interested in what you are doing if its not for a typical video piece.

 

I'd love to poke around a project file if you can provide one... I'm trying to learn more about rigging things in a smart fashion with xpresso and things as it seems you are attempting to do.

 

Aromakat: The project file is huge, I could extract the drivetrain layers if you're interested. It's really similar to the power tool I was working on this time last year. It is fun rigging all this in xpresso, I think I've done a good job so far, it's just this one thing that really does not make sense.

Manual animation is out, I want to crack this as I'm rigging the tool for someone who can't make xpresso and is disinclined to keyframe more than the userdata HUD I give him.

Share this post


Link to post
Share on other sites

I wanna talk to people who are at the coffee/python end of the c4d learning spectrum. I know I could do this in coffee but I lack the time to download the SDK and leaf through for hours. I'm on a rented computer and with a morning deadline, I am going to have to bite the bullet and do it manually.

 

To those asking why I couldn't just do it manually, well, the whole point of this technical rigging is to get a hugely complicated high-res CAD model to animate simply. The guy I'm handing off to is not a technical guy. I'm the technical guy. So on a point of pride I wanted to nail this, instead of emailing loads of instructions about what objects to key, search for, root through a 500-item hierarchy for. I'm doing the keying now, but even that I am building a neat HUD slider for that will do several things at once.

 

I just had an idea: Cmotion. You can program a list of executables in Cmotion. hmmm

Share this post


Link to post
Share on other sites

There is this cute little thing called the Constraint Tag. Make friends with it. Nobody in technical animation cares to animate stuff the way how it actually works in reality. It's always forward kinematics vs. inverse kinematics, gear rotation driving axles and engines and so on. And a mere 500 items? Most of my CAD models had more nuts and bolts on a minor sub-assembly.

 

Mylenium

Share this post


Link to post
Share on other sites

I get that, but there are a few problems with parent constraints, as you may well know. They don't evaluate so well above 500 rpm!

 

Animating the strength of a parent constraint, with a nice user data float slider to the constraint's offset (to make sure the teeth don't intersect during the mesh) seemed like the way to go. Add to that then the client came back and said no, the second toothed wheel actually rises up during transmission and pushes the whole assembly back.

 

So I kinda need to work out how to only parent them together if the axes are aligned. In this case, there are three 'axes'.

My thinking was that you can do an if/else here.

 

If you set a perpetually-spinning object as the input port of a Range Mapper set to Radians and Modulo, it goes 0-6.28 forever and ever.

The forward edge of the teeth of the child are located 0.8, 2.9 and 4.8 radians (this is obvs relative to rotation).

 

So the child clutch plate will wait until the parent clutch plate reads out one of these values, at this point will engage.

 

{

if (parentRot.P=0.8)

if (parentRot.P=2.9)

if (parentRot.P=4.8)

}

Clutch Plate Constraint Tag (driving Rotation.P) = ENABLED

{

else (Clutch Plate Constraint Tag (driving Rotation.P) = DISABLED)

 

Does this ring any bells anyone? Man being an 'xpresso pioneer' is a really fucking lonely place.

Edited by iline

Share this post


Link to post
Share on other sites

Sad thing is Mylenium, I am 'in' technical animation now and they won't let me use Maya. Next week, a weed whacker and leaf blower. yay

 

(actually that's easy money)

Share this post


Link to post
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.

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.

Sign in to follow this  

×
×
  • Create New...