Jump to content
Ghost Recon.net Forums

Dev Blog: Vegetation progress 1


Recommended Posts

ArmA2 Vegetation progress

Written by Jan Hovora

Monday, 03 March 2008

vegetace_strip.jpg

Currently, we're finalizing trees and bushes for ARMA2. The biggest problem with vegetation is impact on game performance, so we develop a lot of new techniques on the side of the engine and on the side of LindaStudio as well. We make very deep analysis of performance problems in Armed assault and we find, that the main problem is overdraw in the first 20 meters of the scene. So it means, we needed to optimize the overall surface of trees and bushes and develop some more effective shaders and drawing techniques in the engine to reduce these aspects. So what did we do?

New trees can use a more accurate representation of "polyplanes" (geometry for replacing hires branches) this reduces the overall surface by about 30%, but increases the amount of vertices. We teach the engine to use double-sided faces to reduce this increase of vertices on vegetation models.

New shaders

The original trees used shaders that use texture, normal map and two maps for diffuse and ambient attenuation, that means four stages. Now we use a special tree shader with texture, normal map and macro map. This macro map has colorization information in the alpha channel as well as in RGB ambient lightmap. This solution gives to the artist a better overall control on a tree's look and saves one stage, that makes this shader faster and the trees are better looking then previous ones. We also developed a shader using a technique known as "pre-computed radiance transfer", that we want to use for far vegetation lods (this technique needs just two stages). All these new things required changes in LindaStudio. For example to have the possibility to generate multiple UVs on trees, export to formats that will allow render lightmaps in 3th party graphic software etc.

Changes in engine

The ArmA2 engine is able to use a method known as Z-priming, all vegetation is very quickly drawn with a simple shader as mask with transparency and the second step is to draw only non-masked pixels with a complex tree shader, this helps a lot to reduce overdraw and allows us to use more complex shaders in the future because it decreases performance dependency on shader complexity and model surface.

From measuring we learn that sometimes it's better to use hi-poly trees with the smallest surface, then use lods with a small amount of face but with a bigger surface. We develop tools to measure these parameters in Linda and allow the generation lods of vegetation to reflect these aspects.

Also new models of vegetation use a better algorithm for optimal using of vertices in plant structure, to reduce the performance impact on vertex shaders.

Visual aspect of vegetation

Armed assault used generated trees based on scripts version 1.5 (OFP elite used 1.0). ARMA2 uses the 4th generation of scripts, that allows us to generate much more realistic branching, more effective geometry representation (with ArmA it was not possible ho have life-size trees due to the performance impact), root system, correct leaf colorization, solitary branching with real like density, most of the control over trees is now based on real botanical aspects.

vegetace_sshot.jpg

So, the last things for ARMA2, that's waiting for us is the automatic generation of special geometry, such as collision, view and fire geometry. This was always made manually and meant that often it was not precise enough for shooting, or the AI were able to spot you through vegetation. I hope that this last thing will be solved soon in a few weeks.

Clutter (grass surfaces)

From lessons that we learned about the performance impact of trees, we developed a new way of making a grass model that is more effective for drawing than in Armed Assault but looks much denser and better visually. This is also based on the knowledge that in the first lods we must target on surface reduction and in far lods on vertex reduction, because far lods are drawn with a very limited amount of pixels.

There is also a nice change in the engine, where we can now particularly colorize vegetation clutters by satellite map, this allows us to produce non-repetitive surface with a more realistic look that naturally fits to the landscape (see results in the picture at the top of this article).

Future

vegetace-linda-lowres.jpg

The immediate future will see us finalizing all key needed models and "tree" technology for ARMA2. After that, we will work on general polyplanes. That means, polyplane could be any king of geometry or model, controlled by O2 script. This will again help a lot to reduce the surface of trees, also it will give us better tree shape and less visible lod switching. This technique will also give us the possibility to have blossoms, fruits or other special geometry on trees. We'll also continue with geometry optimization, and making better control over tree growing.

Also it will be very important to have a more open pipeline for tree texture rendering, to allow render translucency, lightmaps and precomputed radiance transfer maps directly in LindaStudio. Development of a system for automatic generation of special lods is the first step towards a more general system that will one day allow tree skeleton creation and also a future system for physical interaction with vegetation.

Link to post
Share on other sites

Aye, this is the kind of thing that gives me faith in developers. Throwing a screenshot out and saying 'it'll look/work better later :D' shows that whoever's doing the PR doesn't actually understand the systems at play. A blog writeup like this inspires a lot of confidence.

Link to post
Share on other sites

Hopefully they will be able to pull it off...particularly when running high res/settings, & full view distance...

If those SS accurately reflect the makeup of forests (with a realistic amount of groundcover now added), my guess is that the MSR with begin with a quad core or better.
...and this is way off the mark.
Link to post
Share on other sites

If those SS accurately reflect the makeup of forests (with a realistic amount of groundcover now added), my guess is that the MSR with begin with a quad core or better.
...and this is way off the mark.

It is. That's what they talked about in the article. The polygon and texture memory requirements for that kind of thing are not near as much trouble as you think, it's sorting the alphas and draws and opacity -- arma did this horribly. It sounds like they have a good handle on things this time, so the system requirements shouldn't be too bad. Or, if they are, at least not because of vegetation.

Link to post
Share on other sites

It looks like most of u missed this info:

Projected Minimal PC System Requirements

  • * Dual Core CPU
    * 512 MB RAM
    * GPU with Shader Model 3 and 256 MB RAM
    * Windows XP or Windows Vista

Projected Optimal PC System Requirements

  • * Quad Core CPU
    * 1 GB RAM
    * Fast GPU (8800GT level) with Shader Model 3 and 512 or more MB RAM
    * Windows XP or Windows Vista

They look a bit weird cause for example i don't think anyone has a dual core with just 1/2GB or ram but....

Edited by Big
Link to post
Share on other sites

^

Thanks Big :thumbsup:

...it's sorting the alphas and draws and opacity -- arma did this horribly.
Well that's beyond me so I'll take your word for it.
It sounds like they have a good handle on things this time...
Hopefully.
Link to post
Share on other sites
Projected Minimal PC System Requirements

* Dual Core CPU

* 512 MB RAM

* GPU with Shader Model 3 and 256 MB RAM

* Windows XP or Windows Vista

Projected Optimal PC System Requirements

* Quad Core CPU

* 1 GB RAM

* Fast GPU (8800GT level) with Shader Model 3 and 512 or more MB RAM

* Windows XP or Windows Vista

hmm...still looks like Crysis to me lol. :lol:

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...