Monday, July 7, 2008

Better Terrain Rendering

After work, I get home. I spend the day in front of a computer, and wish to rest by writing even more code. What could be better?



Well, I'm currently working on a special project as a portfolio piece/awesome thing for the yearly Apple developer competitions. On the side, I've given up on GameLib - too much code with too little return - objective-C suits my needs. I still miss GameLib for it's ability to cram all implementation details in the .c file as opposed to C++/Objective-C - but if I keep with that route, I'll spend more time maintaining the library than taking steps forward with my interests...



Now, on to the meaty part, the rendering! I love ray-tracing, but it's not the solution that I'm searching for. What I want is a fast, detailed, renderer for terrain. Something that could draw the smallest pebble to the longest blade of grass.



So here's my first solution to my little problem: render a special mesh that is the terrain. Simply, have a mesh with concentric circles - where the user should focus the circles are closer and denser. Then, the further, the sparser they become. The fun part comes when it's time to render - use a height-map to display the mesh and to do bump-mapping. So as the user approaches something they see a wonderfully high polygon count, but further away it appears blurred (which I use to mask all the other shortcuts I've used)



Now I want a million blades of grass with such features -- sending me back to the drawing board, even though I may have a solution resting in my head. I just haven't thought it through enough yet.

No comments:

Post a Comment