The object is completely different to expected


I have created a material in Blender. Because it is procedural I have baked Normal and Diffuse maps and imported them in a new material so that it can me exported as a GLTF file.

Then I check the file in Sandbox. It’s not too bad but still looks quite dark for me. I thought that lighting will fix the problem.

When I import the mesh to the webpage with lighting/camera it looks completely different to what I expect. The object itself is quite dark, but where the light reflects from it, object becomes too bright (even though light intensity is quite high) and you can barely see the texture.

So I am wondering where is the problem. Is it Blender and texturing issue? Is it Babylon scene? Is it export problem?

Have also attached the picture from Blender to see how I expect it to look like.

GitHub link

adding @PirateJC

Hey @Raam

How are you exporting out of Blender? Using the build in exporter?

When I open you glb file in the sandbox, it doesn’t appear to bring in any lighting with it.

That’s the first thing I’d check.

In order to export lights and cameras, you have to expressly select them in the exporter options in Blender. For some reason “Export Selected Objects” doesn’t actually export the camera and lights. You have to check them individually in addition to selected objects.

I’d start there and see if that has any affect.

1 Like

Hey @PirateJC Thanks for response.

I am using standard GLTF exporter from Blender and exported as GLB file.

If you check the sandbox again you will find an object “Area” in the root directory. That was meant to be the area light. (Now I assume area light does not work in Babylon)

I have added testBox2 file with a punctual light. It looks a bit better, however if you look from the top, you will see white reflection on the surface, what makes it difficult to see the object

@Raam : I downloaded your zip file and took a look at its contents. I’m curious about the Blender material you have which seems to contain a displacement node (red highlight). And you somehow get the data for it from either the normal map or the diffuse map - hard to tell. (see image below).

I also loaded your GLB file into the sandbox - your model is a simple cube. I’ve no idea what the GLB exporter does with this, but typically such displacement maps are applied to models that have been subdivided a few times - not simple cubes!

And did you try varying the other parameters ?

Welcome to the forum @Raam :slight_smile:

Stay Safe, gryff :slight_smile:

Material Nodes:

The displacement map is another parameter I have tried. In blender it seems to work, however when I try sandbox, I can barely see any difference. In caprture1 you can see original material, but in sandbox its quite different… But anyway, that’s an optional detail.

But if you check the html file (which looks quite different to sandbox) you can see that the model is extremely bright if you look at it from certain angle. But from another angle it looks alright. And if you zoom it out the model looks blurry and cant see any detail…

So any suggestions to improve that model and make it more “readable”