Home » Community » Forums » Graphics Programming and Theory » Snow on terrain?
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic

Page:   1 2 »»

 Last Thread Next Thread 
 Snow on terrain?
Post New Topic  Post Reply 
quote:
Original post by bishop_pass
I've seen some pretty lame snow on mountains in computer graphics. Even the cover of the newest Bryce package doesn't place the snow very effectively. So let's talk about snow.

The accumulation of snow is based on several factors, including: The steepness of the slope, the coldness of the environment, exposure to sunlight, most recent snowfall, and exposure to wind.

The steepness of the slope: This is obvious, and snow will not adhere to slopes beyond a certain angle. Although ice might.

The coldness of the environment: The colder the environment, the longer snow will remain after winter has passed. Latitude, altitude and proximity to tropical ocean currents play a major role in the coldness of the environment.

Exposure to sunlight: In the northern hemisphere, north faces of mountains will retain snow longer than south faces. This is because during winter and spring, the south faces are continually exposed to the sun and thus have greater melt rates. Also, couloirs and chutes which have limited sun exposure will retain snow longer than their counterparts: ridges and aretes. In addition, couloirs will receive the snow that cascades down from the walls of the couloir.

Exposure to wind: Summits, ridges and aretes are highly exposed to wind. Fresh snow is immediately wisked off these airy formations.



Edited by - bishop_pass on 6/30/00 1:39:20 PM


 User Rating: 1031   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Interesting.

I believe a simple mathematical model would be a good start. It would be fast and based on real world observations.

Something along the lines of this:

S = L * A * N * F * C * (1.0 - R) - M where

S = snow coverage
L = latitude (greater towards pole) (normalized to 1.0)
A = altitude (normalized to 1.0)
N = 'north face' factor = dot (triangle normal, P)
P = normalized vector pointing towards pole
F = flatness = dot (triangle normal, 'up' vector)
C = couloir factor (gullies)
R = ridge factor (aretes)
M = meltoff (represents how far past snow season we are)

If S is less than 0, S = 0.

A good working knowledge of terrain topology helps.


 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Here's an idea.

When we generate our terrain textures we usually base it on two parameters: height and slope. We set some restrictions on both and pick a required texture based on those restrictions. So how about making a base class with a function TEXTURE* GetTexture(...). Then for each material we derive a separate class that uses a specific algorithm to figure out if the material can be applied at a certain position on the terrain.

Now about CSnow I think you've mentioned most of the critical variables. With the exposure to the sun I think it would look a little weird if the faces lit by the sun had more snow then the ones unlit (although that's how it might be in real life). I think a better idea would be to put more snow on the unlit faces.

Sometimes when the environment is warmer the snow will last longer on the cliffs because when it's warm the snow is more moist and therefore snow particles stick to each other better. When it's cold the snow is too dry and the particles don't stick to each other so more of them fall from the cliffs down on the ground. It's hard to figure out exactly how temperature effects the snow so you might wanna get a value ranging from 0 to 1, 0 being all snow is on the ground and 1 being all snow is stuck to the cliffs.

Did anyone actually implement something like this?

 User Rating: 1031   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Calculating C:

Perform a one time raytrace from each cell in a global distribution out towards the sky. Shoot about 100 rays. The percentage of rays which are intercepted by other terrain features represent the amount of warm daylight received per day. You needn't worry about factors such as winter or summer solar paths, as these are accounted for by the 'North Face' factors and the latitude factors.

Calculating R:

In a similar manner, shoot rays horizontally and downwards, but factor in distance before the ray intercepts terrain. The more rays fired which do not intercept terrain right away are an indication of the wind exposure this piece of terrain encounters. Ridges and peaks are naturally the most exposed.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

This is very interesting. I've always played with the idea of a realistic way to create snow covered mountains, perhaps even with seasonal simulation. I never really came around implementing something, unfortunately.

bishop_pass: your equation looks like a promising start. There is one missing point though: wind. I guess typical wind strength, direction, concentration (perhaps due to topology) and temperature would have a large effect on snow cover, considering the fact how snowflakes are transported. Perhaps some kind of basic fluid dynamic system could be created.

Are there any good papers one could recommend about this topic ?

/ Yann

[edited by - Yann L on June 19, 2002 4:49:20 PM]

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Yann L
There is one missing point though: wind. I guess typical wind strength, direction, concentration (perhaps due to topology) and temperature would have a large effect on snow cover, considering the fact how snowflakes are transported. Perhaps some kind of basic fluid dynamic system could be created.

My equation does include the results of wind. Ridges and peaks are the most exposed. Wind takes the snow from these areas and the snow usually settles down into the couloirs. My C and R factors account for this in a simple way.



 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:

