# Goodway to do falling snow?

This topic is 4880 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Anyone know of a good way to do falling snow so that it looks really really nice and blends well with textures and the sky? Code and textures and examples or documents or just ideas and help would be greatly appreciated!

##### Share on other sites
Looks nice!

I suppose you've already looked into point sprites? I'm using them all over my game for every possible particle effect you can imagine. You can produce some really amazing results with point sprites in a relatively short period of time... I am mostly using them in my game for explosion and smoke effects, but I can imagine how easy it would be to whip up a nice-looking snow emitter in an hour or two if I wanted.

http://www.codesampler.com has some nice tutorials all-around, but also a good one or two on pointsprites.

-dbh

##### Share on other sites
http://www.codesampler.com/dx9src/dx9src_7.htm#dx9_particle_system

^^^ That's the specific one I was thinking of.

-dbh

##### Share on other sites
if you want to make it look like the falling snow lies on the ground and stuff, you could also use a pixel shader. You could use something like a tileable noise texture (Perlin noise for example) and multiply it´s value with the height component of the point´s normal. The normal being normalized the height component of a normal pointing straight up will be 1.0f (or something close to that). You could furthermore use a factor you set to determine how long it has been snowing, so the snow coverage increases over time. The result of this should be used as alpha value, color should be white for snow. The normal of the point has to be clamped to [0,1] to be usable for that.

float4 result;float ny = min(1.f, in.normal.y);ny = max(0.f, ny);result.a = ny * tex2D(noiseSampler, in.texCoords) * timeFactor;result.rgb = 1.0f;return result;

It´s been a while since I´ve done something in HLSL last, but this could work.
As for the falling snow itself, I don´t have any clues, except I guess that older games could have used a screen-filling quad with some animated texture for weather effects, but no guarantee on that one.

Good luck!

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
634136
• Total Posts
3015757
×