Friday, April 03, 2009

Trees, Trees and More Trees

I might be developing an unhealthy obsession with trees. And by "might" what I really mean is that it is way past the point of no return. My goal is to make the little demo world look a little bit like the New England outdoors. Here in Jamaica Plain you can find plenty of inspiration in places like the Forest Hills cemetery and the Arnold Arboretum just a few minutes away. But to even remotely approximate the beauty of those locations you need lots and LOTS of trees. So, I have been trying to figure out what it takes to handle a good number of them in a game. Trees are serious business! A single 3D model of a tree may require thousands of triangles (the basic unit in the 3D modeling world) and drawing just a few of them on the screen might make your computer sweat a little. I am playing with a free library that uses a few tricks to be able to handle large numbers of non moving objects like trees, bushes, rocks and grass. It is called PagedGeometry, although originally it was named Forests. But of course, we computer geeks always prefer technical sounding, cryptic names. They just make things seem so much sexier and complex, right?

If you think I am making too big a deal of a little vegetation, you should know that there are entire companies who do nothing but this. If I were to use the software produced by SpeedTree in my demo, for example, I would have to come up with around ten thousand dollars pretty soon. Since I would rather not choose between my daughter's school and the trees, I will have to go hardcore on this free library and try to squeeze as much performance out of it as I can. Making game software run fast is most certainly a black art, and I am doing my best to find articles and white papers out there to help me burn the knowledge into my poor, tired game programmer wannabe brain.

Both to relax and to help me with my tree quest I will be taking a walk around the Forest Hills cemetery with my 5 year old daughter and take some pictures. You see, while the trees are still naked you can see their branch structure really well, which is great if you need to model a few trees on my own. I can't let the leaves ruin that, so I better hurry! And, by the way, if you download the latest version of the demo (look in the links section on the right of this page) and run it, let me know how it goes.

No comments:

Post a Comment