Thursday, 13 November 2014

Refined General Displacement with Forest Rendering

With not too much work I was able to split the Data Buffers needed for general displacement and forest rendering, and then merge them to create an buffer that is input to generate the Displacement Key (the most expensive part of this process)  Again, the key of combining these processes before running the displacement filter is that the combination is relatively in expensive, and potentially many meshes using displacement can all use the same Displacement Key, which would not increase its computation time.

Bellow is a preview of terrain with displacement, and a vegetation layer on top of that displacement.

Left: Forest Rendering with Terrain Displacement
Right: Terrain with Height Map Displacement

This Combination of Terrain Displacement and Forest Rendering does not produce any additional artifacts than what is already inherent in the system and does not significantly increase running time.

Now it is kind of weird to have trees potentially growing straight out of rocks, but again, the forest layer could also be adapted to represent simply moss or grass, which would be fine.  Though regardless, trees often do grow straight out of rock piles and cliff faces, as seen bellow. 

For large boulder formations, a pass of the terrain could be rendered to the forest Modification Map, to over ride any trees in a specified area.

As mentioned above, the process for terrain displacement can also be extended to other meshes, such as ocean waves (to be explored soon...) as well as any thing else anchored to the ground with vertical texture.

Bellow is an experiment in implementing height map displacement with a rail road line. 

I am able to render this mesh with a special texture with the displacement height embedded into the alpha channel directly after rendering the terrain to the General Displacement Data Buffer.

Furthermore, it is easy to distinguish between having the vegetation grow on top of the terrain but not additional meshes in the layer (the depth value of the terrain and forest data will be same, other wise it is another mesh)

Above the displacement effect on the rails can be seen more easily.  Though there are some pretty ugly artifacts with this addition.   For one, the displaced terrain is cut vertically by the rail, which potentially could be smoothed out.  Second, the top of the rail is not flat, which again, rendering non organic (straight line) objects with this displacement system does not work well, due to using a mip map texture which smooths out straight surfaces.  Also there are some ugly artifacts along the edges of the track some times, but this may be due to the fact that the rail is flying in some places (a bad implementation)  potentially these could be smoothed out as well.

Though overal, the displacement of the rail line adds a lot of usable detail to the ties and the gravel on the rail bed, which could easily be combined with a separate mesh that renders the rails in 3D.

Above you can also see the Merged Displacement Data Buffer and the resulting Displacement Key.

No comments:

Post a Comment