How to increase shadow resolution?

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
Andrey01
Posts: 57
Joined: Mon Jul 27, 2020 9:08 pm

How to increase shadow resolution?

Post by Andrey01 »

Hi. I have an ILightSceneNode node generated by addLightSceneNode() method is located to the left of that swinging ball:
Image

However, the ball has strange shadows (note, the stencil buffer is disabled to me) and with so low resolution. How to increase me that resolution?
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to increase shadow resolution?

Post by CuteAlien »

Without stencilbuffer you don't get shadows. Irrlicht creates shadowvolumes using the stencilbuffer. But if you have enabled lighting for the polygons then the polygons away from the light are dark (not because of shadows but because direct light doesn't hit them). The only light they receive is the ambient light. Resolution depends on the amount of polygons (light hits the polygon vertices and is interpolated over the polygon area from those).

For improved light you have to create shaders. XEffects can maybe help you with that (it's basically a set of nice shaders): http://irrlicht.sourceforge.net/forum// ... hp?t=30631
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Andrey01
Posts: 57
Joined: Mon Jul 27, 2020 9:08 pm

Re: How to increase shadow resolution?

Post by Andrey01 »

Thanks for reply. I`ve tried to increase the polygon count to 128 in 'addSphereSceneNode()' call, in the second parameter. However, my application has stopped to run (just blank window appears). Before I set that parameter to 32.
CuteAlien
Admin
Posts: 9645
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: How to increase shadow resolution?

Post by CuteAlien »

Hm, strange 128 should still be ok (documentation says up to 256). Also can't see a problem here when testing it with that many. Maybe another problem in your app.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
netpipe
Posts: 669
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Re: How to increase shadow resolution?

Post by netpipe »

ive been waiting to hire a freelancer to improve xeffects to do timed updating to make it faster rather than rendering every frame. currently he is working on the opengl gles port of the shaders(emscripten).
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
Post Reply