
This is a project of mine I worked on back in '09. I figured I wanted to make a video game, but I wasn't entirely sure how I'd make it. After some research online I settled on using the XNA library from Microsoft. The easiest game to make seemed like a generic flightsim, so I started on a terrain generator first. After a while I had some basic normal-based lighting and some texture-mapped terrain. Unfortunately, I never quite got the flying part to be fully functional, but it served as a model for when I later upgraded to DirectX.
After doing some initial heightmap generations, I realized that there was a point where heightmaps got too large for my system to handle. After reading around, it seemed that the solution to this was a quadtree. In this system, the heightmap would be broken up into four sections, which would each also be split up recursively. This would continue to a certain depth, the idea being that only the sections in the camera's view would be drawn. After reading up some of the theory I managed to implement my own version of it successfully. I also created a system where the terrain would be rendered at different levels of detail depending on how far awway the camera was (in the above image, most of what you can see is at the lowest level of detail, save for some at the bottom).
Next, being unsatisfied with the undefined shadows I had I decided to look into shadow mapping to get some sharp realistic ones. The method I decided on involved rendering the scene twice: once looking from the perspective of the light to see what portions of the terrain have light hitting them (this is the box in the upper left corner), and once from the camera (which is what is seen).
No comments:
Post a Comment