MX Bikes Official Forum

Mods => Bikes => Topic started by: 𝖙𝖋𝖈 on July 09, 2018, 05:20:36 PM

Title: Animated Parts Tutorial
Post by: 𝖙𝖋𝖈 on July 09, 2018, 05:20:36 PM
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:

(https://i.gyazo.com/0f289ba1f07c2fee9e9e7bba953afff9.png)

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:

(https://i.gyazo.com/2765e4cc37b2a35246429cdb09a53190.png)

These cables are parented to the front suspension:

(https://i.gyazo.com/0c695ebc5691aafd846d648a5bd0722f.png)

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!
Title: Re: Animated Parts Tutorial
Post by: philiaN on July 09, 2018, 06:47:09 PM
Thank you so much tfc :)
Title: Re: Animated Parts Tutorial
Post by: 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?
Title: Re: Animated Parts Tutorial
Post by: 𝖙𝖋𝖈 on July 09, 2018, 09:13:05 PM
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  ;)
Title: Re: Animated Parts Tutorial
Post by: giopanda on March 29, 2020, 09:43:54 AM
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
Title: Re: Animated Parts Tutorial
Post by: 𝖙𝖋𝖈 on March 29, 2020, 10:54:20 AM
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.