Sign in to follow this  
DAaaMan64

Wanting to do better looking water spray. [2D]

Recommended Posts

Currently I'm using a simple spray particle system that shoots out a single texture with alpha blending from an emission point. So I was hoping for advice on making the water look better. Remember that this is 2D. Things I've been considering: 1. Metaballs, never really done anything like this, but they don't look hard to get up and running, rather just hard to get up and running fast. I'm not really sure how to approach this. 2. Lots of experimentation and research with other water paticle systems. Is there an efficient way to use metaballs in our top down 2d game? I see how they could improve the way our water particle system looks 10x. Or should I look at the second option? Through my research I've mostly seen implementations that involve multi threading and shaders which have gotten their fps up to around 135 fps on my C2D/9600 GSO. Which seems respectable but not great. Thank you for your help. This project is just DirectX and C++.

Share this post


Link to post
Share on other sites
Metaballs are definitely pretty nice to work with if you do it in 2D, but it has 2 issues.

1. You have to it in at least two passes: one where you render your actual particles and accumulate normals and your weight value, and then a full screen pass where you sample the results from the previous pass and apply shading.

2. To do the accumulation efficiently you ideally need floating point blending support. This way you can use additive blending and let the hardware do the accumulation for you. Otherwise you'd have to ping-pong between render targets and do the blending in the pixel shader, which would absolutely suck for lots of particles. You might be able to work something out multiple fixed-point render targets, either using MRT or 2 passes.

I haven't really researched or implemented any other water techniques, so I can't comment on them, but I would guess that they're more complex than the metaball approach.

Share this post


Link to post
Share on other sites
Well, I'm not sure if I have the same conception of "water spray" as you, so this might be a completely unsuitable option, but a lot of 2D water spray I've seen is basically sprites containing pictures of water spray that move according to gravity, scale, and fade out. It's not technically advanced by any means but it can look very realistic.

Share this post


Link to post
Share on other sites
Thank you both for your responses.

MJP, this sounds very above my head to be honest. However, I will do more research. If you have an links or anything that would be awesome. Thank you.

cowsarenotevil, could you give me an example of what you had in mind? What I have now sounds like it, but quite a lot worse. screen shot:

http://farm3.static.flickr.com/2553/4205024907_84d2abc122_o.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this