Far Cry 2/Crysis level rendering technique?

Started by
7 comments, last by spek 15 years, 4 months ago
I'm getting started on writing a game engine for a game which will, most of the time, use outdoor environments, a lot like Far Cry 2 and Crysis. I would like to know what Level Rendering technique that these games use so that I can implement it in my engine. Any help would be appreciated
Advertisement
Billboard far away objects.

I don't mean to be discouraging, but how much experience do you have with game programming thus far? The chances are pretty good that if you don't already know how to go about implementing what you want to do (ie, if you have to ask something as general as what you asked in this post) then you should probably start with something a little simpler, like a nice ASCII or 2D graphics engine.
Check out the first gameplay video from my javascript/PHP RTS game
There are is a bit of an overview of the crytek engine here. But as MortusMaximus suggests its pretty sophisticated - I think I read somewhere that the team had 200 developers - a fairly amazing achievement from an organizational point of view as much as a technical one.
oblig.link: http://scientificninja.com/advice/write-games-not-engines

Scott
Game development blog and portfolio: http://gamexcore.co.uk
Outdoors are usually tougher than indoor. As far as I know, people use quadtrees and octrees. Sometimes portals too. That works if you don't see stuff too far away. (like the old need for speed games.)
I don't know how they did it for Far Cry 2, but there was 1 guy that worked fulltime on the fire for 1 and a half year. My guess is they use *lots* of technique.

I wish I had the information too. ^_^
Have a look at crytek's presentations. They give insight in many techniques used in cryengine 2.

Crytek presentations
http://www.cnblogs.com/linyizsh/archive/2008/10/11/1308452.html
you can use PerfHUD to analyze it
MSN:xoyojank#live.com
Not sure if this thread is dead, but anyway...

If you own Crysis you can download the Mod SDK. It contains most of the interface code for the engine, and if you're interested you can see how things fit together. Although it's pretty big (~250 large header files)...
I think Crysis and Farcry have a different way of loading stuff. Crysis levels are relative small compared to Farcry. I guess Crysis loads the entire level at once, while Farcry does streaming (like GTA games also do).

Whatever they exactly do, this might be an important deccision for you to make. Streaming allows *huge* worlds, but can also limit you on some specific rendering techniques. For example, if you need lots of different textures for rendering the terrain, you probably spend quite a lot of power on background loading.

Furthermore, both games probably use Level Of Detail for the terrain vertices and also the objects. Someone already mentioned billboards ("impostors"?) for trees far away. For example,
0..10 meters = high detail with full effects in the shaders
10..30 meters is lower detailed mesh with less effects in the shader
30..70 meters = low poly model, no normalMapping or other fancy tricks
70+ invisible or a simple sprite

The terrain rendering itself uses a mixture of texture splatting and 1 big basic texture in the case of crysis. For larger distances you will see the low detail texture that is wrapped all over the terrain. Nearby you will see detailed textures that are mixed based on "weight" or "blend" values (stored per vertex or per pixel in additional data maps). You can also use detail mapping, normalMaps and reflections in the same way for the nearby terrain.

One of the advantages of outside rendering is the relative low amount of lights. The sun/moon is a constant lightsource. You can use (cascaded) shadowMaps for realtime lighting. Eventually use an (pre-rendered) ambient occlusion map for the ambient lighting outside. Additional lightsources such as lampposts can cast shadows as well, but only if they are relative nearby the player.

I'm not sure if Crysis or Farcry uses this, but you probably need also some sort of fog for the large distances. You might want to take a look at techniques such as "atmospheric scattering".

Good luck!
Rick

This topic is closed to new replies.

Advertisement