How do I exclude skydomes from stencil buffer drawing?
How do I exclude skydomes from stencil buffer drawing?
Title. I haven't found a solution online for this...
Re: How do I exclude skydomes from stencil buffer drawing?
Easiest is probably remove that node from the scene and just call render on the node afterwards directly.
But may depend a bit on what this is about exactly. Generally nothing should draw to the stencilbuffer in Irrlicht except if it has a shadownode attached.
And rendering last comes with a downside that it will conflict with anything transparent in front of it. So if you have transparent stuff it needs another solution. For example splitting scene into several scenemanagers for rendering so you can do solid - skydome - transparent and flip stencil drawing in between. Or maybe use the lightmanager to flip that or something. There's a reason shadows have their own render-stage.
But may depend a bit on what this is about exactly. Generally nothing should draw to the stencilbuffer in Irrlicht except if it has a shadownode attached.
And rendering last comes with a downside that it will conflict with anything transparent in front of it. So if you have transparent stuff it needs another solution. For example splitting scene into several scenemanagers for rendering so you can do solid - skydome - transparent and flip stencil drawing in between. Or maybe use the lightmanager to flip that or something. There's a reason shadows have their own render-stage.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How do I exclude skydomes from stencil buffer drawing?
For lightmaps you need 2 uvmaps, right? (it can be the same duplicate), I think b3d has the ability to export up to 8 uvmapsCuteAlien wrote: Thu Mar 19, 2026 12:02 pm Easiest is probably remove that node from the scene and just call render on the node afterwards directly.
But may depend a bit on what this is about exactly. Generally nothing should draw to the stencilbuffer in Irrlicht except if it has a shadownode attached.
And rendering last comes with a downside that it will conflict with anything transparent in front of it. So if you have transparent stuff it needs another solution. For example splitting scene into several scenemanagers for rendering so you can do solid - skydome - transparent and flip stencil drawing in between. Or maybe use the lightmanager to flip that or something. There's a reason shadows have their own render-stage.
Irrlicht is love, Irrlicht is life, long live to Irrlicht
Re: How do I exclude skydomes from stencil buffer drawing?
Not sure why you are suddenly asking about lightmaps (thread is about stencil buffers and skydomes)? Or did you misread lightmanager? Anyway to answer - with default Irrlicht materials you need 2 textures. I don't remember if they need different uv's or not - would have to experiment.
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How do I exclude skydomes from stencil buffer drawing?
Oh damn, I read wrong, I swore I read lightmaps, what's wrong with me, anyway, thanks for the response, I leave ashamed and humiliated lmaoCuteAlien wrote: Thu Mar 19, 2026 6:51 pm Not sure why you are suddenly asking about lightmaps (thread is about stencil buffers and skydomes)? Or did you misread lightmanager? Anyway to answer - with default Irrlicht materials you need 2 textures. I don't remember if they need different uv's or not - would have to experiment.
Irrlicht is love, Irrlicht is life, long live to Irrlicht
Re: How do I exclude skydomes from stencil buffer drawing?
No worries :-)
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: How do I exclude skydomes from stencil buffer drawing?
Sorry! I realized that adding a shadow to a mesh seemingly made my quad that I’m rendering my output to also darken. Seems like the quad/everything gets a shadow until a light is placed? Not sure.
Re: How do I exclude skydomes from stencil buffer drawing?
Shadows should affect everything inside the shadow volume. I guess with infinity for shadows set to a value around or larger than the camera far-plane the skydome will also get a shadow maybe (the skydome is slightly less than the far-plane). I haven't really had that situation yet, but it would make sense. Sound actually tricky to avoid as skyboxes are rendered first. Do you have an example for this by any chance?
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm