No shadows visible blender babylon exporter (1.6 MB)

hi guys,

i created a little scene with one plane and logo mesh.

when i export checked cast and receive shadows. enabled shadows on light also.

babylonjs scene lighting is perfect but im unable to get shadows.

im using blender exporter. im i missing something. please help… i also attached working project.

Hiya Vijay, and welcome to the forum, too. Thx for including the project zip.

I put logo.babylon into my free github account, and brought it into a playground. I hope you are OK with that decision. :slight_smile:

I examined logo.babylon, and it looks just fine. It has a line near its bottom…


Lookin’ good. BUT…

Hey, there’s your logo. Cool. I turned-on a templight in lines 6-9… just so we could see something.

But look at line 16, and the report it makes at-console. It is an array with only ONE light… and that is templight… the one I added. Your imported light… apparently was somehow “rejected” by the BJS import. hmm.

Ok, that’s all I got so far. Somewhere, we have misplaced your “Sun” light. Some kind of solar eclipse, ya think? :slight_smile: Anyway, I THINK we are on-the-trail of our problem. Calling all helpers! We have a run-away light! :slight_smile: Let’s put its picture on the sides of milk cartons, and see if anyone calls us.

Yeah, I see that you are exporting using PBR, because of the environment texture / skybox. Upshot is that shadows are only produced using directional lights, I think. This causes shadows to be very faint in a PBR scene.

Do a sanity export, switching to STD materials. If that works, try dialing down the environment intensity. You can do that at the world level, or material level. One approach might be to only lower for the mesh receiving the shadows, then compensate by making it a brighter color.

thanks for your replies guys

now i taken new default scene from blender added plane assigned checkmarks and exported.
plane is receving light not box and no shadows.

please check yourselves guys try new empty scene with lighting in blender.

Worked for me. I also added a material to the plane & changed to a STD export.

please share blend file. have you wrote any code for shadows in javascript?

im just loading scene
var loader = BABYLON.SceneLoader.Append(‘assets/’,‘box.babylon’,scene,function(newscene){

var light = newscene.lights[0];

light.intensity = 44;


nothing else

Not letting me upload .blend files. I actually did not use any code. I just opened .babylon in sandbox. Try you file there to determine a code or not.

ok guys now its working . i think this issue is with light in blender. i deleted light and created new sun light. thanks guys for your support.

note : ShadowDarkness should be 0 (blender)

1 Like