Silly plasma question

Hi All,

I’m trying to create a very easy plasma effect in a pre-defined viewport, in the middle of my screen. I first thought I create square with a texture on and let that texture move a bit but I was not able to do it.
I also searched here to find some examples but I just don’t get it.

That’s why I posted it here in the beginners section.

Is there anybody who could give me a hand creating an easy looking sinus/cosinus plasma effect which I could put behind some other objects ?

Thanks already a lot for the information


dextro, what was your OpenGL question again? try to phrase your questions in the context of OpenGL, that way they don’t look so off-topic :slight_smile:

maybe you could embellish your objective description a bit as well.

try using some particle effects.
GL_ARB_point_parameters and GL_ARB_point_sprite may be a good solution.

Take a look at:


Hey Bonehead,

I was just looking for some examples of plasma code or a short explanation how I can make a simple plasma effect.

Can this be done by a texture modification or so ?


hey dextro, many dynamic texture systems involve some sort of feedback filtering mechanism. like, you feed the texture “seeds”, then let the filtering mechanism make them grow.

for example, imagine placing a single white dot in the middle of a texture A. now, avererage this texture into another texture B. then take B and average it back into A. repeat this “ping pong” averaging constantly over time. the shape and size of the filter kernel you choose is very important here – it can control the direction of growth (make ripples grow outward, make fire rise, etc).

anyways, with this, all you need to do if figure out cool ways of feeding the buffer with seeds. the unreal engine made excellent use of this technique. they created water, fire, plasma … all sorts of cool effects.

for opengl, render-to-texture (RTT) or glCopyTexSubImage should come in handy :slight_smile:

hey dextro, another way to achieve some cool effects is to animate perlin noise. create 2 slices of 2D noise, then interpolate between them over time. all kinds of turbulent, noisy effects can be made this way. anyway, it’s a must have in any graphics programmer’s magic bag :slight_smile:

check it out:

Hey Bonehead,

the last article looked like a math lesson to me :slight_smile:

But I will definitely read it.
In the mean time I’ll try to use the 2 functions you mentionned to me and give it a go.

But i’ll first read a bit more about them to be sure I understand them correctly.

Regards and thanks for all explanation.

P.S. If you could register yourself I could dropped you an email :wink:

hey dextro, just so you know, RTT isn’t a function, per se, it’s a god awful mess. you can read about it (and any other extension) here:

you can grab the extension headers here too (glext.h and wglext.h). anyways, what you’re looking for is WGL_ARB_pbuffer and WGL_ARB_render_texture. all this might be considered advanced, but only because it’s such a mess. hopefully all this will change soon. in the mean time, you can render to the frame buffer normally and grab your texture with glCopyTexSubImage2D. while it’s generally not as fast as RTT, it’s a heck of a lot easier to use :slight_smile:

and if you don’t have the redbook (essential reading), here’s an online version: