How do you do this...(Screenshot link attached)

I want to know how to achieve this diffused
ray effect, as in the attached screenshot url

help anyone?


I might be wrong but it looks like a quad with a “laser” texture that is blended after the rest has been rendered…

It seems to me we can actually count the number of times the texture is repeated along the beam (there is a kind of “pattern”).

If I am correct, the problem now is to genereate the laser texture !



as far as the smoke like effects on the edge of the quad, you might want to do a search on the web (or previous posts) for perlin noise.

It looks like a triangle strip or a quad with repeated textures belended with the scene to me.

I’m puzzled.

How can it be a quad with a repeated texture?

To use a quad, you would have billboard
the texture somehow, so it was always visible to the player…

how the heck would you do that then?


Imagine you are playing Doom: you are in the middle of a VERY VERY long corridor looking down the corridor. So you see on your left and on your right two walls getting close to each other in the horizon…

Now replace the brick texture of this wall by a blended “laser texture”… Doesn’t it look like this effect ?

Actually, I e-mailed you a modified snapshot to show you where I believe the quads are… You will deduce the texture automatically…



Yep, that would work…

Ok, how would I ensure that the player always sees the side of the quad with the texture on it?

Someone looked at my Page :slight_smile:

Yes it is a simple Quad , which is oriented towards the Viewer, and the Texture is created with a standard Paint Programm. Just try to draw a strait line with a Brush in the late night, and you get that fancy look

I let the texture repeat, to have some detail in it, because it gets streched so much and i try to keep the textures small.

And for the OpenGL settings : I didn’t use Opengl at this Point But it is done with additive color blending without alpha channel.
And for the newer Version, this is in OpenGL now too

And just write a Mail next time, i am always happy when i recieve some.

greetings Lars

I did email you lars!, and it got bounced back…

How did you orientated the quad towards the players viewpoint?


I think what you’re looking for is a screen-aligned billboard.

I threw that into a search engine and found this:

There are probably lots of other refs around as well, but they probably don’t spend too much time on the subject. “Real-Time Rendering” has a few sections on it. It’s pretty easy to do…basically just match the rotational values you’re interested in with an inverse modelview matrix or something like that.

Hehe, I bet someone will post the code before you even read this post…


Is a screen aligned billboard a special variant of billboard?

(I understand normal billboarding i.e obtaining and using 2 vectors on a plane perpendicular to the viewpoint…)


This time i got your mail !
But i will check if my mail-server has some problems.

I used a variant of a billboard.
I create the Quad the following way :
the long edge is the direction of the Laserbeam, this one is fixed, cause you wan’t a beam from the emission point to its hit point, that looks correct from any Direction.
So the other Edge the small one, or the thickness of the Beam is created by tacking the Vector from the emission point to the viewer origin. Then take the Crossproduct of this vector with the direction of the Beam, and you got it.
(hope that this was clear, i can post some code later if you wan’t)

This has some disadvantages when the Beam is very near you, and is moving around. In such a situation it looks a bit confusing.