SFML community forums
Help => Graphics => Topic started by: horva 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 :)
-
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.
-
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:
(http://b.vimeocdn.com/ts/142/921/142921213_640.jpg)
-
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 :)
-
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.
(https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-frc3/t31/q79/s720x720/1795193_683979368307692_342048102_o.jpg)
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