Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
A blog post about fixing displacement maps for use tesselation work out and real time displacement. (First steps on the new adventure of developing a 3D game with "next gen" technology, with the glory of tesselation.)
(Taken from http://www.PompiDev.net/ a renewed deb blog by Ofer)
I have been working lately on displacing geometry of a 3D model in real time, after it was tesselated.
Displacement maps means I modify the geometry vertices position according to a height map texture. The issue is that most game models don't have enough geometry to support the fine details of the texture. You could send a lot of geometry to the shader, but this is wasteful. Instead, I subdivide the mesh inside the shader pipeline(tesselate).
I bought a nice 3D model of a stone golem that had normal maps but no displacement maps(height maps + normal maps). I decided to generate the height map using CrazyBump.
That worked pretty nice, but there was an issue. After displacement the model had gaps in certain parts of its surface.
GolemGap
What I did to fix this is go over all the edges of the triangles that are shared in the 3D model, but are separate in the texture space. Then I just made the pixels in the height map on these edges share the same values for both edges. I had to make this edge fix more than 1 pixel width and it wasn't a simple challenge.
This image shows where I fixed the displacement map. In practice I didn't put black colors on the image, but rather an average of values on the two edges.
CommonBorders
Denoting the edgesHere are the results:
GolemFixed
Read more about:
BlogsYou May Also Like