Export from Blender3 to Babylon Js to get texture and lighting results

I exported a model from Blender using both .gltf and .glb When rendered my model looks clean with good lighting.

I then import this into Babylon.js and it looks flat nothing like the render in Blender.

From the Blender export I select Data: Custom Properties & Punctual Lights. From Geometry I se;ect, Apply Modifiers, UVs, Normals, Vertex Colors.

In Babylon js I use a HemisphericLight only.

Any idea what I’m doing wrong?

Did you try to put your file to the Sandbox and how it looks there?

Yes I also put it in a playground here: https://playground.babylonjs.com/#8LFTCH#1012

I improved your PG a bit - https://playground.babylonjs.com/#8LFTCH#1016
What I can say:

  1. The model is too big (128 Mb). I believe that such a model shouldn’t weight more than 20 Mb if you aim to real time render.
  2. GTLF doesn’t support environment export, so you need to create this in Babylon.
  3. There are a lot of conflicting planes. I fixed the floor (which doesn’'t blink anymore) but are you sure that you’ll need the outer floor to be shown to somebody? If not, just delete it.
  4. Here are a couple of helpful links: What are the best practices for environment meshes made for Babylon? and Optimizing scenes for better WebGL performance - Soft8Soft . Hope it may help :slight_smile:
1 Like

Awesome let me jump on this and review this. THANK YOU!!!

1 Like

Hi! Thanks for all the helpful tips. I went through this model and fixed a bunch of things. The model is down to 27 megs. I had a question not sure if you can help me with them.

  1. This is a screen shot of the render: 2022-01-27_14-11-00
    The model shows the roof displaying two sections on the ceiling but on the babylon js it only shows one part. It appears that the ceiling is somehow being morphed to change on half the model.

  2. Why does the ground blink on and off when it’s set to true does that have to do with something in the model?

If you need the ground make sure that it doesn’t have the same y coords

Usually this relates to some errors on a model level.