Light Saber Effect (and something sooo much better)

Started by
11 comments, last by Smokey97 20 years, 11 months ago
hey, was just wondering how i would be able ot get a light saber effect like in a movie on the following link: http://www.waxy.org/archive/2003/04/29/star_war.shtml (the remixed verssion, ofcourse the unmixed version is alot better.) Thnx alot in advace P.S. although this is a way to show that video, i REALLY would llike to know how to make a lightsaber effect in real time. Smokey97`
Advertisement
Billboarding would probably be ideal--just a blue (or whatever), unlit quad with an alpha map. The normal would be perpendicular to the line of the saber.

How appropriate. You fight like a cow.
Raven created the lightsabers in JKII using a stack of quads. Essentially, the saber is made of a whole bunch of little round sprites stuck really close together and lined up along the length of the blade. One sprite per pixel along the length of the blade is ideal, but probably not feasable. I''m not sure wether they are billboarded or not - but they probably are.
You''re both part right. You take a whole stack of quads and stack them together - that way you get a glow like a particle effect. One quad looks like a sabre beam standing still. You then have to billboard the quads so that they are always facing the viewer and in line with the sabre. Then you spread the quads by interpolating their position and rotation over a change in time...ill see if i can draw it:

for a change in position and rotation of p1 to p2:

                                           1                 1    1          1     1    1    1     1     1   11    1    1    1   1 1   1    1    1  1  1   1   1   1  1   1  1   1  1      1  1         p2     1   p1  


So you can see that if you swing the sabre faster, you get a larger, more dispursed trail - this is how they did it in jk2 i think (love the ik in that game - or at least it looked like ik, not sure, and thats what is impressive). Going to have to use matrices with quaternions to do the effect though - check out skeletal animation if you arn''t sure.

love the video btw
Just thought of an easier way to do it - just make the sabre a particle emitter and give each particle an x,y,z rotation. Then have the particles fade - that way you dont have to do the interpolation. You still have to do the billboarding though
ok, one person seems to see what i mean by the video, maybe you should see the video so oyu know what i''m talking about!!!!

THE VIDEO PEOPLE, THE VIDEO!
Well, I can''t watch the video unfortunately but there was an item on the GDC that delt with glows and stuff. Here''s how it could work for lightsabers:

Render the lightsabers in the appropriate color to a texture. This has to be done from the exact viewpoint of the camera you are using. Then, manually apply a smoothing filter to the texture. Could be a simple one like

121
242
121

but you can use more elaborate ones if you like. Render the scene and finally blend the smoothed glow texture over fully rendered scene. This is the way they are making glows in the new TRON game.

Sander Maréchal
[Lone Wolves GD][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

instead of using Lot's of quads with a small flare texture
Use a mesh of quads(let's say 1x6) with a single texture that you move around like in llvllatrix first post.
Then draw a glowing edge around it.
I have drawn a smallgraphic about it.


[edited by - lc_overlord on May 5, 2003 11:15:26 AM]
Smokey: I have''t read all the replies in this thread (since I''m lazy ), so I can''t really say if this hsa been implied by anyone else already (Ctrl + F didn''t turn up anything), but what you seem to de describing can easily be achieved with the help of radial blur. Nehe has a tutorial on the topic - check it out - it''s pretty simple.
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
I think NeHe''s radial blur messes up everything on the screen...that is unless you plan it right. The easiest way, i think, is to use a particle emitter - you dont have to worry about interpolation then and billboarding is very easy - just billboard to the up vector and then rotate the vector.

This topic is closed to new replies.

Advertisement