Jump to content

How create a constraint network for simulating Car Suspensions?


mois23

Recommended Posts

On 15/10/2019 at 6:00 AM, julian johnson said:

Hi K'n'K, glad you liked it. I'm in the middle of a job at the moment so I can only give you brief pointers. You are right, though, I think it can all be done in the distance travelled CHOP. For reverse you need to establish some concept of what constitutes forwards and what constitutes reverse. I think using the tangents of the path curve and bringing them into CHOPs would be the way to do that - then compare the slope vector with the tangent vector. A dot product between the two would give less than 0 for reverse and greater than zero for forwards. Then just multiply the result of the area chop (length) by -1 to negate if you want to reverse (using the dot product to tell you whether you need to). For wheelspin I think a simple animated add to the length chop would do (for a manual spin) or using the acceleration to procedurally increase the length if it goes over a certain threshold. CHOPs are fiddly so it might take a few tries to get it right!

Thanks man but I noticed if I change the keyframe on "animation_along_path" from 1  - 240 to something else, say 200 - 440. The wheel doesnt spin as soon as it gets past frame 240.

How would I go ahead to make the wheel spin if I extended the animation past frame 240?

Edited by Learna
Correction of path name
Link to comment
Share on other sites

On 19/10/2019 at 6:49 PM, K'n'K said:

Oh nice. A simple math node with an animated "post add" works fine for wheelspins and braking. Thanks!

Please, can you guide me on how to change the start and end frame of the simulation? If I change the key frames available on the "animation_along_path" node from 1 - 240, to say 200 - 440, the wheel doesn't spin as soon as it gets to 240.

Link to comment
Share on other sites

  • 4 months later...
On 9/17/2019 at 7:13 AM, julian johnson said:

It's been a while (!) but here's an interim development of the original double wishbone chassis concept. Now you can fully adjust chassis to match car - it's all done via names - so you can transform the model in any way you like (just don't change the point numbering as constraint naming is based on point numbers). Effectively bullet is used to make the constraints easy and the only real simulation is on the wishbone springs. Wheels are pre-animated along a path and then adjusted for roll, ackerman steering angle (inner and outer wheels at different angles). Still quite tricky to adjust the sim because mass, spring strength/damping, load transfer and conetwist maximum angles are all interrelated - change one and you need to change all the others! This test Porsche is overly springy to illustrate the basic concepts at work especially the load transfer forward to back. Needs more work on rest to action transition period, too! To change the car simply bring the new car and wheels into the chassis node and swap out, make sure to transform chassis geo to fit. Change path, collision ground as you see fit....

soft2.gif

car_rig_bullet_julian.hip

Hey Julian! This is awesome! Trying to mess around with it right now, but I'm in H18 not sure if that matters and the car does not seem to want to follow the path, The sim works fine and suspension works but all it apears to do is pop up on top of the geometry and kinda wiggle for a sec, am i just an idiot missing something basic? 

Link to comment
Share on other sites

It seems to work in all versions of 18.0.x up until 18.0.499. Up until then, somehow, the Transform Pieces node could apply non-named template attributes from a single point to all four wheel points. In 18.0.499 the points have to be matched by a name attribute for it to work. Possibly SideFX have fixed a long-standing bug or broken a normal piece of functionality. No idea which :-)

 

car_rig_bullet_julian_18.0.499.hip

Edited by julian johnson
  • Like 8
Link to comment
Share on other sites

  • 1 month later...

Dear all. I tried to understand how you created this rig but for someone without any knowledge what quaternions are or how to code it's out of reach. Therefore I'd like to ask you if the final result could created without coding? Just by wiring together nodes?

Link to comment
Share on other sites

  • 4 weeks later...
  • 11 months later...

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...