DirectionLightShadowFilter + Skybox

Can someone help me decide whether this is a bug, or if I’m doing something wrong. Because there’s one instance where I don’t get this.
Below is a scene from scenecomposer. It contains the boxes you see, a directionallight, a lightprobe and a skybox.
Then a DirectionLightShadowFilter is added.
When the skybox is visible, the shadows disappear. I’ve disabled the lightprobe and that changes the lighting, but the behavior of the shadows are the same.


Hi @rickard
Have you tried setting shadowMode = Off on the sky node?


I just tried it, and that worked :smiley:
This could be a bug in the sky box generator in the SDK


perhaps the SkyFactory class should be set to shadowMode = off by default when used to create a new sky node.

Otherwise the SDK should do something like this:

     * a sky as background
    private void setupSky() {
        Spatial sky = SkyFactory.createSky(assetManager, "Scenes/Beach/", SkyFactory.EnvMapType.CubeMap);

The default shadow mode is “inherit”. Is your rootNode setup with a shadow mode?

…used to be that shadows would default to “off” (inherit from root treated as ‘off’). If this has changed then that’s problematic, I guess.

Edit: maybe the scene composer is turning them on in its root node?

The shadow mode for newly created scenes in the SceneComposer is ‘CastAndReceive’. It must be some kind of regression. Still time to fix for 3.6, I guess!

1 Like

It may have always been that way in the SceneComposer… never looked. I haven’t used the scene composer in probably 8+ years.

I just know for a regular JME scene, shadows are off by default.