Sunday, September 28, 2014

Import to Unity 3D


This is part 2 of the turtorials on how to use my modular blends found at Blendswap (http://www.blendswap.com/user/Daniel74/blends)

Part 1

First of all I have to say that this might not be the best way to do it, but it's a way that works at least.
I wont write all the details on how to handle Unity since that's covered in so many other places.

So this is how I do it:
  1. Create a folder in the Unity 3D project that's called <Project>/Assets/Objects
  2. Put all the exported FBX-files in that folder. A material folder will be created automatically in Unity. (Image 1 & Image 2)
  3. Create a folder called <Project>/Assets/Prefab (Image 3)
  4. Create a folder called <Project>/Assets/Texture 
  5. Copy all the textures needed into this folder. I'm not sure how it will work when the textures are part of the blend-file as is required on Blendswap. When I do this I have the texture files not being packed with the blend-file. (Image 4)
  6. In unity go through all the objects and set the scale factor to 1 (Not sure why it's defaulted at 0.01!). Also check Generate Colliders so that it's not possible to walk through the objects when running the scene. (Image 5)
  7. Create prefabs of the objects.
  8. Place the prefab in the scene.
  9. Select the prefab in the scene and open it up by clicking on the down arrow.  (Image 6)
  10. Select the subobject that you want to change.
  11. If you want to hide the subobject then click on the little checkbox left of the name in the inspector. (Image 7)
  12. If you want to change the material then drag and drop one of the existing materials onto the one already attached to the subobject. It's also possible to create a new material and use that instead. (Image 7)
And that's how it's done!

Image 1
Image 2
Image 3
Image 4
Image 5
Image 6
Image 7

1 comment:

  1. Hi Daniel, I always select an object, bkey box select the rest then ctrl-j join all, you
    just have 1 mesh, fewer draw calls.
    https://sites.google.com/site/terrymorgan1213

    ReplyDelete