Jump to content
  • Advertisement
Sign in to follow this  
Medo Mex

Preventing Out-Door dust particles from entering inside buildings

This topic is 2009 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

Lets say we are in a dust weather, I use the particle engine to create some dust smoke out-door, however it's getting inside the buildings which is not realistic.

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?

Share this post


Link to post
Share on other sites
Advertisement

Use clipping planes corresponding to the outside walls of the building when you draw the particles. A pixel should be discarded if it lies on the wrong side for ALL the planes, (not just one)

Share this post


Link to post
Share on other sites
@hupsilardee: I thought I could have a boundary box around each building, but I don't know how I can know if the particles are inside the box so I can discard it.

Share this post


Link to post
Share on other sites
@Katie: That's interesting idea.

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

Share this post


Link to post
Share on other sites

"bunches of boxes following the player position"

 

They don't need to move -- you just put them in (say) the streets between the buildings.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
@Katie: That would be a little bit complicated especially if I'm working on a large mission, adding thousands of boxes in a level design just for rain/snow is a waste of time, I'm trying to implement a way that has nothing to do with level design so I can just enable/disable rain in the level design without having to create thousands or hundreds of boxes.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!