Sunday, February 12, 2012

Trees in terrain preview

Here are some rendered trees. Keep in mind this is a preview to help the world designer choose the parameters for the procedural generation. The lighting is very poor. Also tree crowns appear as blobs in the preview, which is far from being realistic. These blob polygons are the base for instanced branches and leaves later in the client. This is similar to the grass I have posted in earlier screenshots.



10 comments:

  1. What worries me about your tree implementation is whether it scales - Are your tree's instanced or are they all unique? If they're not instanced won't all the draw calls kill the GPU? Can one make a thick forest without heavily impacting performance?

    ReplyDelete
    Replies
    1. Only small leaves coming out of tree crowns are instanced, trunks, branches and crowns are unique.

      This does not increase the number of draw calls, even for a forest that is far away. The trees are part of the terrain geometry, the engine makes no difference to draw them. The LOD system is able to merge tree geometry with terrain geometry, for a distant forest only a mass of green will remain, it will even engulf the terrain for a dense forest.

      I have not tried this yet to this extent. My concern is not about rendering, but about keeping world geometry cells under budget for HTTP.

      Delete
    2. As tree are part of terrain will be possible to add on ground roots? this will help with look of transition form trunk to ground.

      Delete
    3. Yes, tree class definitions already include roots. They are not sufficiently exposed in these screenshots. I did not spend more than 1 minute defining tree class shown here, did not really work on the roots, by default they will go a bit lower than the base of the terrain.

      Delete
    4. http://en.wikipedia.org/wiki/File:Mangrove.jpg
      something like that will be possible? it would be fun if that roots was 10x times bigger :D

      Delete
    5. Yes, this mangrove's roots are possible. When I start the first game to use this project I will have to spend a few days just designing interesting tree classes and assigning them to the right terrain and biome properties.

      Delete
  2. trees need to take into account the time of surface or rock that it is growing in. Big trees can't grow on rocky mountains.

    ReplyDelete
    Replies
    1. Right, should not be a problem. Each type of tree has a series of masks to control the probability of that type of tree to appear on any given location. Rocks use similar masks, they can be shared with trees.

      Delete
  3. One thing you rarely see in games is fallen logs and stumps, although they are pretty common in forests. You might want to consider it.

    ReplyDelete
    Replies
    1. Stumps I can do already, fallen logs are kind of a problem. I need to think about that. Thanks for the suggestion.

      Delete