• Welcome to MX Bikes Official Forum. Please login or sign up.
 
March 28, 2024, 10:01:35 AM

News:

MX Bikes beta18j available! :)


Animated Parts Tutorial

Started by 𝖙𝖋𝖈, July 09, 2018, 05:20:36 PM

Previous topic - Next topic

𝖙𝖋𝖈

July 09, 2018, 05:20:36 PM Last Edit: July 09, 2018, 05:37:03 PM by тғc
This has been requested by a couple of people so here goes:

Animated bike parts are exported using named objects. For one object, let's use the rear shock for example, you would create two versions of the shock - One compressed, one uncompressed. Both will be exported together as part of the bike and the naming convention will dictate how they animate.

My rear shock included the linkage attached to the rear swingarm, so thats quite a few different meshes I've animated in one go. In the picture below, you can see how there are two versions of the shock together:



You can name the shock whatever, I've called mine 'spring' so the uncompressed version is called spring_shapeanim0key1, and the compressed version is called spring_shapeanim0key0

My shock objects are parented to the Chassis object. When this was explained to me it was said that the shock objects should be parented to the rear suspension. I guess it works both ways, but if they're parented to the rear suspension then key0 and key1 might need to be the other way around.

Same for the front cables. My cable is called 'cable', so when the suspension is compressed I have cable_shapeanim0key0, and when the suspension is uncompressed (extended) I have cable_shapeanim0key1:



These cables are parented to the front suspension:



The way I figured out where these cables will be, was after the geometry was complete I bottomed out the bike in game and took a screenshot. I moved the suspension to the same point in Blender and modeled the compressed suspension version on that. It might sound kind of sloppy, but it was actually pretty accurate.

Note: Once you're animated parts are on, you will no longer be able to load your geometry into BikeEd. It doesn't make a difference to the geom though, so make sure you have a version without animated parts you can use if you need to update geometry.

You can do brake cables left and right when you steer too, to simulate cables being stretched and relaxed when steering. To do this, you'd create three different cable models, say for full lock left, center and full lock right. You'd call these something like cables_shapeanim0key0, cables_shapeanim0key1 and cables_shapeanim0key2. These would need to be parented to the steer object. I've not done these though so can't comment on how it works.

Now, select your entire bike including both rear shocks and both front cables and anything else you've animated, and export the whole lot. FBX2EDF will merge both objects into an animated part.

Thanks to PiBoSo for enlightning me with this information. I believe Snappe is supposed to be releasing an up to date bike template including animated parts, but until that happens I hope this helps some people out there!

philiaN


PizzaChet

Another awesome contribution! Does the animation morph between the 0 and 1 positions? You don't add the in-between frames?
Quote from: YodaIf no mistake have you made, yet losing you are ... a different game you should play.

𝖙𝖋𝖈

Quote from: PizzaChet on July 09, 2018, 08:36:29 PM
Another awesome contribution! Does the animation morph between the 0 and 1 positions? You don't add the in-between frames?

Correct, I think it's called a shape key animation, although this is my first experience of it  ;)

giopanda

sorry to revive this old thread but i think it's useless to start a new one..

so basically what you need to do are the two 'extremes' of the animation (suspension fully compressed and fully extended for example) and place them in the correct position in relation to the chassis and the swingarm, right?

and what about lods?
you just create them for every piece (chassis, steer, susp etc) included the shapeanims (key0, key1 etc)?

sorry if this sounds obvious but you'll never know :D

thanks

𝖙𝖋𝖈

That's right gio, two extremes. And as you can see think about what the object is attached to - For example, the lower suspension moves so the cable needs to be part of it.

As for the LOD's, I have no idea I'm afraid. I didn't do LOD's for my models and I don't think others did either.