Page 1 of 1

Shadows problem

Posted: Wed Jul 15, 2009 6:46 pm
by virious
Hi, i created my scene in irrEdit, all meshes are static. All of them are set to "ReceivesShadows" and there is one source of light, "Point" light, which is flying around the scene. Light is configured to "Cast shadows". When i load the scene from my application i can't see any shadows on the floor or any of the walls. Why? I set the stencil buffer to true when creating device. I can see light moving around but i can't see any shadows. I will be thankful for any help.

Posted: Wed Jul 15, 2009 6:51 pm
by Virion
did you enable lighting?

Posted: Wed Jul 15, 2009 6:53 pm
by virious
Yes, lighting is enabled on every static mesh on the scene. Do I have to write something in my sources to force shadows to show up?

Posted: Wed Jul 15, 2009 7:04 pm
by Virion
hmm i'm not sure then, wait for other users to reply, or ask this question at irrEdit forum (http://www.ambiera.com/forum.php?f=2) as the creator of irrlicht and irredit is there to answer your quesion

oh by the way our names are so similar :lol:

Posted: Wed Jul 15, 2009 8:41 pm
by hybrid
You either have to calculate the lightmapping shadows from within irrEdit, and bake them to the meshes. Or you have to add ShadowVolumes to the meshes, which will create the necessary stuff for shadowing. A last option, for better performance with dynamic lights, is to use ShadowMapping with XEffects. This is not possible from within irrEdit AFAIK.

Posted: Wed Jul 15, 2009 9:44 pm
by virious
I'd rather avoid lightmaps. I wanted to have dynamic shadows. I'll try to use addShadowVolumeSceneNode() on every node from scene. If that doesn't work I will try that XEffects which you mentioned.

Posted: Wed Jul 15, 2009 10:01 pm
by arras
I'll try to use addShadowVolumeSceneNode() on every node from scene.
You will slow down your application considerably. This creates stencil shadows, which are quit slow. XEffects use shaders which is bit faster.

Posted: Wed Jul 15, 2009 10:05 pm
by virious
But what about quality? Which do you think will end up with better looking results?

Posted: Thu Jul 16, 2009 12:06 am
by virious
It worked without using addShadowVolumeSceneNode(). I've just changed all scene meshes to "Animated Mesh" and it went ok without any modifications in my source code :D . Anyways, thanks for your help :) .