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 Submeshes

Discussion in 'Asset Importing & Exporting' started by Ajaxamander, Nov 11, 2006.

  1. Ajaxamander

    Ajaxamander

    Joined:
    Jul 5, 2005
    Posts:
    36
    I made a big ol' mesh in Blender, and then decided that I should apply different textures to different parts of it in Unity. I went back to Blender and used "Split" to create (I thought!) submeshes.

    However, when Unity reimports the .blend file, there is still only one object and one mesh listed in the Project hierarchy, and I can't texture them separately.

    Am I skipping something obvious, or is there some other piece of the puzzle I'm missing on the Blender side?
     
  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Hmmm... Not sure about "split", but if you select the faces you want in a new object in "Edit Mode", then go to "Vertice" => "Separate", that will create a new object with just those faces. You can use this to break your mesh into several pieces and apply different materials to each in Unity. Is that what you are trying to do?

    EDIT: Ok, I just figured out what you were doing. AFAIK Unity can only assign one material per "object" in Blender, so you have to break your mesh into separate objects using the method I described above. What you were doing was to use the "Split" button in the "Mesh Tools" panel in Edit Mode. "Split" separates a group of faces from a mesh, but it still remains part of the same object. I hope I explained this well enough as it's probably a little confusing trying to understand the difference between the two. Basically "split" breaks up a mesh, but it remains part of the same object. "Separate" breaks up the mesh into separate objects. Hope this helps...
     
    Genyus5 likes this.
  3. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    For those 3d apps that can create multiple UV sets for their meshes, what's the performance advantage in having multiple materials on one mesh compared to multiple meshes each with their own material. I ask because I'm rubbish at creating "atlas textures" and sometimes default to making unique textures for, say, the floors, walls, doors, etc. of a building.
     
  4. VeganApps

    VeganApps

    Joined:
    Jun 30, 2006
    Posts:
    263
    I run into the same problem with Blender. I wonder if this is a Blender internal problem or a problem of the .blend-importer of Unity.
    Would be interesting to know...

    I also like it much more to "split" the UVs.
     
  5. Ajaxamander

    Ajaxamander

    Joined:
    Jul 5, 2005
    Posts:
    36
    Thanks BK! That's exactly what I was trying to do. It totally works now.
     
  6. the_Simian

    the_Simian

    Joined:
    Mar 13, 2011
    Posts:
    37
    Does this mean that in order to say, apply a different wallpaper material, you'd have to make each face a totally new object? I'm new to blender, and I'm finding doing this makes the sheer number of objects overwhelming...

    or shoudl i be UV unwrapping a building, all its walls and floors...?
     
  7. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Ouch, nice 5 year bump.

    .....


    And yes you would have to make a separate object for each.
     
  8. the_Simian

    the_Simian

    Joined:
    Mar 13, 2011
    Posts:
    37
    thank you fishman :)

    i have one more noob question.

    I have imported my asset - its a building. all the materials are being assigned to the right parts. However, not textures are appearing. I am reassigning them to the materials in unity- and there they are in the unity editor. They are diffused bumpmaps, so there are two images per material. pulling them right out of filter forge. the diffuse is the color info, and the bump is that blue-hued image. They even appear correctly in the unity engine's details pane - that is: they are projected onto the sphere that shows your material.

    but when you put it in the game? it only shows the base color. The textures don't appear on the face of the asset. I can adjust the color.

    the asset comes from the raw .blend file. perhaps i am overlooking something foolish?


    EDIT: I found the answer.. its very stupid actually.

    .. I needed to add UV information. I was able to see it all in the preview but since it had no UV info, wouldn't work. Every tutorial i find covers like, irregular objects - I'm looking for stuff for like, walls in a building. I thought you only had to unwrap complicated shapes, but even a simple plane needed it... I simply did it for each object... took a while. Does anyone know of a way to unwrap every object at once, simply to add the UV information? Is this pretty much how its done? Seems tedious.
     
    Last edited: Apr 15, 2011
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    No, you don't need a separate mesh for each material; the point of submeshes is that you only need one mesh. The performance is basically the same as if you used multiple meshes, but it's more convenient. Assign a different texture to different parts of the UV map in Blender (you don't need to split anything), and then you get one material in Unity for each texture. As for the "base color" thing, you have to UV map the mesh in Blender to begin with.

    --Eric
     
    marcospgp and RisingDead_xTR like this.
  10. TMPxyz

    TMPxyz

    Joined:
    Jul 20, 2012
    Posts:
    766
    To make use of submesh in blender, just assign different materials on faces;
    e.g.: Assigned 5 materials on models
    upload_2016-3-26_19-35-31.png

    And later in Unity, you will get several submeshes, could assign separate materials for them;
    upload_2016-3-26_19-37-40.png upload_2016-3-26_19-37-55.png
     
    the_unity_saga and sky_haihai like this.