Volume Shadow: Mesh shouldn't receive shadow

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Barratator
Posts: 30
Joined: Fri Jan 08, 2010 3:30 pm

Volume Shadow: Mesh shouldn't receive shadow

Post by Barratator »

Hello,
I'm using stencil-buffer-shadows on some meshs in my world. Is it possible to declare meshs, which shouldn't receive the shadow?
It looks a little bit ugly, when the shadow is casting on vertical, flat grass-meshs.


Thank you!

Bastian
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Volume Shadow: Mesh shouldn't receive shadow

Post by ACE247 »

I think (If i remember correctly, since I never use the stencil shadows) that you can set the ReceiveShadows(false) Flag for a mesh/material. Maybe look into the api documentation to be certain.

PS Dev's, where has the online Api's search option gone to?
Barratator
Posts: 30
Joined: Fri Jan 08, 2010 3:30 pm

Re: Volume Shadow: Mesh shouldn't receive shadow

Post by Barratator »

Thanks for your answer!


http://irrlicht.sourceforge.net/docu/na ... f40add70d3
This is the enum of all materialflags. But there is no receiveshadow.
Turning on/off the EMF_LIGHTING has no effect on the shadowreceiving. :(


Bastian
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Volume Shadow: Mesh shouldn't receive shadow

Post by ACE247 »

Hmm seems like excluding nodes from Stencil shadowing isn't that easy. Since as you probably know, Stencil Shadows are actually scene nodes that are drawn and drawn last after all other nodes have been through the rendering pipeline. Hence you would have to first do a render pass to render the grass without lighting and then do a second for all the other things and mix them. Which is probably beyond you.

On the other hand you could try some other shading&Lighting addons for Irrlicht. Try searching XEffects for instance, its pretty easy to use and you can exclude nodes from lighting calculations, its also shader based and quite fast compared to stencil shadows.
Render passes are here in Api:http://irrlicht.sourceforge.net/docu/na ... bb8200d67f

Allthough maybe someone else here knows a simpler way to exclude nodes from shadow casting.
Barratator
Posts: 30
Joined: Fri Jan 08, 2010 3:30 pm

Re: Volume Shadow: Mesh shouldn't receive shadow

Post by Barratator »

I tried to use XEffect before, but I didn't get the shadow under control.
My problem is that on a large terrain I can only illumine a small area. It seems to be, the area far away (where i don't want to calculate shadow (for performance)), is always black. :(

Hard to explain with limited english knowledge :S


Bastian
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: Volume Shadow: Mesh shouldn't receive shadow

Post by ACE247 »

Else you could try using Sudi's deffered Lighting addon with it you can do directional light to do 'sun' like lighting and over quite a large scale but takes good fine tuning. You can give it a try if you want. http://irrlicht.sourceforge.net/forum/v ... t=deferred
Its also very easy to integrate as you'll see if you haven't found it yet. :)
Post Reply