Load OBJ/FBX to Babylon

I have a Issue uploading a model to babylon im really new with it and I’ve been trying to upload my model , and when I upload a obj , it doesnt load his textures , so converting a fbx into a glTF it doesnt load the textures too.
Im using a FBX2glTF to convert my model.

Hey and welcome!
where do you try to use it? in your own code, sandbox?

if sandbox, you can either convert your gltf + textures to glb or make sure to drag and drop all textures alongside your gltf

By my own code. Btw I tried to upload this model Tree and ground textured Free 3D Model - .obj .mb .fbx - Free3D

When I try to upload it with Sandbox it doesnt load his textures , even if I convert it into a glTF with FBX2glTF ,Im sorry to reply too late, I’ve been kinda busy lately.

Hi @roner_ortega roner, I loaded the the .obj model obtained from you link into Blender. There is no .mtl file that defines the materials which would include the textures. And in Blender - no materials are defined.

If you look at web page where you obtained the model, it says:

Textures : yes
Materials : no

So my guess would be that both FBX and glTF suffer from the same problem

cheers, gryff :slight_smile:

1 Like

Using the .fbx I was able to get (messy) materials with textures into Blender, but not by using the .obj (as gryff said, no materials at all).

As it seems you can’t drag .fbx into sandbox,

play a little with Blender to view your model (2.8 version have a gltf exporter by default, good to know).

I was ready to post this little tut below, Ieave it in case this help someone one day, but this model you want is not realtime-ready (very common - not correct scale, materials have to be simplified before exporting, tree mesh is heavy, etc. At least naming is right… but in french :smiley: ) and the gltf export can’t go to the end… You may try to read the Blender gltf doc’ to know how to setup material (just looks for BaseColor input for the Principled node, it will be enough for your case).


In case you don’t know Blender, very quick tut:

  • download 2.8 version here
  • open Blender and press A (or use the 3DView menu)
  • Suppr
  • File menu > import FBX
  • File menu > export gltf

Im gonna try with it into blender 2.8

You might also want to consider the free FBX converter. You can write an OBJ file which will create an MTL file and reference it in the OBJ. If you ever have material issues with an OBJ, always make certain there is an accompanying MTL file. Then open the OBJ in a text editor, and make certain that the OBJ file holds a reference to the MTL file in the first few lines. The MTL file will then reference your material values, as well as any image files and texture coordinates.

Galen

Well . I cant use Blender 2.8. What else could I do?
image

@roner_ortega : Here are a couple of zip files which work for me in the sandbox:

  1. A new obj/mtl file (Damm too big to post) : Ok here it is tree-obj.zip
  2. A .babylon file - also too big to post!! And the.babylon file here tree_babylon.zip

Will look for an alternative … see above links. Let me know when you get them so I can delete the files.

I have scaled the meshes(3) as they essentially would be hidden under a standard babylon cube. All scales and rotations have been applied. The .babylon file has its own universal camera in the sandbox. The obj/mtl file defaults to an arc rotate camera. - change the radius to about 30 in the tools panel.

If you need the .blend file using Blender 2.76, I can provide that. (Older versions of Blender are available from Blender). Hopefully it might work with your video card :neutral_face:

cheers, gryff :slight_smile:

1 Like

You can check Blender hardware requirement, which are actually very low. As the error said, are you sure your drivers are up to date?