maxime.isnel Posted August 19 Posted August 19 Hello, We are using Unigine 2.18.1. We use Decal-Based Holes with Decal Ortho to create holes in our terrain for tunnel entrances. We are having some visual artifacts on the terrain rendering when we think we are in the Decal Ortho box. Some triangles/parts of the terrain are not rendered. It really depends on the camera placement. In the tunnel in the screenshots, it happens a lot. If we disable the decals, we see the exact same part that was not rendered, rendered (see with_decals_disabled.png and with_decals_enabled.png). Is it possible to fix this? Or to minimize the artifacts? Thank you
silent Posted August 20 Posted August 20 Hi Maxime, Quote Some triangles/parts of the terrain are not rendered. It really depends on the camera placement. In the tunnel in the screenshots, it happens a lot. Seeing the terrain through a Landscape Terrain hole is a known limitation. It comes from the order things are drawn in: The terrain is drawn first. In every pixel only the nearest surface is kept, so the terrain behind the slope is dropped at this point. The hole decal is applied after that. It clears the depth in the area it covers, which is what makes the slope disappear. Nothing is left behind the slope to show, so the hole ends up empty. Quote Is it possible to fix this? Or to minimize the artifacts? It's hard to tell without seeing the actual scene and the decal / landscape setup. Would it be possible to send us stripped-down content to verify? You may notice that the terrain does show up at some camera positions, usually appearing all at once as you move along the tunnel. This is the same effect: the terrain behind is only lost while the removed slope is still between the camera and it. Once the camera passes through that slope, nothing is in front any more and the terrain behind is drawn normally. About the missing terrain parts: the first thing worth checking is whether the area that disappears matches the bounds of the decal box. The hole removes all terrain inside the volume of the decal, so a box that reaches past the tunnel walls will remove terrain around them as well, which is expected behavior rather than an artifact. If the bounds do match, adjusting the size, radius and position of the decals is the way to fix it. Note that the mask is computed from the depth buffer rather than from the terrain geometry, so surfaces seen at a grazing angle (such as a slope above the tunnel exit) are the most sensitive to decal placement. The solution that avoids the problem entirely is to replace that part of the landscape with a mesh, so no hole decals are needed at all. But you would be also require to adjust the initial terrain height in that area and then place the mesh on top of it. In newer versions (2.21+) you can export a part of the Landscape Terrain as a mesh from the editor; on 2.18.x this has to be done through the API. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts