PDA

View Full Version : How do you do this...(Screenshot link attached)



dodgyposse
04-19-2001, 12:45 AM
I want to know how to achieve this diffused
ray effect, as in the attached screenshot url
http://userpage.fu-berlin.de/~larswo/bilder/shot01.jpg

help anyone?

dd

Eric
04-19-2001, 01:06 AM
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 !

Regards.

Eric

idiot
04-19-2001, 06:59 AM
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.

WhatEver
04-19-2001, 02:19 PM
It looks like a triangle strip or a quad with repeated textures belended with the scene to me.

dodgyposse
04-19-2001, 09:50 PM
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?

dd

Eric
04-19-2001, 10:23 PM
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 ? http://www.opengl.org/discussion_boards/ubb/smile.gif

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

Regards.

Eric

dodgyposse
04-19-2001, 10:26 PM
Yep, that would work....

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

Lars
04-20-2001, 03:24 AM
Someone looked at my Page :-)

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 http://www.opengl.org/discussion_boards/ubb/smile.gif

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 http://www.opengl.org/discussion_boards/ubb/frown.gif But it is done with additive color blending without alpha channel.
And for the newer Version, this is in OpenGL now too http://www.opengl.org/discussion_boards/ubb/smile.gif

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

greetings Lars

dodgyposse
04-20-2001, 04:09 AM
I did email you lars!, and it got bounced back..... http://www.opengl.org/discussion_boards/ubb/frown.gif

How did you orientated the quad towards the players viewpoint?

dd

lpVoid
04-20-2001, 04:21 AM
I think what you're looking for is a screen-aligned billboard.

I threw that into a search engine and found this:
http://www.sgi.com/software/opengl/advanced97/notes/node31.html

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....

Dave

dodgyposse
04-20-2001, 04:24 AM
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...)

dd

Lars
04-20-2001, 04:54 AM
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.

Lars