Jump to content
  • Advertisement

Archived

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

Smokey97

Light Saber Effect (and something sooo much better)

This topic is 5639 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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 this post


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

Share this post


Link to post
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 this post


Link to post
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 1
1 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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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
[Lone Wolves GD][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

Share this post


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

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!