Shadow pass generating shadows lighter instead of darker (sltn found)

Hi all,



I have a small app with Jme2, using shadows with ShadowedRenderPass. What I do basicaly is that I construct the scene objects, place them into rootNode and render everything like:

GameState1 renders the scene as normal, it has a base plane like box object with 5 spheres circling around by means of custom controllers, and two Pointlight sources again circling around by means of controllers

ShadowState1 renders the shadows



GameState1 uses renderer.draw(rootNode) to draw the scene



ShadowState1 renders by calling renderPass on ShadowedRenderPass instance



when I execute the app, everything works fine, I see my objects moving, lights also moving, casted shadows appearing on ground quite cooly. Now here is the problem:

  1. I am using LightingMethod.Modulative, which casts the shadows on ground, but shadows makes ground brighter! So if a shadow is cast on the floor, that area gets brighter instead of getting darker!
  2. If I use LightingMethod.Additive, after adjusting my light attenuation, I get darker shadows on floor and looks cool, but this time, my original moving spheres in air appears to loose their shininess and coolness factor (they are transparent, shininess set to 128 which is max, so you normally see spotlight reflection areas cooly)



    Do you know why I do get problems with LightingMethod.Modulative as shadows getting shinier instead of darker?

    Do you know why LightingMethod.Additive makes my scene objects appear as washedout?



    Modulative screenshot: (note lighter shadows on ground)





    Additive screenshot: (correct color on shadows, note the spheres, they are quite dull, aren’t they?)





    Cheers! I’ll appreciate any help you can provide!

See the post to find the solution for the problem:

http://www.jmonkeyengine.com/forum/index.php?topic=11361.msg85602#msg85602



Simply, set alpha part of your shadow casting light to 0 for solid shadow, try fiddling with alpha value for softer/darker shadows from that light source