1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

[Effects] Laser Trails

Discussion in 'Infiltration Development' started by UN17, Apr 15, 2006.

  1. UN17

    UN17 Taijutsu Specialist

    Joined:
    Dec 7, 2003
    Messages:
    675
    Likes Received:
    0
    It's been ages since I touched notepad to do some coding. While cleaning up my INF directory I found my UNHGFix code and decided to take a look at what I was doing. What started as 2 minutes of nostalgia turned into a 10 hour project trying to get a smooth laser effect in UT. Here's what I ended up with before freeing myself from the evil clutches of UCC.exe and doing something else with my time!

    [​IMG]

    Demo Video (Xvid Codec)

    I'm probably not going to work on it much further, but I'll give the code to the IMT guys (... basically just Geogob) who might be able to work it into the Night Vision and use it for other laser-type weapons.
     
  2. ravens_hawk

    ravens_hawk New Member

    Joined:
    Apr 20, 2002
    Messages:
    468
    Likes Received:
    0
    Zomg! Torrent Plz!

    Wait is this server side?
     
  3. Lemon.fr

    Lemon.fr SkaarjFruit

    Joined:
    Oct 28, 2003
    Messages:
    247
    Likes Received:
    0
    Nice effect.
     
  4. geogob

    geogob Koohii o nomimasu ka?

    Joined:
    Mar 11, 2000
    Messages:
    4,148
    Likes Received:
    0
    bring it on!

    I already tested your first code generation. This will be interesting...
     
  5. yurch

    yurch Swinging the clue-by-four

    Joined:
    May 21, 2001
    Messages:
    5,781
    Likes Received:
    0
    Trail timeframe is a tad too long. Other then that it's a wonder nobody bothered doing this earlier.
     
  6. geogob

    geogob Koohii o nomimasu ka?

    Joined:
    Mar 11, 2000
    Messages:
    4,148
    Likes Received:
    0
    With my experiment, you start having problems when the player moves arround. The firetracer moves around too fast for the tick frame rate and you get straight lines. Very ugly. I don't know if you solved this with this version UN. THis is why I abandonned the idea 2 weeks ago for the NV :\
     
  7. UN17

    UN17 Taijutsu Specialist

    Joined:
    Dec 7, 2003
    Messages:
    675
    Likes Received:
    0
    Because INF bob totally sucks (sorry SentryStudios) I coded a movement check into the laser. If the player is moving (which causes the aim to randomize - ie. Conefire) the laser trails don't activate; all you will see is the laser dot. Of course, since you have the code now, you COULD disable my move check, which will result in some insane cubist line art when you move.

    The way Yurch implemented TRUE vectored aim in his defunct RAV3 had no conefire, so his laser was smooth (very sweet) when moving since it used a sine-like bob instead of random conefire.

    Regarding the trail length, it is configurable inside the code so any mutator or coder can address the trail length and change it on the go. (ie. Shorter trails when viewing with naked eye, longer trails when viewing in NV mode to simulate burn-in).
     
  8. geogob

    geogob Koohii o nomimasu ka?

    Joined:
    Mar 11, 2000
    Messages:
    4,148
    Likes Received:
    0
    nice sig :)
     
  9. UN17

    UN17 Taijutsu Specialist

    Joined:
    Dec 7, 2003
    Messages:
    675
    Likes Received:
    0
    Haha, yeah... It's "Revisit Old Projects" night. Playing with Real Targets in Un|matrix mode with my new laser in slow-mo against bots, while taking screenshots...
     
    Last edited: Apr 16, 2006
  10. sir_edmond

    sir_edmond In my own world

    Joined:
    Aug 12, 2003
    Messages:
    606
    Likes Received:
    0
    So what happened to the tac lights?
     
  11. geogob

    geogob Koohii o nomimasu ka?

    Joined:
    Mar 11, 2000
    Messages:
    4,148
    Likes Received:
    0
    I could implement the Tac Lights in the WP weapons too if UN as nothing against the idea.
     
  12. UN17

    UN17 Taijutsu Specialist

    Joined:
    Dec 7, 2003
    Messages:
    675
    Likes Received:
    0
    The Tac Light technology was given to a different contractor who could develop and stabilize the platform for mass distribution :)

    Edit: Damn instaposters! Yes Geogob, please distribute the working code to all weapons so that INFers can run around blinding each other :p
     
    Last edited: Apr 16, 2006
  13. geogob

    geogob Koohii o nomimasu ka?

    Joined:
    Mar 11, 2000
    Messages:
    4,148
    Likes Received:
    0
    Blinding is already in the NV... but not the nice tac light effect
     
  14. ravens_hawk

    ravens_hawk New Member

    Joined:
    Apr 20, 2002
    Messages:
    468
    Likes Received:
    0
    So is there any way of combining the laser trails and RAv3 or would that be too awesomo for UT?
     
  15. yurch

    yurch Swinging the clue-by-four

    Joined:
    May 21, 2001
    Messages:
    5,781
    Likes Received:
    0
    Probably not without RAv3.
    RAv3 had a clientside laser too, no? I can't even remember anymore. :p

    If you want more to do on "Revisit Old Projects Night" you can try tossing out the absolutely shitty (I hate them) sine waves in RAv3 and inserting an 'impulse' system - which is part of what I was doing with the equally defunct but far more advanced HL2 project. Easy way is to take the displacing rotation vector nonsense and make it autocenter over time; then add "impluses" for events that occur that would have any bearing on the weapon, like the transition from crouch or standing or prone, footsteps and firing. The "impulses" are vectors added to the displacement rotation that also fade in thier magnitude over time. Bonus points for making each impulse vector fade seperately (and non-linearly) and not adding them together in a pile. Then all you need to do is determine weight, direction, and fade rate for each type of impulse, plus the fade rate of the central displacing rotation, and balance it all perfectly. Oh, and while yer at it, fix all those bugs with weapon re-classing, they get on my nerves.

    At one point I went back and redid this for RAv3, but I was (as always) naturally unhappy with it and got muddled in adding additional layers of complexity. Then my harddrive crashed. Perhaps it is too awesome for UT.
     
  16. sgt lazy crash

    sgt lazy crash New Member

    Joined:
    Apr 13, 2006
    Messages:
    131
    Likes Received:
    0
    cool is this a mod and if it is can i have it
     
  17. UN17

    UN17 Taijutsu Specialist

    Joined:
    Dec 7, 2003
    Messages:
    675
    Likes Received:
    0
    That's the truth Yurch. Yes this is a mod, yes you can have it when it's finished. Right now I'm working on getting to to work with every laser as a mutator and not just my MK23. So far it's kinda working, even with RAV3. Once stable, I have to get it working right online. Then I have to get it to work with NVision. May take a while.
     
  18. sgt lazy crash

    sgt lazy crash New Member

    Joined:
    Apr 13, 2006
    Messages:
    131
    Likes Received:
    0
    cool. my msn adress is the_trash@hotmail .co.uk and how do u make them?
     
  19. UN17

    UN17 Taijutsu Specialist

    Joined:
    Dec 7, 2003
    Messages:
    675
    Likes Received:
    0
    How do you make it? You code it... Judging by your posts, I don't think you play Infiltration, do you? If so, you'll be able to get it when it's released to the public. If you don't play Infiltration, I don't think you'll be able to use it because there are no 'lasers' in other game weapons. Though it wouldn't be too hard to write a laser mutator to give all UT weapons a laser.

    Long story short, wait for a release. :)
     
  20. -Freshmeat

    -Freshmeat Eternally noob

    Joined:
    Dec 4, 2003
    Messages:
    207
    Likes Received:
    0
    I did some test with an air rifle, a pen laser, a digital video and a frame-by-frame analyser software (Tracker). It turned out that the movement of the aim pretty much was some randomness and two sines: A long-period, big amplitude and a short-period, small amplitude. Applies to both x and y in equal amount IIRC. Will post excel files if I get to my laptop with the files and still remember to do it.

    This would seem to imply two 'springs' acting, perhaps the arm and the hand. And it would make sines with noise a fair approximation of what is going on.

    -Freshmeat
     
    Last edited: Apr 17, 2006

Share This Page