Hello!
I have a simple Terrain in irrlicht and I'd like to add a plain and simple node over it, (to cover a part of the terrain, for example with a different texture).
If this plain node has the same coordinates as the terrain element, I get a weird "combined display" of both textures. Z-Fighting, I guess.
How can I avoid this? Of course I could move the plain node a bit over the terrain, but aren't there better solutins? Isn't it possibile to somehow manually order element layers in the z-buffer?
Plain node over terrain
Re: Plain node over terrain
Not something I worked at yet, but here's my thoughts: While it might be possible somehow by rendering in stages and not deleting the z-buffer in between - it's likely a bad idea. I'd try to use several textures on the same terrain-mesh and then write some material-shader combining them. Could be a little tricky when it comes to needing more than 2 uv-texture coordinates in Irrlicht (I heard the shader branch supports that already somehow, but again not something I've worked with).
A simpler trick could be to raise it more up. And then give it some border that goes into the floor. Won't work for completely flat floors obviously, but for real landscapes it's probably possible in most cases. Also the opposite works - lower the floor below objects (you might have seen those kind of holes in the floor maybe in mmorpg's when the level was still loading objects).
A simpler trick could be to raise it more up. And then give it some border that goes into the floor. Won't work for completely flat floors obviously, but for real landscapes it's probably possible in most cases. Also the opposite works - lower the floor below objects (you might have seen those kind of holes in the floor maybe in mmorpg's when the level was still loading objects).
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