Rain in WoW

Started by
16 comments, last by Sirisian 16 years, 2 months ago
Very rare drops you car draw on surrounding faces with density based on face area. Very dense drops you car distribute uniformly on 2d area and take Z from faces around you (kinda collision detection, but optimised).

PS and it is not a question, how blizz do it. It is question - how all do that.
Advertisement
Thank you guys for your valuable comments, I think by finding the intersection point first then I don't need to do collision detection for every particle every frame, so I guess this is very feasible, thanks :)
You want good rain? Check out
">ATI's Toyshop demo. Pure pwnage [grin]

There's a presentation online somewhere that explains how they did the effects (plus the actual demo if you want to run it). It uses a ton of DX10 features, such as hardware particles, geometry shader effects, etc. But I'm sure you can do a lot of the effects in DX9.
Yes, I saw that demo its very good! :D but it has some limitations that is problematic in my case, the ATI implementation overlays a rain layer in front of the camera, so when you turn your camera up the rain will actually feel like raining in the wrong direction, the ATI demo just limits the camera freedom to avoid this problem..
take only splatters from that demo :)
For very intense rain you could probably randomize splashes all over the place.. Noone is going to follow the drops througout the screen and see where they land
____________________________Bjarni Arnasonbjarni.us
Quote:Original post by Rasmadrak
I personally see no reason why each raindrop couldn't be using collision detection.. it's not exactly as ray-testing once for each raindrop is a lot of stress on the cpu, not since there's probably only 300-400 drops going on at any given time.


It's even better than that. There's no memory overhead (flagging the triangles that can be splashed); there's no additional human workload (it's automatic).

And I must point out that you only need to do a ray-cast when the rain drop is spawned, not every frame. So all that matters is in average how many rain drops are created every frame.

Y.
Quote:Original post by Ysaneya
Quote:Original post by Rasmadrak
I personally see no reason why each raindrop couldn't be using collision detection.. it's not exactly as ray-testing once for each raindrop is a lot of stress on the cpu, not since there's probably only 300-400 drops going on at any given time.


It's even better than that. There's no memory overhead (flagging the triangles that can be splashed); there's no additional human workload (it's automatic).

And I must point out that you only need to do a ray-cast when the rain drop is spawned, not every frame. So all that matters is in average how many rain drops are created every frame.


Adding onto that for static objects, you can add a minimum height value to the particle. The raycasts will be done against static entities only when particles spawn giving the minimum height for static objects.

Then if you choose to perform collision on moving objects you can use spatial partitioning to find if any moving objects need to be tested. A trivial distance equation can be done which costs nothing (as long as you don't use square root). If the distance is greater than the velocity of the rain drop and the object then it's impossible for a collision to occur.

Performing this in conjunction with spatial partitioning makes testing for moving or static entities extremely cheap. Even cheaper if you use grid spatial partitioning and just do 3DDDA then it's almost free (store the 3DDDA variables in the particle and you'll see why).

This topic is closed to new replies.

Advertisement