- Home /
can't see obj file
Hi
I imported an OBJ file into Unity. When I click on it in the project tab, I can see the wireframe of the mesh in the inspector (although the orientation does not seem right). But when I drag it into the scene, I can't see anything. As you can see from the screenshot, transform is ok; I zoomed in and out, changed the scale. It has mesh renderer and mesh.
What can be the cause of this? thanks
Answer by The-Evster · Aug 18, 2016 at 12:53 PM
Export your models as .fbx files instead
Any better option? I receive those files. If I didn't have to convert them that would arrange me. I'll accept the answer if no one has a better one...
Can you see other obj files in your scene?
Double click on the model to zoom to it. If you can see it now, probably the center of the imported obj-file is (very) far off, so it isn't in the center of the scene but "miles" away.
If that is the problem, try
Vector3 l_center = gameObject.GetComponent<Renderer>().bounds.center;
transform.position -= new Vector3(l_center.x, l_center.y, l_center.z);
in a script added to your model.
Thanks for this! You've really saved the day. I have a similar question if you'd like to post the same answer, I'll make sure to mark it.
Answer by SohailBukhari · Mar 27, 2017 at 02:14 PM
If You are sure that the Import Settings of the object are OK, then common causes for invisibility of object in the scene are
would be a scale issue. Try selecting one of your objects in Unity and hit Shift+f to see if anything shows up.
If not scaling issue then export your model as .fbx files.
Your answer
Follow this Question
Related Questions
Reimport destroyed .obj file submeshes? 0 Answers
How to export .OBJ from Editor with rescaled mesh? 1 Answer
Empty triangles when loading 3D model with > 65.534 triangles 1 Answer
Modify a mesh- or just a txt file- in real time? 1 Answer
Tool for exporting mesh to stl/obj/fbx in runtime(android) 0 Answers