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 :)
Snow Physics?
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.
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...
VladR My 3rd person action RPG on GreenLight: http://steamcommunity.com/sharedfiles/filedetails/?id=92951596
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.
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.
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
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.
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 ;)