Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Blender environment to Unity

Discussion in 'Asset Importing & Exporting' started by NvdL, Mar 19, 2017.

  1. NvdL

    NvdL

    Joined:
    Feb 22, 2017
    Posts:
    14
    Hello all,
    I've created an environment/game in Blender and I would like to convert it to Unity for further development. The environment consists of more than 200 objects. I know that it is possible to import single objects and to assign textures/materials by hand but given the large amount of objects I was hoping there is a way to avoid all this manual import + material assignment.
    The materials/textures in the Blender environment are very simple. All are simple image files (i.e., in the Blender game there are no lights and all textures are baked (so .jpg's).
    I tried exporting the environment as fbx and then importing it into Unity. When doing this, only one texture was imported correct (see the grass in the image), one texture was assigned to the wrong object (tiles on the walls) and all other textures were not imported.
    I have read other threads about importing from Blender to Unity but I have not seen anyone else with these problems. Does anyone have advice on how to convert a large blender environment to Unity without too much manual work?

    Thanks a lot in advance!
    Best,
    Nynke
     
  2. FreeFly90

    FreeFly90

    Joined:
    May 28, 2016
    Posts:
    177
    I'm not sure what could be causing this, but at first I'd check if every object has a unique material with a Unique name in blender.
     
  3. Cygon4

    Cygon4

    Joined:
    Sep 17, 2012
    Posts:
    382
    Blender has two independent material systems:

    • Textures assigned in the UV/Image editor panel
    blenderuvimageeditor.png
    These are shown when the viewport is in "Blender Render" mode (top toolbar) with the "Multitexture" material mode active
    blenderrender.png
    blendermultitexture.png

    • Texture assigned via the Materials panel
    These are shown a) when the viewport is in "Blender Render" mode with "GLSL" material mode or b) when the viewport is in "Cycles Render" mode (if you created cycles materials).
    blendermaterials.png

    From past testing, Unity / the Blender exporter seems to prefer the materials assigned in the materials panel and falls back to the UV/Image editor texture name if no material is assigned.

    Try checking how your Blender materials are assigned. I recommend using the Materials panel exclusively and removing any UV/Image editor-assigned textures by switching to "Blender Render" and "Multitexture" mode, then selecting all faces and clicking the 'X' near the texture name in the UV/Image editor panel.
     
  4. NvdL

    NvdL

    Joined:
    Feb 22, 2017
    Posts:
    14
    Hi,
    Thanks for your responses. When I switch to Blender render and GSLS, all textures are visible so that should not be the problem.
    As you see in the screenshots below, these objects have one material/texture and this is a image.

     
  5. zakdank

    zakdank

    Joined:
    Jan 25, 2011
    Posts:
    46
    May not be what you are after but you can just import blender's native file format (.blend) straight into unity. Assuming the materials have the same names, you can use the import menu on the model to import the textures.