Search Unity

Problem with importing .OBJ

Discussion in 'Editor & General Support' started by bigkahuna, Sep 5, 2006.

  1. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I created a simple mesh, UV and texture in Wings3D and imported it into Unity. The mesh imports fine, but the UV's seem to have been lost. If I import the same model into Carrara 5 Pro, it works fine. Not sure if I did something wrong or if it's a bug. Attached is a zip file with the model.
     

    Attached Files:

  2. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
  3. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Thanks Jon, bummers :(

    I guess the work-around is to import the file into Blender and save as a .blend before importing into Unity.
     
  4. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    At the moment when exporting an obj file you have to export an mtl (material) file for the uv coordinates to come through.

    Can't wings 3d export to fbx?
     
  5. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Wings exported a .OBJ, .MTL and .PNG file, but still no UV info in Unity.

    Well I thought it did (I haven't played with Wings in a while), but apparently FBX support isn't in the current OSX Macintel build.
     
  6. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
    When I import .blends, the UVs get assigned to the wrong places, and some of the models' faces disappear. :M
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Hmm...I've imported dozens of .blends, and they all worked fine, so I suspect that some of your normals are flipped. If you turn off double-sided drawing in Blender, it's easier to see when you're having normal problems. (As opposed to abnormal problems. ;) ) Or turn Draw Normals on in edit mode.

    --Eric
     
  8. AaronC

    AaronC

    Joined:
    Mar 6, 2006
    Posts:
    3,552
    Somtimes in Maya I find theres the odd triangle that doesnt render in Unity, but I guess if I tidy up my geometry modelling that will go away-and of course checking normals
    A
     
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    On second thought, I do remember having a bit of a problem with one of my .blend files not importing 100% correctly. Converting quads to triangles fixed it though. Apparently Unity and Blender don't quite always agree about the best way to convert quads, so if you force the issue in Blender then it doesn't leave any room for misinterpretation.

    --Eric