Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Bullet Tracers  (Read 5112 times)

0 Members and 1 Guest are viewing this topic.

horva

  • Newbie
  • *
  • Posts: 13
    • View Profile
Bullet Tracers
« on: March 09, 2014, 10:15:52 am »
Hello people!

Any ideas, advices how to create an effect like this?
http://www.youtube.com/watch?feature=player_detailpage&v=pIl0lMdBYxQ#t=447

Currently our effect is very simple, and since shooting and bullets are something you as a player need to personalize with, as it's your main source of power, we need to improve the look of our bullet tracers, and I have no idea how to :)

So any theories, ideas on how to create effect similiar to the ones on the video, that would be awesome :)

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Bullet Tracers
« Reply #1 on: March 09, 2014, 11:47:23 am »
You could use a particle system and let every bullet emit some particles. By fine-tuning the particle emission, you can determine the looks of the traces (color, duration, fade-out, ...).

I have developed a particle system in the Thor library, but it's for 2D with SFML-Graphics. Maybe the 3D engine you use provides something similar.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Bullet Tracers
« Reply #2 on: March 09, 2014, 05:08:24 pm »
You could do streak effects, I think there was a tutorial somewhere here on the wiki, perhaps it was the old wiki. but the best I could find was from the Ruby forum where they do a flame effect

http://en.sfml-dev.org/forums/index.php?topic=3475.msg23739#msg23739

Basically what you do is that you create segments as the bullet move and these together form a line. It would be much more efficient, reliant and better looking than particles if the effect you want is something like this:

Developer and Maker of rbSFML and Programmer at Paradox Development Studio

horva

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Bullet Tracers
« Reply #3 on: March 09, 2014, 10:42:48 pm »
I would definitely avoid particles as it tends not too look so well(i tried similiar stuff).

Streak effects could fit in nicely, because the main issue i'am trying to remove is, when the bullet moves to fast it's almsot like it's teleporting across the screen, and you cannot enjoy it when many of the bullets fly, it's like they're there, but they're too fast for you to see them efficiently and literally "enjoy" in them.

Thanks :)

horva

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Bullet Tracers
« Reply #4 on: March 10, 2014, 02:39:35 pm »
I was playing around and fixing stuff in existing bullet projectile function and this is what i've got :)

Looks pretty ok, will need some more tweaking but atm it was fastest solution that actually worked very nicely.



How to?
1. I used a texture of a bullet for a projectile, fired it normally as i did before.
2. Used a second texture that fires and has range up to 8 meters infront of marine and imitates smoke, or a bullet trail, it also grows so it feels like the smoke is dissipating as well as going transparent.

Pretty happy with the result, improvement to this would be writting a shaders that dissipates smoke really well, but that's out of my league xD