Page 1 of 1

Psycho effect

Posted: Thu Jul 15, 2010 5:56 pm
by Rado1
A simple "psychedelic" lava/plasma-like effect. Can also be used as a screensaver.

P.S. I tried to find the simplest way how to achieve the desired effect without time-consuming recalculation of a large bitmap; I think usage of constant-size RenderNet is not a bad idea...

Posted: Thu Jul 15, 2010 6:47 pm
by Kjell
:!:

You might want to look into shaders for these kind of things .. updating 80.000 triangles every frame is not all that cheap. Attached is a example ( not the exact same effect, but the same idea ).

K

Posted: Thu Jul 15, 2010 7:00 pm
by VilleK
Kjell, I had to add ".x" in the line below for the fragment shader:

float z = texture2D(tex1, gl_TexCoord[0].xy).x;

Both examples look good, the one by Rado1 takes up a lot of cpu. Kjells example is cpu friendly but then you have to deal with GPU-incompatibilities instead.

Posted: Thu Jul 15, 2010 7:06 pm
by Kjell
d'oh,

Thanks Ville ~ Stupid forgiving NVIDIA drivers :roll:

*Updated Plasma.zgeproj in my previous post with the fix.

K

Posted: Sat Jul 17, 2010 1:50 pm
by Rado1
Yes you are right, updating 80.000 triangles every frame is not very cheap of course. I stupidly used it just for zooming the picture out, just to make the effect more "attractive". The lava effect by itself has almost no CPU footprint; see the attached version.

Is there any way how to achieve zooming out effect with shaders without too large texture bitmap (e.g., it is fully computed by shader)? I heard that computation of Perlin noise is very expensive also in GLSL.

Posted: Sat Jul 17, 2010 2:29 pm
by Kjell
Hi Rado1,

Hmm .. psycho_simple.zgeproj still uses 80K polygons?

Anyway, doing ( perlin ) noise in GLSL isn't all that bad .. but if you can fake it, fake it 8) Expensive effects such as ambient occlusion generally use a noise texture to sample from as well.

K