Skip to main content

The art we call 'Detail'

Massive landscapes, who doesn't dream about them. In outdoor games landscapes are one of the most crucial parts of rendering. They easily take up 60% of the screen, more than enough reason to make them look good.


Part of recent events I’ve taken the landscape rendering trough an development iteration to enhance the visual quality. The key to enhancing visual quality is detail. Too much detail is bad, too little detail is equally as bad. The detail needs to be just right. Our consumption for detail has outgrown to the point where modern-age storage facilities such as the hard-disk or even ram/vram are just not feasible to store all the detail.



An aspect of landscape rendering are the textures and the transitions between textures. Traditionally people use ‘splatting’ or ‘alpha-maps’.  These approaches are fine but another technique caught my eye. In essence you create fractal such as fbM (fractional Brownian motion) to displace the slope & altitude and use a lookup texture to find the parameters for the layer that corresponding with the slope for the specific altitude.  Below is a sample transition. More details of this method can be found on http://www.gamedev.net/blog/73/entry-1692117-terrain-texturing-explained/.



Another aspect of landscape quality is the resolution or better said how small are your polygons. The rule of thumb is that when all vertices are aligned on a single plane they can be unified into a single primitive. This unification/subdivision is quite neat for adding details like the curvature of an hill. When you elevate the terrain the tool can analyze if patches needs to be subdivided or unified and that will give the basis for an editable terrain.

However as great as this subdivision/unification system is it doesn’t add detail to your terrain. It is of course possible to dynamically subdivide the polygons based on lod. Traditionally this was done on the CPU and the algorithm was called ‘ROAM’. But with the rise of DirectX 11 / Opengl 4.0 hardware new pipeline was introduced the Tesselation pipeline.

The tessellation pipeline allows you to subdivide triangles or quadrilles on the GPU in parallel. This lends to a few things less bandwidth consumed for geometry upload/download, geometry stays valid until its edited, and we get to have detail polygons. Thanks to these detail polygons we can now add more detail.

Two things you need to look out for: Tessellation has the capabilities to generate both vertices at the edges of the primitive and subdivide the surface area itself, the generated edge vertices are not shared. What this means is if you subdivide the edges of your primitive non-deterministic or displace generated vertices in a non-deterministic manner cracks will appear. One of the mistakes I made in my initial tessellation was correlate the wrong edges with their corresponding gl_TessLevelOuter[n] variable.

Comments

Popular posts from this blog

The 8 Best U.S. Cities to Visit for a Quick Vacation

The best thing about visiting a new city is experiencing the thrill of adventure. From delicious food to rich history, there’s always something new to do. Whether you live close to these cities or you’re planning on making a trip to the USA, here's 8 of the best U.S. cities to visit on your next vacation (in no particular order): 1. Portland, Oregon As Oregon’s largest city, Portland has steadily been on the rise as a hotspot for food and beer connoisseurs. It’s nestled between the Columbia and Willamette Rivers with a stunning view of snowy Mount Hood which only adds to the thriving artistic culture. Portland is also home to beautiful parks, bridges and bike paths, making this city a top choice for outdoor adventurists. If you’re looking for more breathtaking escapades, Portland is nearby to a few national forests including Mount Hood National Forest and Gifford Pinchot National Forest. 2. Nashville, Tennessee Nashville rightfully owns

Roadtrip germany

On our way to a road-trip headed to Germany, Frankfurt amz Main. We had the chance to stop by for one of my favorite foods as a child: Curry-wurst with fries. This brings back so much memories where we'd often go spent the Christmas weeks in Germany, going over the Christmas markets/fairs and enjoying the hot curry-wurst from the stands with snaps or gluhwein. Of course during a road-trip one cannot stop to have a little lunch too, yummie pie and sandwhich

Getting started with Electron Pt 1.

Electron is a fun and easy way to create desktop application from an mostly web based code. Of course websites aren't the most performance way to create an user-interface ( in terms of technical aspects such as memory, cpu consumption) but it's an extremely powerful experience rich way of doing that.