My equation does include the results of wind. Ridges and peaks are the most exposed. Wind takes the snow from these areas and the snow usually settles down into the couloirs. My C and R factors account for this in a simple way.


Hmm, yes. But what about directional exposure ? Due to topological features (and wind direction), specific sides of a peak might be in wind-shadow, thus less exposed to snow (and perhaps lower temperatures). On the other hand, certain terrain features could canalize (sp?) wind (eg. narrow canyons), so that it might reach places that would otherwise be unexposed. I think a simple fluid dynamic solver using a voxel approximation of the terrain would be more accurate. Although I'm not sure how fast this would be.

/ Yann

[edited by - Yann L on June 19, 2002 5:02:42 PM]

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Yann L
... considering the fact how snowflakes are transported. Perhaps some kind of basic fluid dynamic system could be created.

I continue to maintain that thinking in terms of snowflakes isn't necessary. What is important is where the snow ends up due to topology and latitude (which intercepts wind and sunlight) and altutude, latitude and topology (which determines ambient temperatures).

Determine where the snow finally settles and then determine how long it's going to stay there.



 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by Yann L
Due to topological features (and wind direction), specific sides of a peak might be in wind-shadow, thus less exposed to snow (and perhaps lower temperatures). On the other hand, certain terrain features could canalize (sp?) wind (eg. narrow canyons), so that it might reach places that would otherwise be unexposed. I think a simple fluid dynamic solver using a voxel approximation of the terrain would be more accurate. Although I'm not sure how fast this would be.

The raytracing preprocess handles some of that. But most importantly is how realistic the results look. I can speak from experience. Wind is almost always happening on the ridges and peaks because nothing blocks it. Wind is rarely happening in the canyons and unexposed faces (to any great significant degree).

From a visual perspective, to me one of the most important things is to get the snow off of the exposed ridges (if they are sharp enough) and get the snow into the chutes and gullies.



 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Late season snow shot. (Probably early summer).

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Winter snow coverage shot.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Interesting. Perhaps a fluid dynamic slover is actually a bit overkill. It would be interesting to use a satellite scanned DEM to recreate a virtual terrain from a known area, from which photographic shots at different seasons are available. And then test various snow distribution methods and compare the results with the real thing.

/ Yann

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Spring time snow coverage shot of the High Sierra.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by kill
With the exposure to the sun I think it would look a little weird if the faces lit by the sun had more snow then the ones unlit (although that's how it might be in real life). I think a better idea would be to put more snow on the unlit faces.

That's the general premise, but I think you've over simplified it too much.
quote:
Original post by kill
Sometimes when the environment is warmer the snow will last longer on the cliffs because when it's warm the snow is more moist and therefore snow particles stick to each other better.

I would mostly disagree with this. In warmer environments (due to many of the factors I originally mentioned) snow goes through a daily melting and refreezing process (generally a day and night cycle). Each melting cycle sends a little bit more snow downward before it refreezes. Successive refreezing turns the snow into corn snow and eventually ice (if it lasts that long into the summer) which is usually only in steep gullies.
quote:
Original post by kill
When it's cold the snow is too dry and the particles don't stick to each other so more of them fall from the cliffs down on the ground.

Maybe, maybe not. I'm not going to speculate on this. I can't say for sure.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I wonder if there are any siggraph papers about this. I'll look for some of them tonight.

A REALLY good simulation would be starting out the game without a snow cover then walking around, then in a couple of hours suddenly realizing that you're knee deep in snow. In MMORPGs it would actually be a pretty good idea because the world is persistant and it's nice to have dynamic snow when the season changes. Also you'd somehow have to simulate what happens to the snow as temperature changes...

See when we're talking about natural phenomena like fire or water it's hard to do a good simulation in realtime. With snow it's different because the actual changes are very graduate (freezing of snow over night and melting during the day, as you said). You could have a system that calculates only a small part of the whole equation per frame and does it for many frames so you could update your data every minute and the user would never notice the difference. So a dynamic particle simulation would probably be feasible. On the other hand I think it's complicating thing way too much. I'd still stick to the simpler side of things that could achieve good results.

I really don't have time right now to work on snow because I have many other things to do. When I get done with all of them (shouldn't be more then 2-3 weeks) I'll probably write a simple simulation and post some screenshots here. I'll stick to the simpler ideas and we'll see what results I can get. If they're satisfactory, great, if not we can think of fluid dynamics

By the way, can you guys point me to any books about fluid dynamics and navier-stokes equations and their uses in computer graphics? I couldn't find any literature on this.

 User Rating: 1031   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Are there any good papers one could recommend about this topic ?


