Sunday, January 24, 2010

Realtime fractal raytracing

Hi! I'm back with another video showing a couple of new features.
- Dynamic lighting, now you can adjust the lighting manually as you can see in the video. The shadows are raytraced too so they adjust in realtime.

- Now there's a parameter to set the power (n) of the formula z->z^n+c so you can get different versions of the fractal as showed in the video.

- Frame rate is vastly improved, now all the work is passed to the GPU, including the render plane and ray direction computations.


Some tech data:
- The lighting is a mix of a simple lambert model with a orbit trap that simulates occlusion. Although it's not real occlusion or global illumination, seems to work ok.

- The normal of the surface is computed by central differences.

- The Raymarching is still basically brute force. But with a first step to compute the intersection with a sphere surrounding the fractal.

I'm thinking about putting this tool available for download. I'll add a couple of things and probably next week you can download it from this blog. Hope you like it!! :)

Sunday, January 17, 2010

GPU Raytracer

Hi!
it's been a long time since the last update, but my neurons were quite busy with Avatar, so programming at home was out of the question. Anyway, I'm back again with something different. Some weeks ago I read that someone had found a nice way to use the famous z->z^n+c formula in 3D to render something like the classic Mandelbrot fractal in three dimensions, you can find more info here: Mandelbulb . So I decided to give it a shot with the gpu and this is what I have, this time with n=8.
Remember that this is not a 3D Texture, or a polygon mesh so it's not the fastest thing in the world, basically for two reasons, my graphic card is not so great and I didn't use a Distance Estimator, so it's pure raymarching and iterating the mandelbrot function every step. Even with that limitations, it runs at interactive rates. I'll work to improve the framerate. Hope you like it!

Monday, July 7, 2008

New Video and some info

Hello!

Now the renderer and simulator are both multi-threaded so I can take advantage of my old PC with two 3.0 Ghz processors. Here is a new video and some info about it:

- Particle Count: 65000
- SPH Integrator Type: Leap Frog
- Time Step: Fixed 0.001s
- Simulation Time: 5 hours approx. (yes! I know it´s slow, I´m workin on it!) :O)
- Render Time: average of 30 seconds per frame at 640x480

I´m working on some optimizations for the simulator so I hope I can speed up the simulation soon.

See you!

Saturday, June 14, 2008

SPH Raytracing video

Hi! As I said in the last post I have written a simple raytracer to display the liquids avoiding the creation of triangle meshes, so I´m only shooting rays to the particles and getting the density at the collision point with the surface of the liquid then compute the normal, a bit of refraction and specular and that´s all. Again I promise a more detailed explanation some day :O)
This video has been generated with 45000 particles.
Hope you like it!

Tuesday, June 3, 2008

SPH 90000 particles

This is the last video I´ll post as I have checked the stability of the simulator with 90000 particles. Now I´m going to write a raytracer to display the liquid in a more interesting way, I´ll keep you informed about any advance I make about it.

Monday, June 2, 2008

And... more videos!

After some optimizations I have created another two videos, one with 18000 particles and another one with 38000!! wow! :D

In the next days I will try to make it multi-threaded as now it´s only running with one processor. I have to write collisions with animated objects too. In the near future I´m thinking about writing a simple raytracer to display the liquid as a mesh probably an implicit surface shader or something cause just watching particles is a bit boring :)





Sunday, June 1, 2008

More SPH Videos

Hi!!

I´m back in Spain now and I want to show you two more videos of my liquid simulator. This tests have 15000 particles. The simulator is still a bit slow, but I´m trying to optimize the speed as much as I can. Well, here they are, hope you like it!



Monday, April 28, 2008

SPH 3D

Hi!!
It´s been a while since the last time, I´ve been really busy doing nothing but these last days I have re-taken the SPH project I was doing, and now I can show you the first videos. I still have a lot to do, adjust parameters, improve collisions, make it faster, and some other things but at least it´s working now.
I wrote an exporter for Max to my 3d animation format and I can read it now from the simulator so it´s very easy to load scenes and try different things, I can spend hours just trying stupid things instead of improving the code, that´s definetely not good!! Now, seriously, I´ve been thinking in a new way of simulating fluids with particles that I want to test as soon as I can, is not based in SPH formulas, but I have some few tricks in mind that luckily will turn into a much faster way of simulating liquids. I´ll keep you informed about every step forward I do about that.

I will add more videos and maybe some executables to download as soon as I arrive from Japan at the end of may.

I promise that one day I´ll write a detailed document about how I´m doing this project!! One day...
:)

See you!!



Sunday, November 11, 2007

2d Fluid simulation

This video shows a voxel based fluid simulation. I got all the info about this project in Jos Stam papers. This version is really simple, there´s no interpolation of color, just one big pixel for voxel based on its density. I really want to program the 3d version, but I really have little time although I promise that one day I´ll do it!!! :P


Saturday, November 10, 2007

3d Fracture Simulation

I programmed this 3d fracture system a long time ago. The mesh is a tetrahedral mesh and the calculation of forces is based on mass & springs. I´m thinking how to make this fast enough for videogames.

Monday, October 29, 2007

SPH Fluid Simulator

Hello!!! this is my first post in the blog. This time I want to show you a small video of the SPH (Smoothed Particle Hydrodynamics) Fluid Simulator I´m working in right now.

The simulator works in 3D but this video shows only 2D cause it´s easier for me to debug. Soon I will post new videos in a full 3d environment. Hope you like it!