Skip to main content
GameDev.net gamedev.net
🔒 Locked

Nice looking tracers

Started by speciesUnknown Feb 22, 2012 at 3:42 AM 1 replies 1.1k views
Original Post
speciesUnknown
speciesUnknown
Right now, my tracers are just lines drawn in a batch with alpha transparency. These suffer from the obvious problem of always being 1 pixel thick; im using XNA so I cant set the line width, and anyway, this effect doesnt look nice. For lasers, I have an X cross-sectioned pair of translucent quads aligned along the direction of travel which looks OK but laser beams are somewhat thicker than tracers, and always go from point A to point B meaning that the ends usually aren't visible (they look horrible anyway).

What I want is an idea for implementing nice looking tracers supporting tiny (bullets from a machinegun) to thick trails, in 3d.

What techniques can I use?
Don't thank me, thank the moon's gravitation pull! Post in My Journal and help me to not procrastinate!
LorenzoGatti
LorenzoGatti
Oblong billboards of motion-blurred bullets could be aligned with the trajectory but rotated to face the camera (instead of drawing two perpendicular ones).

You have a plane defined by a line (the shot's trajectory) and a point (the camera) and a suitable billboard normal (perpendicular to the shot's line and through the camera).
Omae Wa Mou Shindeiru
InvalidPointer
InvalidPointer
If you're using HDRi, you can render a mono-color capsule with your 'core' tracer color and then have the bloom pass give things a nice glow. Lots of UE3 games do something similar and I think it looks pretty nice in practice. You can also do something kind of similar substituting a billboard w/ an HDR texture if the game needs it.

EDIT: You could also texture the capsule, too.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.