I'm not sure if it's already been mentioned, but "Computer Modelling of Fallen Snow" is quite a good paper on the subject. Warning: I have the postscript and its about 40Mb.

Stimp.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

A quick note, I saw an article link on vterrain.org about visibility algos... one was that of horizon level for each height element. They use this for lighting calculations, however, couldn't you use this (exposure to sun/wind) for your snow melting/wisking calculations?

Anyway, you might even want to take melting and hardening snow, temperature, and other into account.

Just my 2 cents.

-Michael

ps. Article: http://www.dgp.toronto.edu/people/JamesStewart/terrains/

Btw, I've used a sunlight exposure type calc across the entire sky for snow amount... I should probably multiply by the height though... Would make it easier to have it look better, later.

 User Rating: 1188   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

I just want to point out that my thoughts on snow have generally been along the lines of a preprocess given a time of year, latitude, etc. to determine how the snow would look for that time of year. Realistically! Without a really complex algorithm. Think of it as a texture maker.

My algorithm, ideas, etc. with regard to snow have always been in the spirit of getting really good looking macroscopic snow coverage in mountainous terrain paying close attention to latitude, altitude, topology, time of year and exposure to wind.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

It should probably be real simple to adapt the general code for the lighting and procedural texturing of a terrain. The visibility portion is contained within the former (albeit in a simplified form), and the slope/altitude considerations are within the latter. I suppose I'll give it a shot when I either complete or decide to give up on my 4E3 entry.

Incidentally, does anyone know where to find nice ridgy heightmaps to test the code on, and also what sites are the most reliable hosts for images?

------------------------------------------------
The wind shear alone from a pink golfball can take the head off a 90-pound midget from 300 yards.

-Six String Samurai

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

One question still remains: how do you graphically represent the snow ? Simply changing the terrain texture will look good from a distance, but it will be unrealistic near the viewer. Fallen snow has a volume, and one need to represent that. The "Computer Modelling of Fallen Snow" site (see Stimpson's post) has a nice picture of what I mean: if you look at the trees and the cabin roof, there is a volumetric snow layer added. What would be an efficient method of rendering that in realtime ?

/ Yann

 User Rating: 1996   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

quote:
Original post by bishop_pass
I just want to point out that my thoughts on snow have generally been along the lines of a preprocess given a time of year, latitude, etc. to determine how the snow would look for that time of year. Realistically! Without a really complex algorithm. Think of it as a texture maker.

My algorithm, ideas, etc. with regard to snow have always been in the spirit of getting really good looking macroscopic snow coverage in mountainous terrain paying close attention to latitude, altitude, topology, time of year and exposure to wind.

I don't know if you've already seen it but the paper Geospecific rendering of alpine terrain presents a good model of how to do this. They use satellite imagery to work out where patches of snow, rock, grass etc should be then from corresponding dem data they can draw the snow accumulation at different seasons. It's quite an interesting read.


-----------------------------
OpenMountains Yes I am gonna finish it!!

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

You guys talk about using testures... How about a snow mesh?

Well this will make more polys to display but it's fisable...

You draw a white detailed texture mesh, that takes the shape of the terrain mesh, above the terrain mesh. Now depending on your discussed calculations, you pull the vertices of the snow mesh close to the terrain mesh. Eventually the verts will be pulled down enough to start showing the terrain faces through.

The snow mesh can also have more LOD then the terrain depending how realistic you want to make it and HW limitations...

With this kind of system. You can actually have the snow pushed around when someone walks on it, if more snow falls just relift the verts... etc... But of cource this will need to push lots of polys...

Mybe this is not fisable yet because of the amount of polys. Though I have seen this in Virtua Fighter 4 PS2 and Dead Or Alive 3 for the XBOX, but they are far more simpler cases...

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Well, as I said earlier, my original proposal was to model macroscopic snow coverage.

If you want to pursue a more detailed model of snow, you should look into sun cups (Neve Penitentes), snow flutes, cornices, bergschrunds,

Sun cups: here and here.

Snow flutes as one approaches Bishop Pass.

The bergschrund of North Palisade and neighbors. It is the horizontal break you see across the center of the picture.

Macroscopic view of snow coverage as viewed from the summit of North Palisade on June 19th.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Oh yeah: a cornice.

 User Rating: 952   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

To account for the rendering of snow...

For your mountain mesh, iterate through each vertex. Calculate the amount of snow that would be retained on each vertex, then translate that vertex directly up the Y axis (Or Z, whatever 'up' is to you) a propotionate amount. In the same way, perhaps weight the texture blending on it more towards pure white (or a snow texture).

Essentially, it's a displacement map applied to the mesh.

 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link
Page:   1 2 »»
All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: