Master your own destiny! Command a nation!

Happy New Year!

Happy New Year everybody!
Late at night, when everybody is sleeping – Reto.Hal9k climbs into his programming hideout and with only a single candle lit, he writes new render features that hopefully makes their way into the game one day. This time he has been working on weather effects – and in this case: SNOW! – Reto.Robotron3000


This is the second iteration of the snow system. Making a snow cover is simple in a deferred engine, but I’ve been thinking a long time about how to implement it so that it has a small as possible performance impact. I initially had ideas about laying down the g-buffer and then do another pass to mask out snow, but I disliked the solution because of the increased (2x g-buffer fill). I finally came to the solution described below.

It consists of two parts: The snow cover on the terrain and objects, and the snow flakes falling down.

  1. The snow cover is integrated into the g-buffer layout part of the material shaders. It works by fading albedo, specular and normals towards the snow cover colors based on the dot product of up vector and the normal vector. It also uses a topdown runtime generated shadow map to avoid snow inside buildings, etc.
  2. The snow flakes are done by a simple particle shader, using a time based offsetting of the initial position to avoid updating the vertex buffer.

The system can be turned on and off runtime so it integrates nicely with our current weather system.


From here its quite simple also to add rain..

We still need to work on masking out dynamic and user defined objects, masking out snow particles using the same shadow map as the snow cover, creating tracks after vehicles, creating special impacts and explosions and adjusting the soundscape and so on, so it will still take a while before it gets into the game.

  1. -Ger-Schilli-Ger-Schilli12-31-2013

    This looks quite awesome :O

  2. kalashnjkovkalashnjkov12-31-2013

    but how about Winter uniform?

  3. VaJohnVaJohn12-31-2013

    It will be nice addition,but also some uniforms like kalas said would be nice.

    Also some voices would be cool !

  4. x11bckx11bck12-31-2013

    omg you are insane, looks nice and cool to see whats going on!

  5. Pvt_LarryPvt_Larry12-31-2013

    Why do you have to do this by candlelight, did you forget to pay the electric bill?

    But this is really cool, and if it can be done with minimal fps impact then kudos to HAL9k for my favorite kind of winter weather – snow that I don’t have to shovel or drive through.

  6. patton1995patton199512-31-2013

    Let the Battle of the Bulge begin !!!! :D

  7. aufar100aufar10001-01-2014

    Now i can play with my axis recon again >:)

  8. daeqolaxdaeqolax01-01-2014

    Great work! Waiting forward to see rain, when it comes. :D

  9. cRo4Ti4cRo4Ti401-01-2014

    brrrr…. looks cold

    • cRo4Ti4cRo4Ti401-01-2014

      jeahhh snow

  10. deathmachineptdeathmachinept01-02-2014

    Very awesome, but we really need thunder, most games have rain both those with thunder are only singleplayer :(

  11. AntiheroqqAntiheroqq01-02-2014

    A bit late for snow imo. Might wanna fix the Axis-AA gun first instead of adding snow and crap.. Iron-sight is still bugged.

  12. CiaphasCiaphas01-10-2014

    I am looking forward shooting from church tower figures in green uniforms, who would finally become very distinct apon snow covered terrain.)


    1) Do not forget to strip all trees from their leaves! It will not do if you just use new shader with the same leaves. The forest should become see through, not just white. THIS IS MOST IMPORTANT OF ALL.

    2) Wheat should die also, wheat fields — turn into white plains. The same should be applied to all kinds of high grass.

    3) There should also appear ice near the river banks.

    4) Also you should think about introducing penalty effects for those, who swim in cold winter water. They should have their hands shaking after a few minutes and their condition should worsen over time until they die from hypothermia, unless they do something to make them dry again. Those who stay in cold water for a long enough time should die far faster.

    5) How about giving snipers winter camouflage, so that they would have some advantage over regular infantry? Those poor american snipers in their poisonous green camos are just destined to die first of all on winter maps.
    Paratroopers, probably, should have winter camouflage as well.

    6) Maybe trench coats for regular soldires?

  13. CiaphasCiaphas01-10-2014

    I have a question concerning technical side of weather system.

    Why not just make winter variant of maps? The same meshes but with another, their own winter textures. This should have less impact on performance, than adding additional work for shaders. Also wouldn’t special winter textures look better than regular summer textures combined with snow textures or whitened somehow with the help of shaders? Also once you manually apply snow covered textures, you do not need to add any dynamic checking, to know if snow falls or not in this place. Do not forget, you have to get rid of leaves on trees anyway, add some ice, add piles of snow, that have accumulated along walls and in corners and maybe other cosmetics. This all means you will have to change meshes slightly. So why not just make separate winter maps?

  14. Palo_999Palo_99901-12-2014

    nice picture :D

  15. complejocomplejo01-16-2014

    I don’t want my black uniform this map

What are you waiting for soldier? We need heroes on the battlefield and generals to lead them!