Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Opengl + Fluid Dynamics in 2D


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Hachaso77   Members   -  Reputation: 231

Like
0Likes
Like

Posted 05 March 2013 - 07:11 AM

Hi!

 

I'm trying to find an example or tutorial of how to add Fluid simulation.

Do you know if it is possible to simulate Fluids using Box2D or any other 2D physics engine?

 

Any tutorial to have a look at?

 

Thanks



Sponsor:

#2 makeshift_hospital_bed   Members   -  Reputation: 103

Like
0Likes
Like

Posted 05 March 2013 - 11:57 AM

Take a look at Jos Stam's Real-time Fluid Dynamics for Games: http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf

It's a very good introduction that let's you create your own single-phase, grid based fluid simulation.

 

I implemented it in C# with two modifications that made the algorithm more efficient: Instead of clearing the projection buffer I advect it along with the other fields, and were able to reduce the iterations for mass conservation from 20 to 5 for the same fidelity. Also, vorticity confinement adds to the fidelity while allowing you to reduce the number of relaxation iterations.

Alas, I never made a fancy OpenGL renderer for it, just GDI+.
 

Afaik, Box2D doesn't do this, but the Chipmunk engine might be able to emulate fluids using heaps of rigid bodies.


Edited by makeshift_hospital_bed, 05 March 2013 - 12:20 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS