Simple Effecient Liquid Effect Help

9 posts

Flag Post

Everybody remembers the fluid effect similar to that used in spewer, right? The piss colored gatorade tutorial that shows the steps to make it work?

I want to use this liquid effect in a “diablo health bubble”. Anyone who has played diablo or diablo 2 knows the health is in this circle thing (haven’t played 3).

Basically I just want to know if theres a cool way to do this effect without spending too much performance on the physics of the little balls hitting each other. Any Ideas?
I was thinking of maybe just removing the balls 1 by 1 from top to bottom without any physics, but it just doesn’t seem like it would show it off that well.

 
Flag Post

What I would do is go for a pre-generated animation. Also, some simple ball physics should have minimal overhead.

for realtime liquid effects, consider stage3d :) pass in orb positions and render a quad; in the fragment shader calculate the color value.

 
Flag Post

pre-generated animation? So like, I generate the animation with programming, capture the animation, and use the animation rather then the raw physics everytime? If so I guess I could do that if I really needed to squeaze as much performance as I could.

But I think if simple ball physics won’t take up too much overhead in the long run then that should be fine.
I’ve simply yet to work with ball physics, never really needed to.

 
Flag Post
Originally posted by alecz127:

pre-generated animation? So like, I generate the animation with programming

Pre-rendered means sprite sheet. Generating the animation with programming would be real time rendered.

 
Flag Post

thanks for clearing that up! Yes, I planned on using blitting and sprite sheets. I’m guessing that make a big difference.

 
Flag Post
Originally posted by Draco18s:
Originally posted by alecz127:

pre-generated animation? So like, I generate the animation with programming

Pre-rendered means sprite sheet. Generating the animation with programming would be real time rendered.

You could generate the animation with code once though, and just store it and reuse it.

 
Flag Post

Using blitting and spritesheets would practically cost nothing compared to calculating physics and liquids. It’s definitely the way to go.

 
Flag Post

If you are literally using this effect in a health bubble, I wouldn’t bother with it at all.

First, the health bubble will take up a small area of the screen, so the effect will be hard to see at all.

Second, health tends to move up and down is not-so-large increments, except when you refill it from near death, but in that case it pushes all the way up, leaving little room for the balls to splash around, so overall the effect will not be all that spectacular.

Third, about the only time when the effect would be spectacular is when the player loses a large portion of their health at once. When that happens, they have much bigger problems than the particle physics in their health bubble!

If you really want to animate the health bubble do something more traditional. Periodic glints, or tiny bubbles floating up from the bottom, or a fish, whatever.

 
Flag Post

I think he just wants the surface to wiggle about a little bit. Dungeon Defenders does that for health, mana, and the experience bar.