Game Development Reference
In-Depth Information
Objective Complete - Mini Debriefing
Basically, what we have done here is set up the unit scale, transformed the rotaion of our
character, and exported it to a FBX format that will it with Unity's world scale and space. We
set up the unit scale in 3D Studio Max to have 1 unit equal to 1 meter and convert to meters.
In some cases, you might want to set 1.0 unit equal to 1 inch or anything else; just make sure
that when you export to the FBX format under Units , you choose the same unit that you set in
3D Studio Max and make sure that the Scale Factor equals 1.0. We also rotate the pivot of the
character 90 degrees on the X-axis to create the Y-up axis that is suitable to use in Unity.
Classified Intel
You might have a quesion—why do we need to do something like this to export the FBX and
import it to Unity? Well, this method of setup will make sure that we won't get any wrong
scale and rotaion when we put our model in Unity. Since the FBX exporter from 3D Studio
Max will convert the unit scale and the rotaion for our character, someimes we might get
the FBX ile the transformaion already atached to it. For example, if we set the unit scale
in 3D Studio Max to have 1 unit equal to 1 inch and export FBX to meters, it will work fine
in Unity; however, the start of the XYZ scale of our character might be 0.0254 (as one inch
equals 0.0254 meters) instead of 1, as you can see in the following screenshot:
This is because the FBX exporter will convert the unit in 3D Studio Max file to the unit that
we set up for export in the FBX exporter. So, we need to make sure that Scale Factor in the
FBX exporter window is equal to 1.0. Also, if we didn't rotate the pivot of the character 90
degrees on the X-axis, export it to FBX, and put it in Unity, it would sill work, but you would
see the default rotaion of the character in the X-axis as 270 degrees instead of all being 0.
Why do we need the default number to be 1 (for scale) or 0 (for rotaion)?
The answer is that when we write the script to control our model, we will
have to deal with lots of numbers. If we don't have the default seing for
the model as 1 for scale or 0 for rotaion, it can be really diicult to write
the script to control our model.
 
Search WWH ::




Custom Search