Search Unity

Question Importing an OBJ model but can't access parts of it

Discussion in 'Asset Importing & Exporting' started by arielmalka, Nov 17, 2022.

  1. arielmalka

    arielmalka

    Joined:
    Nov 3, 2022
    Posts:
    4
    Hi,

    I have exported an OBJ file from Blender. It is a car with a lot of parts. For example: "wheel_FL".

    When importing into unity, I can only see a single transform named "default" under the newly imported model in the scene hierarchy.

    Note: I know that the OBJ model is not "flattened" in some way, because I'm able to access all the parts via some C++ / OpenGL code of mine.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    can you show screenshot (from hierarchy), or share simple example .obj file that does that?
     
  3. arielmalka

    arielmalka

    Joined:
    Nov 3, 2022
    Posts:
    4
    The OBJ file in question is here. It's not a super simple one, but I don't have any other...
     
  4. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    ok yeah seems to come as single object.. (and interestingly 3ds max & meshlab fails to read that OBJ)

    playing with those export group settings helped, then you get separate objects it seems:
    upload_2022-11-17_23-34-21.png
     
  5. seantigert

    seantigert

    Joined:
    Nov 16, 2022
    Posts:
    7
  6. arielmalka

    arielmalka

    Joined:
    Nov 3, 2022
    Posts:
    4
    The OBJ file I provided is not a single object. As I said, I'm able to parse it with C++ as multiple objects. And also with three.js...

    But I admit it can be a problematic file. So I will try to play with the
     
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,411
    yeah your file has the object lines
    upload_2022-11-17_23-50-14.png

    on the grouped export, it has groups (which seems to help?)
    upload_2022-11-17_23-52-18.png
     
  8. arielmalka

    arielmalka

    Joined:
    Nov 3, 2022
    Posts:
    4
    Thanks mgear
     
  9. seantigert

    seantigert

    Joined:
    Nov 16, 2022
    Posts:
    7
    Your welcome.