Jump to content

Home

Help with saber effects


Grey Raven

Recommended Posts

Not long ago, I noticed a post in which the member requested that the saber fanning effect from MBII be implemented in OJP, and, unfortunately, Razorace declined due to time restrictions.

 

Ever since I first tried MBII and was completely awe-struck, I've been trying to emulate a similar effect for a mod I'm currently working on. Because of that post, I figured I might try my hand at cleaning up my own version of the effect and submitting it to Razorace for implementation in OJP, in grateful appreciation of the brilliant work he and the other members of the OJP team have done for the JKA community.

 

But I've run into a problem. So far, I have all the shaders and jpgs ready, and a working version of my code. There's only one snag: while the effect looks pretty good during gameplay, it completely disappears from the screen when the esc button is pressed, and promptly returns when the gameplay resumes.

 

This problem is mainly directed at Razorace. Razor, I can only conclude that the problem lies in the fact that I'm not accessing the vector position info for the previous frame. But I'm very confused, as I have made dozens of test runs with various variable access changes, but still no dice. What further frustrates me is that the trap_R_AddPrimitive() function maintains the image of the saber trail even when the game is "paused", and the current frame is static, yet when I use the fx info for the positions of the edge, cap and base, the result is the "hide-and-seek" fanning I've been getting.

 

Is there anyway I can access the old saber position data so that can render that g*dd*mn edge effect when the current frame is held static? Why does the primitive stay rendered, but the blade not be, even when their positions are based off of the same fx variable?

Link to comment
Share on other sites

Try looking at the saber trail code. It's gotta know the previous positions. Sorry I can't be more specific without the time to look over everything.

 

As for the code used in MB2, I think they used the AJL's SFX saber system. I have the source code for it if you're interested. The hard part is going to be intergrating it in with OJP's RGB saber system that already exists.

Link to comment
Share on other sites

You needn't apologize; I'm in college too, and can sympathize.

 

I tried the saberTrail->base,tip stuff, but CG_AddSaberBlade always resets the vectors to their lerped positions before actually rendering the blade effect. I'll keep working on it when I can, and as soon as I get a clean version of the working code I'll send it to you for your opinion. I'm not tryin' to beat a dead horse or plagiarize your hard work, I just really can't stand that ugly "ribbon-trail" fanning from base JKA. It peeves me. :barf2:

Link to comment
Share on other sites

The idea is to make them look more movie-like. With the old sabers, the trail looked like a flat ribbon, which, as far the render goes, it was. This effect basically renders a blade on all the edges of the trail, so that no matter from what angle you view it, it looks like a solid trail. It also renders the glow better.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...