Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 11th Apr 2003 23:43
How to create a laser beam that looks like the following. I was thinking making it as a billboard plane that only rotate on a single axis, i.e. rotate on the axis parallel to the laser beam.

But it will looks weird if the camera is directly in front of the laser beam. As it is a plane, it will look like a thin line when view directly from the front.

Any good suggestion of doing this? Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Drakportalen
23
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Sweden
Posted: 11th Apr 2003 23:49
If I've get your question right or not I don't know but what the heck..
As you can see the lasers like have an inner beam of light that is clearer and stronger then the "shell" of the beam.
I would make two cylinders one that is ghosted and on that is not and please the cylinde rthat is not ghosted insid ethe ghosted one I could have made an example for you if it wasn't for my DBpro that has gone mad .

www.drakportalen.dot.nu
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 12th Apr 2003 00:33
Aye and then it's simply a matter of texture plus vertex and pixel shading to make it look the same as this...

To make it look like it's shooting from something, have the size start off really small, and make the cyclindars longer, as it goes toward the target. Have maybe 2 light sources move with it, from within the cylindars... Make the light sources the same color as the laser to get the best effect.

What you just did is make it look more powerful when first escaping the barrel, but as the beam travels, it becomes weaker...

The first of the 2 light sources stops moving first, and then the second stops moving once it geta an even distance from the first that the second is from the origination point.

Now, dim the farthest light out form the origination point, and then the one closer at half that value, and continue to do so until it almost reaches a point where it doesn't look right...

At that point, delete all... Also, for good effect, have the lights flare very quickly if the beam hits its target, or have a third light that remains on the end of the beam, and flares when the beam hits something, with a brightness proportionate to the distance form the origination point.

Viola! Perfect laser beam 8)

The actual values that should be used depend on the scene you're making.

Also notice the lens flare at the origination point in the picture.

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th Apr 2003 01:45
I think that the above effect is actually done using a very advanced particle effect style system, with thousands of particles emitted per second with virtually no spread rate, so that they don't fountain out. The core of the laser beam varies in width across the length which suggests this. Also, the outer, red part of the beam IS NOT a cylinder. Otherwise it would look wrong (the edges would be too hard). It is most likely a flat,ghosted plane which is orientated towards the camera.

Current Project: Retro Compo. Entry.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th Apr 2003 02:02
Hmm... BullEyes, I am working on a tech demo for this, I'll put up the source and gfx if I get good results.

Current Project: Retro Compo. Entry.
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 12th Apr 2003 06:52
Thanks Rob! I had thought of using particles on this. But I figure that's gonna be very expensive as I need A LOT of particles for a laser beam like this.

Using a cylinder could be another way. But I would like to keep my poly counts as low as possible. A cylinder can easily increase my poly counts.

Anyway, if there is any source code for this kind of demo, I would really appreciate it!

Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 12th Apr 2003 06:55
Oh, BTW Galiem, thanks for your suggestion. I had thought of puttling a point light in the laser as well. But I heard DBpro limit us only with 8 point light sources. Isn't that kind of limitted, especially for this type scenario, i.e. there will be a lot of laser in this kinda game. Any ways to workaround this?

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
PiratSS
23
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 12th Apr 2003 07:25
You can make a plane, face it to the camera, texture it and ghost it.

This works really well.

Don't worry about your texture getting stretched, you can change that.

Cheers.

There are two types of people in the world: The ones who summon and the ones that create. There is a big difference...
Prime_8
23
Years of Service
User Offline
Joined: 10th Apr 2003
Location: Canada
Posted: 12th Apr 2003 12:08
PiratSS ..has it on the nail!

I have been tring to make that Homeworld style beam for a while.

what i do is create 1 or 2 planes depending on quality and distance (kinda like LOD for beams)
the i take a texture that i like with a bright center and a random whispy sides .. and i apply it to the beam. now for some fun .. you anumate the texture on the beam by scrolling it's UV texture position. makes it look like particle flowing an such.. and you can send a light down teh beam from time to time fo stunning look.

but "don't rotate the plane" keep it facing the user and it will never look too fake.

add a second plane up teh middle of teh ghosted mian plain, and make shure it is textured with the brighter color of your textures. again animateteh texture on teh same uv axis you did fo teh first plain and possible throw in a wee bit if motion on teh other axis. It will look sweet.

my pic below is in DBC .. and i shows the crappy ripple you get when you rotate the plane. but if you wnat to rotate teh plain down it's axix use 2 planes perpendicular to each other on that axis so if you looked atthem front on it would make an "X" shape wher teh center of teh X is teh center axis of the beam. hope that helped in any way.

here is a link to an old .jpg screen shot of my old project (i may just restart when i get DBpro, earlier dide du to lack of speed in DBC, get 4 corvettes and super slowness).

http:\\www.members.shaw.ca/xerotolabs/images/DV_Engine_2.jpg

Prime_8
23
Years of Service
User Offline
Joined: 10th Apr 2003
Location: Canada
Posted: 12th Apr 2003 12:12

sorry about spellings in last post . my brain is fried right now.

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 12th Apr 2003 12:43
Thanks Prime_8. I appreciate your help and all your effort. I will try to understand your explaination and illustration.

Thanks again!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 12th Apr 2003 13:03
Hmm.... this is what I understand so far...

1. Create two plains and intersect each other to make something like an 'X' shape.

2. Fixed the orientation of the two plains, i.e. do not rotate the two plains according to the camera.

