Soft shadows
Soft shadows
Hallo,
I think that Irrlicht is a great engine, but I miss an important
feature: soft shadows.
In fact the actual stencil shadows are too slow for practical
usage with complex scenarios. Using shadow maps and
pixel shaders, the performance could be much faster (see
the demos from the Nvidia developer site). Also, the
smoothing on shadow's edges can add some realism in indoor
scenes.
It is not only a matter of loading a specific PS3.0 pixel shader
(this is already possible with Irrlicht), it requires also some
rewriting of the rendering pipeline.
I was thinking of implementing shadow maps by myself, but
maybe that this feature is already under development for future
releases of Irrlicht, does someone know if this is planned?
regards
I think that Irrlicht is a great engine, but I miss an important
feature: soft shadows.
In fact the actual stencil shadows are too slow for practical
usage with complex scenarios. Using shadow maps and
pixel shaders, the performance could be much faster (see
the demos from the Nvidia developer site). Also, the
smoothing on shadow's edges can add some realism in indoor
scenes.
It is not only a matter of loading a specific PS3.0 pixel shader
(this is already possible with Irrlicht), it requires also some
rewriting of the rendering pipeline.
I was thinking of implementing shadow maps by myself, but
maybe that this feature is already under development for future
releases of Irrlicht, does someone know if this is planned?
regards
Alessandro Tasora
www.deltaknowledge.com
www.deltaknowledge.com
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
Yes, I'd like to make some patching in order to have Irrlicht
supporting soft shadows, but the problem is that I want to
concentrate my efforts on physics (I'm going to release a
multibody physics engine, with easy integration with Irrlicht).
If I write such a feature, I should do it quickly, just to
make few tests - maybe, making changes which aren't
cross-platform compatible, etc.
For example: in the past I made a 'patch' to Irrlicht just to
play a bit with compositing&shaders, but I made it in spare
times, as a 'quick and dirty' modification... After few weeks,
a new official release of Irrlicht introduced the same
features, but with a serious & professional implementation :)
So, I'd not wast my time if I know that someone else is
already working on the same feature... ;)
In the meantime, we could wait, and maybe we can make
a survey: how many Irrlicht users are interested in a more
advanced shadowing system? (I bet many of us, so maybe
that it's worth while introducing soft shadowd as an 'official'
feature for future relases..)
regards
Alessandro
supporting soft shadows, but the problem is that I want to
concentrate my efforts on physics (I'm going to release a
multibody physics engine, with easy integration with Irrlicht).
If I write such a feature, I should do it quickly, just to
make few tests - maybe, making changes which aren't
cross-platform compatible, etc.
For example: in the past I made a 'patch' to Irrlicht just to
play a bit with compositing&shaders, but I made it in spare
times, as a 'quick and dirty' modification... After few weeks,
a new official release of Irrlicht introduced the same
features, but with a serious & professional implementation :)
So, I'd not wast my time if I know that someone else is
already working on the same feature... ;)
In the meantime, we could wait, and maybe we can make
a survey: how many Irrlicht users are interested in a more
advanced shadowing system? (I bet many of us, so maybe
that it's worth while introducing soft shadowd as an 'official'
feature for future relases..)
regards
Alessandro
Alessandro Tasora
www.deltaknowledge.com
www.deltaknowledge.com
-
- Posts: 17
- Joined: Mon Oct 30, 2006 12:39 pm
I'm sure soft shadows will have a performance issue, I've tried them in another engine, and its much slower than stencil shadows, however they will be much faster once direct x 10 is out.
There is a soft shadow shader laying around, that's been implemented into the engine Dark Basic Pro, of course this being a direct X shader, but I'm sure someone will be able to convert it into Open GL.
Much credit to this guy, he has made many awesome shaders, all for Dark Basic, but a bit of tweaking here and there and there should be availibility in Irrlicht.
http://www.vector3r.com/
There is a soft shadow shader laying around, that's been implemented into the engine Dark Basic Pro, of course this being a direct X shader, but I'm sure someone will be able to convert it into Open GL.
Much credit to this guy, he has made many awesome shaders, all for Dark Basic, but a bit of tweaking here and there and there should be availibility in Irrlicht.
http://www.vector3r.com/
Running into walls is not a good idea...Trust me
-
- Posts: 313
- Joined: Tue Nov 01, 2005 5:01 am
DX 10: Soft shadows will be as fast in DX 10 as they will be in OpenGL. Remember that DX 10 is simply an interface to the underlying hardware. I give you 10 to 1 odds that anything the DX 10 interface has not possible in OpenGL 2 will be made available thru OpenGL extensions.
Speed: Soft-shadowing will ALWAYS be slower than simple stencil shadowing as there is simply more work to be done. There are, of course, faster and slower methods (with differing hardware requirements) but their quality and speed is dependent on the situation in which they are used. For example, there soft-shadowing methods that work incredibly well for "indoor scenes" that are simply not feasible in a "landscape" environment.
Personally, I am working on LiSpSM soft-shadows. They work well for the situations I intend to use them in
--EK
Speed: Soft-shadowing will ALWAYS be slower than simple stencil shadowing as there is simply more work to be done. There are, of course, faster and slower methods (with differing hardware requirements) but their quality and speed is dependent on the situation in which they are used. For example, there soft-shadowing methods that work incredibly well for "indoor scenes" that are simply not feasible in a "landscape" environment.
Personally, I am working on LiSpSM soft-shadows. They work well for the situations I intend to use them in
--EK
Hi Eternl Knight,
That is, apart from the 'soft-' issue, the same idea I was
suggesting: i.e. implementing some kind of shadow mapping
method in Irrlicht.
In fact, I see that current shadow stencil approach in Irrlicht have
an high impact on performance.
Do you have some examples of your LiSpSM tests?
regards
Ok, LiSpSM are shadow mapping techniques as well..Personally, I am working on LiSpSM soft-shadows. They work well for the situations I intend to use them in
That is, apart from the 'soft-' issue, the same idea I was
suggesting: i.e. implementing some kind of shadow mapping
method in Irrlicht.
In fact, I see that current shadow stencil approach in Irrlicht have
an high impact on performance.
Do you have some examples of your LiSpSM tests?
regards
Alessandro Tasora
www.deltaknowledge.com
www.deltaknowledge.com
-
- Posts: 313
- Joined: Tue Nov 01, 2005 5:01 am
Saturn is correct. Irrlicht lacks the features I need for my projects, and so while I keep up to date with it and will contribute every now & then - my projects will tend to be mostly Irrlicht incompatible.
For LiSpSM, I actually think Irrlicht could be hacked to do it. The major change would be that you would need to add code to extract silhouette edges from a light's point of view (or if using an omni/point light - the six views for a depth-map cube... not recommended). Once you have these silhouette edges, you need to create some geometry to represent the "penumbra edges". Render two depth maps and an alpha map (using a couple of shaders), then apply another shader to the scene over all. All of which is possible in Irrlicht - though the speed might be sub-optimal.
If you have read the paper on LiSpSM, it outlines the method in enough detail to implement, along with the issues it has with certian scenes.
--EK
For LiSpSM, I actually think Irrlicht could be hacked to do it. The major change would be that you would need to add code to extract silhouette edges from a light's point of view (or if using an omni/point light - the six views for a depth-map cube... not recommended). Once you have these silhouette edges, you need to create some geometry to represent the "penumbra edges". Render two depth maps and an alpha map (using a couple of shaders), then apply another shader to the scene over all. All of which is possible in Irrlicht - though the speed might be sub-optimal.
If you have read the paper on LiSpSM, it outlines the method in enough detail to implement, along with the issues it has with certian scenes.
--EK
or do what i did in irr cinema, draw simple stencil shadows
using this function
http://irrlicht.sourceforge.net/docu/cl ... de.html#a1
then
capture the stencil shadows in a RT, blur that and you are good to go by adding the blurred RT onto the scene (via a postprocessor)
1 render target, infinte objects, 1 texture to blur, shadows dont take texture units on the shadow recieving objects.
read this uncomplete doc(shadow section) to see the most popular algorithms for shdows and their stregths and weaknesses.(may have mistakes, ignore the magenta stuff =p)
http://omaremad.gdlib.net/doc.pdf
sorry i cant help anymore, school just takes so much time.
using this function
http://irrlicht.sourceforge.net/docu/cl ... de.html#a1
then
capture the stencil shadows in a RT, blur that and you are good to go by adding the blurred RT onto the scene (via a postprocessor)
1 render target, infinte objects, 1 texture to blur, shadows dont take texture units on the shadow recieving objects.
read this uncomplete doc(shadow section) to see the most popular algorithms for shdows and their stregths and weaknesses.(may have mistakes, ignore the magenta stuff =p)
http://omaremad.gdlib.net/doc.pdf
sorry i cant help anymore, school just takes so much time.
"Irrlicht is obese"
If you want modern rendering techniques learn how to make them or go to the engine next door =p
If you want modern rendering techniques learn how to make them or go to the engine next door =p