Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Runtime OBJ Importer, texture missing

Discussion in 'Scripting' started by SVKsuli, Dec 10, 2017.

  1. SVKsuli

    SVKsuli

    Joined:
    Mar 23, 2014
    Posts:
    63
    Hello, i use this free .obj importer script from asset store, it work exactly how i need but without textures, i try to use google to solve this problem but without results. i understand that, funcion LoadOBJFile() create Meshes, that work right, next it call LoadMTLFile(), this call script TextureLoader() which they create together material. But i dont know whats wrong.
    Object that i try to import have unitypackage file which when i import manualy to editor work right and when i compare it with imported .obj file i see counts and color of materials is right but name is different and textures is missing.

    I dont have any experiences with creating 3d objects and how their files work, then maybe i miss something trivial.

    PS: I will not give the whole code here because its free and it have together 600+ lines, only when somebody need it.
    PPS: I dont want to pay for profesional version i just need easiest way to import just one format of 3d objects.

    Thx for any help :)

    Update:
    Yes and i forgot, some .obj files have textures but missing some rendered walls, maybe i need just correctly created model?

    Update 2:
    Always i solve my problem after im pushed to create threat on forum... i download different free 3d object that work perfectly.
    Then my question is different... how can i know which object work correctly and which not, and what is differences between .obj files when some work right and some not?
     
    Last edited: Dec 10, 2017
  2. jayampthi

    jayampthi

    Joined:
    Apr 27, 2021
    Posts:
    3
    Hi, I know this is a very old post but could you please tell me what worked. I'm having trouble with some objs too
     
  3. SVKsuli

    SVKsuli

    Joined:
    Mar 23, 2014
    Posts:
    63
    Uf sorry thats a long time, im not sure how far i get with it, if i solve it somehow. But i will say that when you working with importing 3d models, its good to learn how to create them, use blender for example, create your own model so you know what you did and you can see when model works and when not... now im out of pc for a week so i cant check it closer
     
    jayampthi likes this.
  4. jayampthi

    jayampthi

    Joined:
    Apr 27, 2021
    Posts:
    3
    ahh thanks for the reply, problem is I'm developing an app which allows users to upload models to a server and then it allows to see them in the app. If some objs work and some don't, it can cause many problems. I'll look into blender to get some insights