Did I get you right, Prime_8? If I am right, meaning that I will see something like an 'X' when the camera is directly in front of the laser. Wouldn't this looks a little bit weird?

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 12th Apr 2003 13:37
you can put a third plain (with a cicular texture) at evenly plaecdd intevals along the beam, meaning that when the camera is looking down the beam it will see them, instead of th X.



Life is a terminal disease.
You never survive it.
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 12th Apr 2003 14:55
Hmm... good one, darkfluff! What if I just put the circular texture at both ends of the beam? More optimized in that way, right?

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 12th Apr 2003 15:31
You don't need to intersect two planes. Just have one plane, with an appropriate texture on it (use a gradient effect to get the red part, then use the retouch tool in "lighten" mode and run it down the center of the gradient, if you wobble it slightly you get the fluctuation in the beam)

You have to make the plane face the camera which is the slightly difficult part, finding out which z-angle to set the plane to in order that it faces the camera as directly as possible. In order to deal with the problem of looking at the beam from your end, put a very bright, glow at the very start of the beam (flare effect, lights and textured plane with a fade value of 300 or so), which obscures the start of the plane so that it can't be seen. The beam should go on for a near infinite distance, however that is not always possible, in which case the beam should fade as you get further away. I am not sure how to do this though.

It would be really nice if DBPro had built-in beam effects like A5 though [hint, hint ]

Current Project: Retro Compo. Entry.
Prime_8
23
Years of Service
User Offline
Joined: 10th Apr 2003
Location: Canada
Posted: 13th Apr 2003 07:44
ok I'm sober now.

there ar a bunch of ways to do beams.
some a reasource dependant some are not .

first thing you need to think of is how will a beam look in the real world . How much cpu / vid card power do your beams get .

power = detail * number of beams. simple i know .

so teh simple way is a single plain from emmiter or gun directed down range . wit a orientation = to camera. Now i'm just getting back to DB after being away for a long while so i'm not up on all new commands or even some of the old ones. I do remember ther was an orient object to (target object) . or face this thing the same way as this selected object ( i'll figure it out this week while i wait for dbpro to arrive.

then you take a texture like
[img]http:\\www.members.shaw.ca/xerotolabs/images/Blue3Blue3.JPG[/img]

or [img]http:\\www.members.shaw.ca/xerotolabs/images/Blue2Blue2.JPG[/img]

either one of those images with ghosting on is what i use. I use teh round one for particle beams and the other one for solid beam.
you streach and tile them on your plain then you scroll the texture on the beam (rotate limb texture , i think ?? )

and then it gives a pullsing look and teh speed you scroll that texture will let you change some other looks of the beam.

if you spin the plain so it is roating i recomened you use 2 plains with one plain perpendicular to the first . making an X .

this type of beam can be used with basic collission detection systems too.

for the look of the beam just take a crossection of any beam you see and use that as a texture.

now it would be wise to stick a sprite at origin to make a haze or gun glow at your gun end . and sen a sprite down yuo beam now and then keping it size (diameter) teh same as teh beam width in case you should ever look down the beam or close thead on .

.. ah this is why most of my games have bullets or missiles . {}

getting the beam to come from a full moving turret was fun too.

UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 13th Apr 2003 17:24
if you but a plain just at both ends then when the beam hits an obeject the plain may be iside it causeing the X effect.

Life is a terminal disease.
You never survive it.
Shining Moonblade
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 13th Apr 2003 17:45
Hmm...I like Rob K's idea with the gradient texture. Low poly count, easy to make, and efficient.

As far as I could tell from Homeworld and games like that it was either the two plains making an X formation, or just one with the gradient texture.

Note the the texture in the picture for the beam doesn't appear totally uniform, there are darker and lighter spots. You could use the scroll texture command to make it look like a beam is firing, instead of just magically appearing and sitting there.

And just like in Homeworld, you could use the same method for a trail, too. It would have a lower poly count than using particles.

Just my opinion, of course.

This next section is irrelevant, so you can skip it if you want:

What game is that a picture of? I don't recognize the ships.
And speaking of which, has anybody heard anything about Homeworld 2?

The moon empowers my blade and commands me to destroy you all!
The Wendigo
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 13th Apr 2003 23:23
Best looking way is the Billboard way in my opinion. How you get rid of some of the retarded looking flat planes is as simple as adding a billboard at the end that rotates on all axis or you can simply smooth your texture at the end till it goes completely transparent. Reasons I think it is best:

Looks volumetric
Less Polygons so you can have more of em.
The pros do it (and yes, homeworld used this method. I cheated a little in the game to find out how they did it and that's what I found). The engines, however, are a different story all together.

Hope I'm helpfull

1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 13th Apr 2003 23:43
IF you use a billboarding plain, it will rotate to face the camera... so if you are directly in front of the laser beam it will stand upright... that can't be good!

Just a side note, 8 lights is a HARDWARE limitation, NOT DB!!!

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
Shining Moonblade
23
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 14th Apr 2003 00:12
Cheated a little? Got a free floating camera or just put your ship in the way of the firing beam and moved it so the camera was in the path?
LOL.

The engine streams looked like plains that were easily textured with a simple color (or dynamically created texture) that were bent the way the ship was going. Ah, you know what I mean. So how is it completely different?

The moon empowers my blade and commands me to destroy you all!
Dr DooMer
23
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United Kingdom
Posted: 14th Apr 2003 05:01
If you fly your camera into the engine trail you'll find that there's actually a diamond-shaped 3D object surrounding a billboard - that's one way that they're different.

"I am a living, thinking entity who was created in the sea of information."

Login to post a reply

Server time is: 2026-07-11 12:01:48
Your offset time is: 2026-07-11 12:01:48