O'Reilly logo

Microsoft XNA 4.0 Game Development Cookbook by Luke Drumm

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Modeling trees

Generating realistic gaming environments is one of the greatest challenges facing modern gaming. The addition of natural looking foliage can go a long way towards transforming a scene from a sterile, virtual-looking environment, into a lush, natural-looking one. Being able to do it programmatically can mean the difference between a minute's or month's worth of work for game artists.

In this example, we'll be exploring one of the ways that trees and smaller plants can be generated, and hopefully provide a starting point for you to explore some of the many variations on the technique to provide your own unique looking flora.

Getting ready

This example relies upon the GeometricBuffer classes described in the Modeling triangles recipe ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required