2010-04-10

Effects in Delta

There are tree effects in this demo that i’m very happy about:

Marching cubes tunnel

At the beginning I was playing with using marching cubes algorithm to generate landscapes.

,Marching cubes landscape

At some point I asked myself. What if instead of making mountains we start to drill holes inside the iso-surface? Hmmm. Just make it longer and narrower and you get... Guess what? A tunnel!

,Marching cubes holes
,Marching cubes tunnel

All that left is to add fancy colors and the sky. What's nice is that you can play with resolution of the marching cubes grid. Low res looks kind of cool as well.

,Marching cubes tunnel colored
,Marching cubes tunnel colored low res

Star field

Doing particle star fields is easy. It's just a bunch of quads front facing the camera.

,Star field quads
,Star field

But what I always wanted to do is kind of warp speed stretched stars. Like in Start Trek.
I started by playing with accumulating frames over time but it was far from perfect.
Finally I found a great tutorial on billboarding at Lighthouse3d.
That made me think. Basically what you have to do is to place particles around the center of the screen facing Z axis.
Then add a little bit of stretching… and bum! Done :)

,Star field stretched
,Warp speed star field

Shattered DMA logo

This one was inspired by experiments of my mate Patrik from shiftcontrol.
The idea is to use mask to gradually hide part of the shape and replace it with particles.
This can be used to create effects like solid block appearing from dust or in my case shape breaking into small pieces once touching the ground.

,DMA logo that I prepared in Wings3D

The trick is to distribute particles in such a way that we can calculate normals at their positions to
compute the lighting and to know when to hide / show them. I use Vertex shaders for that.

,Shattered shape particles
,Shattered shape

Updated:

Here is desktop version of the same effect with slightly bigger number of particles:

!VIMEO,10790859,950,534

Final note on the iPhone emulator

Very often, especially when working with alpha blending I got annoying diagonal line across the screen and some texture errors.
It works fine on the iPhone though. Strange...;

,iPhone emulator errors