Blender Submeshes

Discussion in 'External Tools' started by Ajaxamander, Nov 11, 2006.

  1. Ajaxamander

    Ajaxamander

    New Member

    Joined:
    Jul 5, 2005
    Messages:
    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

    Member

    Joined:
    Apr 30, 2006
    Messages:
    5,420
    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...
  3. Marble

    Marble

    Member

    Joined:
    Aug 29, 2005
    Messages:
    904
    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. DynamicHead 1

    DynamicHead 1

    Member

    Joined:
    Jun 30, 2006
    Messages:
    234
    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

    New Member

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

    the_Simian

    New Member

    Joined:
    Mar 13, 2011
    Messages:
    33
    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. Fishman92

    Fishman92

    Member

    Joined:
    Feb 9, 2010
    Messages:
    2,529
    Ouch, nice 5 year bump.

    .....


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

    the_Simian

    New Member

    Joined:
    Mar 13, 2011
    Messages:
    33
    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
    Messages:
    25,208
    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