Archived

This topic is now archived and is closed to further replies.

Light Saber Effect (and something sooo much better)

Recommended Posts

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

Share on other sites
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.

Share on other sites
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.

Share on other sites
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

Share on other sites
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

Share on other sites
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!

Share on other sites
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

Share on other sites
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]

Share on other sites
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.

Share on other sites
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.

Share on other sites
Why does it messup everything, Matrix? The idea is to draw the sword separately into the empty frame buffer, blur it, capture the frame and blend it on the rest of the world. The catchier part is getting it to be partly hidden from the view in the final image (eg partially behind some obstacle). For this you''d have to draw the geometry as well in the sword''s scene and make it pitch black. Or you could draw the sword as a quad later on and bind the blurred texture to it (which is easier, but might/will introduce artifacts).

Share on other sites
This is true. However, I usually apt for the easier solution. Once you have that baseline then go for the gusto - less bugs that way . With radial blur you seem to be bending over backwards for an effect that can be easily done with a particle emitter, but you''re right, it would look neat. On a side note the radial blur on its own wont do the interpolation. You would only still see just a straight light sabre and no trail. To get the trail you need either the interpolative algorithm we talked about or a particle emitter. Add radial blur to either and you will have yourself a neat sabre beam.

As for the effect with the idiot in the background yielding the sabre - cant help you there. Its going to be a while before computers can act that stupid

Share on other sites
lol I found the original unedited copy, http://www.chadcompton.com/Star_Wars_Kid.wmv

sorry to keep this thread going with off topic posting but I can''t stop laughing

~Graham

• Forum Statistics

• Total Topics
628320
• Total Posts
2982072

• 21
• 9
• 9
• 13
• 11