Jump to content
  • Advertisement
Sign in to follow this  
Psychopathetica

Snow Physics?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

There is little to no information on this at all everywhere I go. Even Google had no answers and I probably won't get too many here unless I'm lucky. But what I wanna do is simulate realistic falling snow with wind being a factor to blow the snow to the side as though theres a small blizzard. Basically I'm using this for my title screen to the game I'm working on. So far the intro I programmed is pretty epic, and the title screen having blizzard like snow with how it looks right now should have jaw dropping results if done right. Does anyone have any bright ideas how this can be done? Thanks in advance, and I'm using C++ and DirectX 9 :)

Share this post


Link to post
Share on other sites
Advertisement

Particles, but you need to model turbulence in the air I expect to make it look realistic. Depends how realistic you want it to look? If you want to model build up of snow you gonna need a lot of particles.

 

EDIT: So you nee to model air as a fluid for turbulence I expect, look into fluid simulation with turbulence effects.

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites
I would start looking into Hydrodynamics of the air flow. Start with one large global wind direction and blend in few smaller local vortexes. Tweaked right it should look good.

You might want to account for the collision detection of snowflakes when they are close to the camera. It kills realism if they just pass through each other...

Share this post


Link to post
Share on other sites


You might want to account for the collision detection of snowflakes when they are close to the camera. It kills realism if they just pass through each other...

 

I doubt you are going to notice. If you see two snow flakes passing through each other you will assume that one of them must have been farther away than the other, and you won't think much of it.

Share this post


Link to post
Share on other sites

Agree with Alvaro, I find it hard to believe anyone would notice snowflakes not colliding :D

 

If anything it might look more jarring with them colliding, I can't say snowflake collision is something I've ever noticed in real life.

Share this post


Link to post
Share on other sites

Hi Psychopathetica,

 

I have a degree in Physics, and a decent background in programming (mostly command line programs, or math simulations, no video games). I would agree with Paridigm Shifter above, you'll get the best results if you model air as a fluid. If you want to PM me I'd like to see if I could help you out in anyway, I find this problem very interesting. 

 

Thanks,

- C. Peltier

 

Share this post


Link to post
Share on other sites

Alright I'll look up information on turbulance physics. Snow and snowflakes are kind of weightless. I can imagine how they get blown through the air. I'll come back with what I found out as soon as I gather up more information.

Share this post


Link to post
Share on other sites

I would go with simple solution. You may integrate movement of the snow particles like in the case of any other object with Newton law.

But you need to apply additional drag force D which will be proportional to velocity of the air v (in particle reference)

 

    D ~ v,

 

or maybe to square of it

 

    D ~ v^2

 

(that really depends on size and speed of the snow, it is related to Reynolds number, but in game I would go with visual correctness).

 

The air velocity field may be easily calculated with potential flow/free vortex flow using sources, sinks and vortices.

You may even make a setup arrangements of flow fields, without reallly modeling them, like in this sample aplet:

     http://docs.desktop.aero/appliedaero/potential/vstream.html

This method has additional advantage that you may calculate velocity only in the interesting points (particle positions).

Above, on the  desktopAreo you may find good resources on the subject.

I would not go with Euler or Navier-Stokes equations for game purposes - computationally prohibitive.

 

Welcome to CFD - Computional (Colorful) Fluid Dynamics ;)

Edited by mawigator

Share this post


Link to post
Share on other sites

Just got home from work. Anyways im gonna check all that out. In the mean time this is kinda what I wanna simulate for the title screen:

 

 

So hopefully I can produce similar effects

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!