How to cast Shadows?

I’m not sure if it is a bug (can’t update, you know why :smiley: ) But my Objects (Sinbad) won’t cast Shadows to the Ground.

I used the example https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:light_and_shadow (Parallel-Split Shadow Map) with different settings but I can’t see a Shadow at all. Do I have to do more than that?

I have always Problems when I add a Processor to the Viewport, like in the water example, I can see the water but 85% is black only the top is blue etc. There was a Thread where someone said a update would help. Is it the same with the Shadows? (If I use Glow etc. I get only a black Screen and other effects…)

Wellat ltest the glow should work without any context related issues, else I suggest either updating grafic drivers, or getting a real grafic card. At least it sounds like that, what graficcard do you have?

I have the ATI Radeon HD 4800 Series.

update drivers, that might help with everything

It’s up to date now :smiley:



Bloom looks like that:

I assume the text only exist once without bloom? Then there definitly something is wrong. However with my 3800hd everything works fine, so this problem must be somewhat deper than driver level.

Yes the 2 images are created by nifty the text with BitmapText and of course only one time.

And the background isn’t black too :confused:

Could you create a simple testcase?, than I could copy paste it into my eclipse and see if the problem is the code or somewhere else. (and if I get the same result)

Hmm glow seems to work with a test O.o Same Code but other result :smiley:



The pssmShadow doesn’t work the BasicShadow looks like that:



http://imgur.com/2aSF9.jpg







[java]public class ShadowTest extends SimpleApplication {

public static void main(String[] args){

ShadowTest app = new ShadowTest();

app.start();

}

@Override

public void simpleInitApp() {



rootNode.setShadowMode(ShadowMode.Off);



Box b = new Box(Vector3f.ZERO, 1, 1, 1);

Geometry geom = new Geometry(“Box”, b);

geom.setShadowMode(ShadowMode.Cast);

Material mat = new Material(assetManager, “Common/MatDefs/Misc/Unshaded.j3md”);

mat.setColor(“Color”, ColorRGBA.Blue);



geom.setMaterial(mat);

rootNode.attachChild(geom);





b = new Box(Vector3f.ZERO, 10, 0.1f, 10);

geom = new Geometry(“Box”, b);

geom.setLocalTranslation(0, -1.5f, 0);

geom.setShadowMode(ShadowMode.Receive);

mat = mat.clone();

mat.setColor(“Color”, ColorRGBA.Red);

geom.setMaterial(mat);

rootNode.attachChild(geom);



DirectionalLight sun = new DirectionalLight();

sun.setColor(ColorRGBA.White);

sun.setDirection(new Vector3f(-1.13f, -1.13f, 1.13f).normalizeLocal());

rootNode.addLight(sun);





BasicShadowRenderer bsr = new BasicShadowRenderer(assetManager, 256);

bsr.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());

viewPort.addProcessor(bsr);



// PssmShadowRenderer pssmRenderer = new PssmShadowRenderer(

// assetManager,1024,4);

// pssmRenderer.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());

// viewPort.addProcessor(pssmRenderer);

}

}[/java]