Improved LOD algorithm

Published May 16, 2009
Advertisement
Been ill most of this week so haven't really been up to much development wise. That said, I still spent most of this afternoon playing around with my Direct3D 11 Terrain Renderer.

During the week I came across a link for the Puget Sound dataset that I thought I'd make use of as it's definitely better than anything I can invent myself!

For those who aren't familiar with Puget Sound, it's the bay area around Seattle. Compare the colour map with a google map (depressingly had to resort of using a Google service as none of the others have a 'terrain' mode [headshake]) and you should be able to identify it - look for the triangle of peaks in the lower-left portion of the image as being Mt Ranier (top), Mt St. Helens (bottom-left) and Mt Adams (bottom-right).

Courtesy of y2kiah's comments in my previous journal entry I implemented a plane-based error metric and pushed ahead with a standard deviation based calculation.

I now have a more complex Compute Shader pre-pass that generates a plane for each patch and takes the distance of each point to the plane as input into the standard deviation equation rather than just the raw height as I had previously done. Essentially I end up with a measurement of coplanarity (is that a word?) - low values indicate that all the points in the patch are roughly following the same flat surface and high values indicate a much rougher/uneven patch. Perfect!

I also modified the way that the final LOD is chosen. I use the standard deviation as well as distance as inputs and have taken to simply adding them together with a given bias. Currently I'm using 35% distance and 65% deviation.

From initial testing the results are pretty much exactly what I want. Flat and distant areas are low detail and rough pieces are high detail subject to their distance to the camera.

0 likes 3 comments

Comments

Drilian
I can see my house from here!

Looks good!
May 16, 2009 07:07 PM
clb
Since official HW is not out yet, you're only running in software. So kinda a silly question at this point, but just thought I'd go with it: What do you expect the performance to be on the actual thing? Rephrasing a bit, how expensive/heavy do you feel your implementation currently is for a GPU?

Your posts are great to read, keep them up!

May 17, 2009 02:32 AM
y2kiah
Nice. It's looking great!
May 18, 2009 07:12 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement