Decent shadow system

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
eLidzer
Posts: 5
Joined: Fri Jan 20, 2012 11:09 am

Decent shadow system

Post by eLidzer »

Hello,

I am making a little game engine and I chose to mix Irrlicht (3D display), IrrKlang (audio) and Tokamak (3D physics). I'm struggling to find a decent shadow system to generically adapt to my models, and I tried different technics:
- Shadow volumes (stencil shadows), not so visually appealing, CPU-consuming and irrelevant to closed spaces, floors, or any special case which produces glitches;
- XEffects, quite easy to adapt but which is irrelevant too as it can't manage exteriors or directional lighting (or I missed something);
- Shaders system I could write myself to get texture shadows, but it is an hard task (I cannot implement it as I hardly found any good tutorial);

I do not want to switch to Ogre or any other engine but if I had to do I would switch. What I wish is a decent method to get a decent working shadows system, and I know Ogre and Panda3D can provide it. If Irrlicht is very appealing on many aspects, I must admit shadows system is quite inexistant, which is unprofessionnal despite the many qualities Irrlicht has. So, I ask you : how can I get working shadows?

Thanks!
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Decent shadow system

Post by Mel »

Go for your own shadowmapping system... Or better yet, try to get those in Ogre or Panda3D working in Irrlicht ;)
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
eLidzer
Posts: 5
Joined: Fri Jan 20, 2012 11:09 am

Re: Decent shadow system

Post by eLidzer »

Go for your own shadowmapping system...
I have a decent level in C++, and I use Irrlicht for a moment, but my skills in maths are somewhat... limited.
Mel wrote:Or better yet, try to get those in Ogre or Panda3D working in Irrlicht ;)
Yes, I could try to adapt a full implementation. For the moment I might allow users to switch on or off an option to enable the shadow. But I will take a look. :wink:

EDIT : I'm just thinking : I may adapt XEffects to cast shadows from the Irrlicht native lights and try to adjust parameters to make it looking good... anyway, there is some challenge.
Last edited by eLidzer on Thu Feb 21, 2013 4:57 pm, edited 1 time in total.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Decent shadow system

Post by Mel »

At any rate, the only really useful shadow system which trades well distance, quality and simplicity currently is cascaded shadow maps, and i think neither Panda nor Ogre use it natively.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
eLidzer
Posts: 5
Joined: Fri Jan 20, 2012 11:09 am

Re: Decent shadow system

Post by eLidzer »

Okay, I have taken a deeper look to XEffects, and I have more or less understood how it works:
-Blend with ambient light (ie. black);
-Project, for each "spot" light, to know if a point can be lightened;
-Blur the shadow map to give it a better look;
-Apply the result;

But what I would like to have as a minimum requirement is a projector system similar to Unity (at least I suppose), where you put a spot which draws shadows but does not fill with the ambient color (or black) the parts out of the spot. Don't know if someone has tips, but I hope I will find a solution. :mrgreen:
Post Reply