12
« on: 2019-02-11, 16:31:20 »
I was really stoked when I read about the displacement improvements that came with the latest version. However, I've tried it out some now, and I'm actually bit disappointed.
I'm sure the latest fix has improved the look of irregular disp-maps, but the way I use it (in archviz) is to produce pronounced details on buildings, which are almost always sharp and regular.
In the image I use the same basic brick texture, but on some parts of the facade, the architect wants a striped pattern. Since the meshing of the displaced areas is triangulated and random, the edges get very jagged, and the shadows look... really bad.
This kind of thing worked a lot better with Vray's 2D displacement. (I don't have any experience from using Fstorm.)
In the image, the displacement is set to Screen 1.5px, but many times, the scenes are too large and too complex to use such a small value. (I'd love to be able to increase it per object, or even use Screen and World on different objects!)
A possible solution I could think of is that Corona considers the displacement map's contrast to decide where to add triangles. So, if there's a sharp contrast between the pixels in the map, Corona adds more triangles, and vice versa. Adaptive meshing based on dispmap contrast. Edit: Did a quick test, and noticed it already does this. Added another image where I used a checker map to displace a tessellated cube. It shows the problem, and how displacement tries to solve the issue. 1px displacement in this render, but artefacts remain no matter the setting.
One could also think that the meshing uses some kind of "loop detection" to follow the shapes of the dispmap.
Another thing I been thinking about is the option to use "displacement LOD" - an option to skip displacement if the the displaced geometry is too small (too far away). Right now, displacement can really destroy the look of displaced mesh that is too far away from the camera.
The only solution now is using different materials for different shots of your scene, but is just too cumbersome to be a practical solution, and using World scale just isn't an option due to memory use.
I really hope you keep working on this. For me, it's one of the areas where Corona is lacking compared to other renderers.