|
||||||||||||||||||
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? |
|
![]() kill Member since: 11/29/1999 |
||||
|
|
||||
quote: |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| 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. |
||||
|
||||
![]() kill Member since: 11/29/1999 |
||||
|
|
||||
| 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 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? |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| 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. |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
| 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] |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
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. |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
quote: 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] |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
quote: 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. |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
quote: 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. |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| Late season snow shot. (Probably early summer). |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| Winter snow coverage shot. |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
| 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 |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| Spring time snow coverage shot of the High Sierra. |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
quote: That's the general premise, but I think you've over simplified it too much. quote: 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: Maybe, maybe not. I'm not going to speculate on this. I can't say for sure. |
||||
|
||||
![]() kill Member since: 11/29/1999 |
||||
|
|
||||
| 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. |
||||
|
||||
![]() Stimpson Member since: 8/14/2001 From: Australia |
||||
|
|
||||
quote: 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. |
||||
|
||||
![]() Thr33d Member since: 6/24/2000 From: Portland, OR, United States |
||||
|
|
||||
| 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. |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| 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. |
||||
|
||||
![]() Mordoch Bob Member since: 2/20/2002 |
||||
|
|
||||
| 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 |
||||
|
||||
![]() Yann L Moderator Member since: 2/6/2002 From: Breizh |
||||
|
|
||||
| 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 |
||||
|
||||
![]() Stimpson Member since: 8/14/2001 From: Australia |
||||
|
|
||||
quote: 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!! |
||||
|
||||
![]() ANSI2000 Member since: 2/28/2001 From: St-Laurent, Canada |
||||
|
|
||||
| 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... |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| 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. |
||||
|
||||
![]() bishop_pass GDNet+ Member since: 6/3/2000 From: California, USA |
||||
|
||||
| Oh yeah: a cornice. |
||||
|
||||
![]() unDiWahn Member since: 8/10/2001 From: USA |
||||
|
|
||||
| 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. |
||||
|
||||
|
Page: 1 2 »» All times are ET (US) ![]() |
Last Thread Next Thread ![]() |
|