A lot of people have mentioned the plants as an area we could improve in Overgrowth. For this reason, I made a point of trying out games that have great plants, such as Crysis, S.T.A.L.K.E.R., The Hunter, and Battlefield 1943. I stared at the plants to figure out how they were built. We even went so far as to load plant assets from other games into Phoenix just to get a better look at them. It's fairly easy to make plants that look good, but it's extremely hard to make good-looking plants that use as few triangles as possible for their 3D models. Here I have boiled down what I have learned from these other games about Xtreme plant optimization!
Above are the basic building blocks of video game plants. On the left is the most modest of plant branches using a single triangle, and on the right is the Cadillac of tree branches with a whopping 6 triangles. Some of these shapes give a lot of bang for the buck, and some are not worth using. Which is best has mostly to do with how the geometry is perceived by the viewer.
You may be thinking here that because the single triangle branch looks the worst, maybe it isn't worth using. The truth is that it can be very useful to fill plant interiors, where the exterior branches are able to hide the bad angles. This is a technique used in Crysis, and can make a plant look really dense.
This branch is about as useful as using two 1tri. branches. It still has one bad angle. It is nothing special, but no real reason to avoid it.
This is the first branch option with no bad angles. This is the best basic branch piece, but not that great for something that may poke out of the bulk of the foliage.
Although this has no bad angles, the same as the 3 tri. branch, it also basically looks the same as the 3 tri. branch and so you are wasting one triangle. I don't use this unless I have a squared off branch texture, but I try to make sure that doesn't happen.
This is the best looking basic building block because the extra edge loop on the back allows you to curve the geometry naturally. This is great for smaller palm tree type leaves, and branches that are sticking out of the foliage. Plants with mostly planer branches look good with this too, like some conifers.
There are a few more basic tips for how to construct a tree that looks as dense as possible. It is important for bushy trees that the branch geometry has their planer faces pointed towards where you expect the viewer to look at the tree from. You can use all the triangles in the world, but if the player only sees your branches edge-on, it will look bad.
Does anyone else have any tips on how to optimize trees? I am always trying to improve so I would love to hear about new techniques! (permalink)
Track us on ModDB (visit our page)
So 6 triangle ones will be used? :-) Won't it up the hardware requirements?
Unfortunately, I know nothing about this stuff, so I can't help. = (
6 triangles seems a little when you use 1 piece, but since we're talking about hundreds or thousands of plants, we could guess in this formula:
( [Sets of Triangles] * [Number of sets] ) * [Number of plants]
If a plant has an average of 5~30 different sets to form a plant according to it's size, consider the smallest plant using around 5~7 sets of triangles:
5 * 6 = 30 * 100 or 1000 plants... You'd have around 300 to 3000 Triangles or poly JUST for the small plants...
The best idea is to mix 1 triangle with 2 triangle to create a illusion without them all using 3 or greater triangles each...
That means each plants needs to be customized...
Also, they can add a optimization method where things very very far away won't be rendered to save resources, but may ruin some aspect of it when it comes to Depth of Field...
Maybe a illusion of rendering can work, having it so the game quickly renders what the player sees and semi-renders the things around him (or in this case, unrendering parts of it to save resources).
I thought this article was to discuss the different LOD meshes....I havent done LOD for vegetation but im used to doing 3 different for weapons. But i guess if you want a really seamless transission.
I was thinking of LOD when reading this, I've seen some pretty sweet LOD meshes, but rather then it instantly changing from the 2 to 1 or any other possibility the high LOD would slowly fade out while the lower LOD would slowly fade while moving away from a tree, stops that annoying tree's changing there LOD instantly within players vision, looks ugly :(
Just a thought.
Couldn't you just incorporate this in to LODs? Make the furthest LOD the singe triangle pieces, and the most detailed LOD the 6 triangle pieces. I know that Crytek does a ton of LODs for their foliage.
Just don't use sprite based vegetation, not even for the grass. Sprites are sooo last gen.
Hmm.. not last gen (or maybe they are xD), but they are ugly most of the time.
They are using models for the grass I'm pretty sure, at least they have grass models since a few alphas back.
Cool.
I think Speedtree has the fastest/best looking implementation of foliage. Each of the leave elements are ALWAYS oriented to face the view. This gives the trees a very full bushy look.
Mind you, this doesn't work with all trees as some trees are naturally more planar (eg tropical trees).
We do a lot of foliage in our game and it's a pain in the *** getting them to look good while keeping the polycount down. I'd recommend going the speedtree route (ie. making each leaf element a sprite facing the camera) for the majority of your trees.
I do believe TESIV: Oblivion had such a system. Except for staring directly up into the tree and spinning around quickly to produce some trippy leaf effects, the trees always looked rather nice.
oblivion allso had speedtree implemented, so it had advanced proceduraly generated trees
OG just uses models atm basicly :)
You can try to see if you can create illusions of it using more than 1 triangles when it is actually one...
Might take a bit of work though...
To create such illusion, lighting and reflection might be needed in it but might also cost resources from those respective uses...
Ah I got it... For things like Pine Trees where leaves are seen on the bottom, and covers up a lot, use 2 or 3 tri just for the outside and bottom areas... For the top use 1 or 2 tri since players can't really see it that well...
Nice.
This is probably a far out idea that wouldn't work for technical reasons but just throwing it out there..
What about a single poly with a parallax map that supports opacity? (through a opacity map or alpha channel.) I don't know if its possible to make parallax maps really look like geometry to that degree or not at this time
Parallax maps only look good if the protrusions aren't extreme (ie. similar to bump maps). You'd get massive stretching, not to mention the fact that trees have empty spaces IN BETWEEN the leaves which is impossible to emulate with a parallax map. The tree would look like a spiky mess.