Sign in to follow this  
Misantes

Air/wind mechanic

Recommended Posts

Hey all,

I was just looking to get some input on how to go about rendering an air/wind mechanic in my project.

It's a 3D platformer, I'm using the bullet physics engine for game physics. There's a mechanic that blows the player up into the air.

 

My thoughts on going about this are:

1: I can just make a 2D animation of leaves and such blowing upward and billboard the image.

2: batch a bunch of simple objects (leaves and such) and physically blow them upward (basically a simple particle effect using the physics engine, but with simple 3D objects).

3: same as #2 but with 2D billboarded particles instead of  3D objects.

4: use a compute shader with a particle effect to give a bit more depth/animation to the particles.

 

My concern with #1 is that it'll look a little funny, unless my animation is fantastic, with the leaves rotating around, giving the illusion of 3D. But, I'm not sure I could pull it off. This method works great for my smoke/steam effects, but I worry it's not quite the right approach here. Additionally, the effect will continue to run, and an animation like this will likely look repetitive unless it's a rather long animation. The other options I can randomize.

 

My concern with #3 is the same with #1 except being flat particles, the best I could do is just rotate them around, which will almost certainly look a little flat.

 

My concern with #4 is that I generally don't like using compute shaders tongue.png Also, it seems a bit overkill here for the effect.

 

I'm leaning toward #2, but kind of don't want to waste the resources for such a simple effect. Though, I haven't profiled this option yet, it could totally be a non-issue (I don't imagine the physics engine will be significantly slowed down by a handful of objects being blown upward). My concern would be that either the effect will feel a bit shallow if there aren't enough things being blown upward or, if there are enough things being blown upward, that it will just seem unrealistic/weird. It could be tricky to get right.

 

For reference, I'll likely limit the instances of this effect (it's triggered by the player), so there won't be the risk of running dozens or hundreds at the same time, bogging things down.

 

Anyhow, I'd be interested in any other ideas of how people have gone about little effects like this. Maybe there's something I haven't thought of. Thanks in advance for any thoughts/input! biggrin.png

Edited by Misantes

Share this post


Link to post
Share on other sites

First of all, what visual style does your game have? Is it realistic, cartoony, pixellated, or something else again?

 


My concern with #3 is the same with #1 except being flat particles, the best I could do is just rotate them around, which will almost certainly look a little flat.

You could perhaps alleviate this somewhat by using animated particles to convey tumbling, and having more than one such animation to vary the animations.

 

If your visual style is somewhat cartoony, another option might be an animated "puff of wind" effect, looking like streams of blue-white cloud or smoke.

 

Regarding option two above, I think that it's worth experimenting with, at the least; unless you think that it's going to take a long time to implement, how much is lost if it turns out to not suit your purposes?

 

That said, if it doesn't work out you can perhaps do something similar by giving your particles a specified final height and vertical speed, perhaps with a bit of 3D spin to produce tumbling, and then updating their positions accordingly.

Share this post


Link to post
Share on other sites

Thanks for the input :D

 

And, yeah, that's certainly relevant. The visual style is a stylized-realistic type. And, by stylized, I mean things aren't realistically proportioned, textures are exaggerated, things like that.

On someone else's advice, I'm implementing a hybrid of the options, with a billboarded image behind everything, with a particle effect and some physical objects blown around. We'll see how it turns out :)

Share this post


Link to post
Share on other sites

Thus far I haven't implemented water (first level is in a lava-filled cavern, and the lava is actually just a slowly animated object, so that probably doesn't apply here). 

If you don't mind elaborating though, do you mean in regards to the movement of the air, and instead of reflecting the light just distorting the image behind the air? I don't think I quite follow your recommendation.

Share this post


Link to post
Share on other sites

What I mean is, water and air are both translucent fluids.  They mostly take the same shapes and make the same movements - a pillar, a curtain, a sphere, and a splash are the most common shapes.  If you can animate these shapes once, you can use them for both water and air (and lava too), with just a minor difference of texture/color/particle style/whatever.  Might as well get the most building blocks for levels with the least effort.

Edited by sunandshadow

Share this post


Link to post
Share on other sites

Good luck, and glad if I could help! ^_^  You know, you might even be able to use the same shapes, unanimated, for rock and ice.  Using different stages of the water pillar animation might get you a variety of rough-carved stone pillars, for example.

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