Preventing Out-Door dust particles from entering inside buildings
#1 Members - Reputation: 358
Posted 21 December 2012 - 11:32 PM
Same apply to rain and snow, of course you don't enter a building and see it's raining inside it.
How can I prevent the dust/rain/snow particles from getting inside buildings?
#4 Members - Reputation: 1084
Posted 22 December 2012 - 12:47 PM
Cheat.
It's always easier to cheat. You're trying to solve slightly the wrong problem; You're trying to figure out how to run a system where you make random rain and then work out how to not have it enter the buildings.
It's much easier to do this in your level design. Make it "rain" in boxes. The raindrops start at the top and fall down (you can do this in the vertex shaders fairly easily). When they get to the bottom of the box they get recycled at the top.
You plonk these down in your level... at ground level in the streets, at roof level over the buildings. You should also then be able to cull them fast -- if the view is indoors, it can't see up anyway, so the overhead rainboxes are never rendered. (You can get away with the rain sequence repeating as well. You can also get away with using the same rain positions for all the boxes... add some distance fogging and no-one will ever spot the rain tiling :-)
Likewise your dust -- it lives in boxes. The player moves through the box, dust is generated, it drifts back down.. job done. The dust is never made where there isn't a box -- like inside.
The goal of games development is to make something that's real enough that if the player co-operates with suspension of disbelief looks right. It doesn't actually have to solve all the annoying things for real if you can cheat...
#6 Members - Reputation: 358
Posted 22 December 2012 - 03:57 PM
For the rain/snow, do you mean I will create bunches of boxes following the player position, when those boxes detect collision with the building, the boxes Y position change to be over the building?
For the the dust, if the player is looking from a window inside the building, the player should still see the dust, so I will not stop generating the dust particles when the player is inside the building, I want it to be generated outside the building so the player can see it from the building window or door, I'm talking about a dusty weather, I found a screenshot that will let you know what I'm trying to accomplish, see the screenshot:
http://shots.ikbis.com/image/20894/large/Bad_Weather-_Tripoli_2006.jpg
#8 Members - Reputation: 1773
Posted 23 December 2012 - 09:38 AM
Another possibility is to not exclude the particles from the room but the room from where the particles flow. You have to destroy particles anyway, but it may be too complex to define the volume where particles are allowed to live. Hence you can move the rooms outside the (simple) box where the particles live, and use portals to virtually re-connect the rooms.
#9 Members - Reputation: 358
Posted 23 December 2012 - 01:23 PM






