Post news Report RSS Large scale terrain vegetation

Initially we wanted vegetation to play a role in the gameplay, eg. we wanted players to be able to crouch and hide in the vegetation. In most other games (at least in those I’ve played) the vegetation is clipped away in the distance leaving the ground completely uncovered. The effect would be that the player would crouch down thinking he would hide in the high grass, but in reality all other players would be seeing him crouching on a bare piece of ground.

Posted by on

By Reto.Hal9k, Render Programmer

We already had a vegetation system similar to what exists in other games, but performance got really bad as soon as we moved the clip plane further away from the camera, so I started to look into other solutions. I had some ideas that I needed an algorithm that would work somewhat like our terrain drawing, where the terrain would get coarser in the distance.

terrain1
Terrain rendering getting coarser with the distance


So I started with a regular pattern that essentially would keep the overall structure across LOD boundaries, in order to keep popping artifacts at a minimum.

terrain2
Terrain vegetation using a regular distribution


I tried various solutions to try and hide the obvious tiling, but none I could think of were good enough. I then looked into a different solution inspired by the paper by Kevin Boulanger Kevinboulanger.net, as can be seen on the screenshot below:

terrain3
Grass rendering using the proposed method of Kevin Boulanger using his texture


And it worked really well for low vegetation like grass. But I wanted something where there was more variance in the visuals. So I went back to the idea of using a system like the terrain rendering but now I experimented with an irregular structure for the vegetation.

terrain4
Irregular mesh structure for vegetation


And I felt it looked more chaotic which was what I needed to get enough variance. Based upon this method I expanded the method to allow for up 4 different kinds of vegetation packed into a single draw call. Below is a debug version that shows where the different types of vegetation would be drawn.

terrain5
Different kinds of debug vegetation


And here is a screenshot showing the same scene with vegetation:

terrain6
Terrain vegetation without anything else


And now the same terrain with everything else:

terrain7
Terrain vegetation with the rest


Sign up for an Alpha-key here!

(Heroes & Generals blog link)

Post comment Comments
PierreOfTheFrench
PierreOfTheFrench - - 320 comments

Looks great, I definitely think that the problem of vegetation disappearing in the distance is extremely annoying. I remember this being a big problem with BF2. Keep up the awesome work guys!

Reply Good karma Bad karma+1 vote
KodY
KodY - - 102 comments

And not only BF. Even now AAA games have that popping up gras and vegetation in the distance. Footage I've seen from Skyrim for example indicate this quite a lot (I know this is not a competitive game but it looks really odd when you walk across a field and the grass just pops-in in a radius around you)

Awesome stuff.

Reply Good karma Bad karma+2 votes
sbnewsom
sbnewsom - - 656 comments

That only happens on certain settings.

Reply Good karma Bad karma+1 vote
MaTudre
MaTudre - - 75 comments

Ground breaking stuff. Good job.

Reply Good karma Bad karma+1 vote
Tetsuo3
Tetsuo3 - - 15 comments

This is great. LOD popping is one of the most unimmersive and annoying things in game. I think it was Crysis 2 on the xbox where the defence bollards would keep popping in and out of view in the distance, but you could still see the characters standing behind them.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: