Water/Fire/Explosion effects using OpenGL

Water/Fire/Explosion effects using OpenGL

Post by Brain Deat » Tue, 01 Feb 2011 19:47:15


Hi, I want to ask:

how to make simple water (with waving animation) using plain C & OpenGL ??

it is implemented using water-like looking textures ??

PS. Sorry my english is bad, english isn't my native language :-)
 
 
 

Water/Fire/Explosion effects using OpenGL

Post by Jean-Chris » Tue, 01 Feb 2011 19:57:03

On Jan 31, 11:47 am, Brain Death


You should look for something called ' caustics ' :
http://www.yqcomputer.com/

 
 
 

Water/Fire/Explosion effects using OpenGL

Post by Rotundjer » Tue, 01 Feb 2011 20:27:21

is there any tutorial for Fire, explosion, smoke ??

Btw, thanks for the reply ^^
 
 
 

Water/Fire/Explosion effects using OpenGL

Post by Andy » Wed, 02 Feb 2011 10:56:48


Search for particle systems. There is a lot of information on this in
the Siggraph proceedings and, I'm sure, in other places.

Andy V
 
 
 

Water/Fire/Explosion effects using OpenGL

Post by rIO » Wed, 02 Feb 2011 22:48:09


there are 2 main ways of doing fluids, the "old" way is by using
particles and CPU calculation, nowadays is far better to use GPU
particles or GPU and 3d textures.

for practicing is better, imho, to start with the good old particle
systems...

--
rIO.sK
 
 
 

Water/Fire/Explosion effects using OpenGL

Post by Nicolas Bo » Thu, 03 Feb 2011 22:59:59


There are zillion approaches depending on which kind of
water you are expecting. If you assume a shallow water model
(small depth) or low velocities (the water surface is just a
heightfield), you can come up with approaches with 2D FFTs
which work well, or you can even just sum a small amount of
sine waves whose amplitude depend on the depth and the
direction and speed depend on wind velocity.

If you want to model the flow of wine in a glass, you'd
better build a finite element or finite differences
approach, or some particle in cell methods (PIC, for the
advection) or FLIP methods.
Things can be complicated if you plan to support multi-phase
fluids (a mix of water and air, if you want to handle
bubbles for example) etc.

A very good introductory book for that is the book from
Robert Bridson, called Fluid Simulation for Computer
Graphics (if I remember well).

There are also other neat approaches using vorticities, or
if you want to model the foam or bubbles in a glass of beer,
or if you want a fast GPU method etc. For all that, you may
want to check recent proceedings of Siggraph, SCA,
Eurographics or sometimes i3D...
There is a Graphics Gems with some snippets of code for
fluids on the GPU I think (or you may even find some online
code for CUDA).

Everything will depend on the complexity of the phenomenon
you want to handle with respect to the time you want to
invest in it, and if you want to code it yourself to
understand things better or if you plan to use a library.

Cheers,

--
Nicolas Bonneel
http://www.yqcomputer.com/ ~nbonneel/
 
 
 

Water/Fire/Explosion effects using OpenGL

Post by Nicolas Bo » Thu, 03 Feb 2011 23:03:25


for smoke you may also find some answers by doing some hacks
like turbulence or Perlin noise and can find methods to do
so in "texturing and modelling, a procedural approach" by
Perlin and Musgrave.

For Fire or explosions, there is also the book from Osher
and Fedkiw on implicit surfaces, but this is not easy to follow.

Cheers,

--
Nicolas Bonneel
http://www.yqcomputer.com/ ~nbonneel/
 
 
 

Water/Fire/Explosion effects using OpenGL

Post by Daniel Sir » Mon, 07 Feb 2011 02:40:34

thanks guys, I've been desperated to find out how to make those things ^^