Hey everyone, I’ve recently put together a car rig which seems to work in most non-extreme cases. However one thing that’s missing is automated inertial braking and accelerating.
I need access to the second derivative of an fcurve, and I’ve scoured the internet for snippets of code.
What I’ve come up with is a piece of code which adds a new function to the driver namespace. It evaluates the difference between the fcurve value at preceding frames, then evaluates the difference between the difference at preceding frames.
Basically it calculates the second derivative on a frame by frame basis. It works fine in the example .blend attached, but fails when applied to the final rig. Perhaps I haven’t tried hard enough, but I’m quite certain that if a skilled coder could have a look at this piece of code, they will find ways to improve it.
Here’s the .blend file: INERTIA EXAMPLE
To use the .blend file, all you need to do is run the script in the text editor, and update dependencies in the drivers window. The animation should then work correctly.
i already commented this on youtube… but turns out would rather post here
i am working on a car right now and i need a rig…, i had plans to learn it and all but i’m just going to watch the tutorial if you make one… the thing i was planing to do with my rig was basically make a braking system… such that either the back or front tires stop moving instantly like applied handbrake in scenes of drift… i don’t currently see such thing in yours though but you have all the other functionalities there such as ground detection and all so its cool. better than any other car rig i’ve seen so far.
OK so I rebuilt the rig from scratch and implemented a cloth-based suspension (idea from this Tiger Tank Rig). I’m currently looking at ways to allow for drifting, since it’s a bit tricky at the moment. But nonetheless, the suspension is working great now!
Alrighty here we go. I consider this rig complete. Drift control works, suspension system is working great, and the whole thing is quite simple to set up. Expect a tutorial within the next two weeks
Thanks very much for the tutorial. It’s a great reference for your new car rig. I’ve also been looking at your earlier videos too. Very helpful, thank you.