Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice

Tutorial: Best way to import 3ds max models

Discussion in 'External Tools' started by SmoKingHasher, May 12, 2017.

  1. SmoKingHasher

    SmoKingHasher

    Joined:
    May 5, 2016
    Posts:
    1
    Hello all,
    Professional software developer here:

    Intro:

    Here is my workflow to get 3ds max models to match unity's coordinate system perfectly. This workflow provides the best results for the programming side of things.

    Step 1:
    In 3ds max: Rotate your model so that the forward direction is Z-up. Also make sure that the top of your model is facing Y-up. The "floor" of your model will be on the x axis.


    Step 2:
    Reset the x-forms of your model. After doing this: your model's rotation will become 0,0,0.



    Step 3:
    Collapse the x-forms modifier to get it out of the way.



    Step 4:
    Rotate the model back into place so that you can edit the model as normal from this point.



    Step 5:
    Export as FBX and set the up axis to 3ds max normal up axis of z-up



    Step 6:
    When you import your model into Unity, you'll notice that your model is facing positive z: the forward direction in unity.



    Step 7:
    Test that everything is work by attaching a simple script that will move the model in it's forward direction. In my case, the arrow moves forward.



    Conclusion:
    I hope this is helpful for everyone. I believe this is the best workflow to get models into unity as it makes 3ds max conform to the unity axis system. By doing this, all component functions and variables should work out of the box: such as Transform.LookAt and Transform.forward.

    Thank you all,
    Brandon Hasher
     
    nirvanajie, Radishface and asdzxcv777 like this.
  2. Radishface

    Radishface

    Joined:
    May 4, 2017
    Posts:
    12
    This is very helpful, thank you!
     
  3. Ogdy

    Ogdy

    Joined:
    Dec 26, 2014
    Posts:
    17
    For people who want to have their Y / Z orientations issues fixed directly in Unity, here is a code snippet that could be very useful :
    https://bitbucket.org/snippets/ogdy/7exEjz

    This script was made for my personal use case, where I use Blender' .blend files and Unity and the method above can't be applied.

    It will simply adapt the mesh during the import phase, fixing orientation issues and eventually some other stuff.

    In my case, I always apply the same default material (instead of Unity's default material) and I don't use normals from Blend so I can juste recompute them in Unity, but in most cases you'd have to flip normals like I flipped vertices coordinates.

    I don't know how it would behave with animations, but I guess if there is any issues this could be fixed as well in the same fashion.
     
    Last edited: Dec 5, 2018
    cdr9042 likes this.