- Home /
Importing .obj from Maya - mesh invariably called "default"
So, I'm using Maya as a modelling program, and I've been having this issue for a while. So far I've been able to ignore it, but as the number of different meshes racks up, it's becoming more and more of a problem. It seems that no matter what I do, Unity always imports the mesh as a prefab, containing another prefab and the mesh itself. However, both the contained prefab and the mesh are named "default", and I cannot work out how to change this. I really need to be able to give my meshes sensible names, because when selecting a mesh in the inspector, it is these that show up, which means I have a selection of many different meshes, all named "default". I'm not sure what I'm doing wrong, but I can't work out where it could be getting this from, as as far as I know, Maya has not named anything "default". Could anyone tell me how I can set the names of meshes I export from Maya? Or how to rename existing meshes in Unity?
i have the same problem. I drag'n'dropped the prefab to the screen, named it to something else, gave a mesh collider with the "default" mesh and made a prefab from it. So I have a prefab with different name. BUT you have to keep the original prefab because it stores the mesh.
Yeah, that's exactly what I've been doing, but this isn't an answer to the question. The problem with this approach is that, when selecting meshes from a list (for example, for custom $$anonymous$$eshColliders), they all appear under the name "default" and it can get difficult to find the exact mesh you need.
Answer by Animatics_3D · Apr 06, 2014 at 08:32 AM
Hey You can Rename your mesh in Maya before export it to .obj,As follow..
select your mesh in maya and go to outline and rename your mesh which you required .
export it to .Obj .
you will get which you required
I am Attaching screen shots of maya and unity ,you can check it .
You specify .obj here, does this apply for .fbx as well? A few of my models require features not supported by .obj.
The solution sugested here didn't work for me. I've already renamed the mesh in the outliner and it is still called default in Unity. Also when I export as fbx, the mesh is named correctly. Am I missing something?
Just use FBX. Its the recommended format and I'm sure Unity likes to convert them all to FBX anyway. Don't quote me on that ~:P
Answer by Olninyo · Jan 09, 2015 at 06:06 PM
ok, so I think I found a partial solution for this:
When exporting an .OBJ from Maya, in the export dialog box there are some options.
If you turn on the 'Groups' option, export your mesh, and import into Unity you should find that the submesh has taken the name based on the hierarchy of your scene.
That doesnt allow you to name it separately from the mesh when theres only one mesh in the export but it may be different for exports with multiple submeshes.
This works for me, using $$anonymous$$aya LT 2016
Answer by $$anonymous$$ · May 30, 2017 at 08:32 PM
This has to do with the 'group' header inside the OBJ file. If the mesh is saved with groups, it will give each group a name and Unity will load those names inside the main OBJ in the Project view.
You can choose the option to save the mesh with Groups on in both Maya & Blender. Or you could manually inspect the OBJ file (open it in any text editor), and add a group name, e.g. here's a simple cube OBJ (Note the line starting with 'g' -- that's the group label):
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v -0.500000 0.500000 -0.500000
v 0.500000 0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v 0.500000 -0.500000 -0.500000
g pCube1
f 1/1/1 2/2/2 4/4/3 3/3/4
f 3/3/5 4/4/6 6/6/7 5/5/8
f 5/5/9 6/6/10 8/8/11 7/7/12
f 7/7/13 8/8/14 2/10/15 1/9/16
f 2/2/17 8/11/18 6/12/19 4/4/20
f 7/13/21 1/1/22 3/3/23 5/14/24
If you save the above text as an OBJ file and load into Unity, it should load with the mesh object called 'pCube1' instead of 'default'
Your answer
Follow this Question
Related Questions
Maya import. 1 Answer
How to import a mesh NOT as a Prefab 2 Answers
Import mesh with submeshes from OBJ? 2 Answers