Export from blender. Strange shading

Hi all!

I’m trying to create simple scene and learn babylon.js.

I want flat shading in result. but there is some problem with it. or I hadn’t got how to do this right.

  1. Create DirectionalLight
  2. Create Box (rotate by x to different shading on faces)
    Everything is ok
  3. Add simple mesh from blender export
    Shading is not ok - it looks like spotlight with some falloff. Changing specularColor to (0,0,0) not working. Assign same material as box not working too.

What I did wrong?



Flat shading is in transition. In the 2.80 Blender beta exporter, vertices are flat / smooth shaded on a vertex by basis, like they are rendered in Blender.

I can see by the producer tag of your .babylon file, that you are using 2.79. In that case, just add an Edge Split modifier on the mesh. For more info on shading from the Blender exporter & how it changes for 2.80, see.

You can also force flat shading once in BJS, but I am not going to look that up for you. It is not hard.

1 Like

Thank you for reply! It helps!
And modifier in blender or convertToFlatShadedMesh for existing meshes.