Trying to understand importing obj & textures

I can’t reproduce this on the playground as it’s specific to a zip file of assets purchased from sketchfab.

I was working on trying to recreate this space
My download included a zip file containing
and what I assume are 4 texture files in .jpg format:

I imported my .obj as a collection of meshes, this gives me the framework of the 3d asset.
I first tried adding each to what seemed like the obvious material property,
diffusionTexture = diffuse
emissiveTexture = emission
reflectionTexture = metallic (hoping this would give that black ‘shine’ i see in the demo
bumpTexture = roughness

This gave me a near super white everything, i think it has something to do with the reflectionTexture, seems that should be an alpha channel map, rather than a 2d plane of black and white

I did some trial and error, and got pretty close to the final render I was trying to recreate by creating a new standard material and added (respectively)
diffuseTexture = diffuse
ambientTexture = metallic
bumpTexture = roughness
lightmaptexture = emission

But this still doesn’t actually give me all of the solid black reflective surfaces I see in the asset demo.

I also tried using the .mtl file, as it seemed that was designed to be some sort of ‘map’ of how these assets were supposed to go, but haven’t gotten a definitive result.

I wanted to ask if this is a common way to use babylon, (purchasing a 3d asset from a third-party), and should I expect that I can import these files into the right properties, in the correct manner so that I can recreate what I purchased?

I don’t see a way to add pictures here, that may help, I can host them on a different site if needed, but
I’m just not familiar with 3d assets, and any help would be welcome.

Hello and welcome!

I would recommend to use glb (also known as gltf - glb is a binary representation of the gltf file) format which includes all the textures needed to correctly render the asset in BabylonJS. I am not a Sketchfab user but probably it should have an option to export the asset into one glb file.

If that’s not the case it’s quite easy to import the file into Blender and if every file is correctly named and in the correct folder it will map the textures automatically. All you have to do then is to export to glb.

As @roland said, you should use the glb or glTF export (I can see on the page you linked that this asset can be exported to these formats).

The standard material in Babylon.js does not support metallic/roughness textures, only the PBR material does (and exporting to glb / glTF will create PBR materials in Babylon).

1 Like

Thank you for the quick response, I’ll take some time today to try and let you know how it goes.

1 Like

Need to do some continued adjustments onlighting, but I think I got it
Thank you both, again.