SFML community forums

Help => General => Topic started by: Valleriani on July 23, 2015, 09:33:58 pm

Title: Thor & Particle Effects
Post by: Valleriani on July 23, 2015, 09:33:58 pm
Hello!

I am interested in using particle effects, but have not done so yet before. I have setup SFML and Thor now and it does work fine for basic effects, but I'm trying to aim to make a 'hard thrust' rather then a smoke particle thrust.

The example image (first image) is what I have. It's a basic thrust that fades out largely, when the ship rotates though, it looks more of a smoke trail because it doesn't 'stick' with the ship rotation like a real thrust would. (Check example2 to see what I mean by that.)

What I want is more of a turbine type thrust, like this one here:
http://forum.unity3d.com/attachments/unity-2013-10-16-21-41-01-37-jpg.71190/


Does anyone have any tips or examples on this? Is there a good guide to particle effects and thor or something similar? Thanks!
Title: Re: Thor & Particle Effects
Post by: zsbzsb on July 23, 2015, 10:22:58 pm
I don't have much experience with creating particles, but it would seem that as the ship moves faster you would want to increase the speed particles are generated and decrease the lifetime of each particle.
Title: Re: Thor & Particle Effects
Post by: shadowmouse on July 23, 2015, 10:38:23 pm
Alternatively you want to think about emulating local space. Image 0,0 as the origin of the ship and set the position of the emitter to be where the booster would be if the origin of the ship was 0,0. Then combine the transform of the ship with that of the emitter before drawing.
Title: Re: Thor & Particle Effects
Post by: Laurent on July 23, 2015, 10:41:02 pm
Quote
it looks more of a smoke trail because it doesn't 'stick' with the ship rotation like a real thrust would. (Check example2 to see what I mean by that.)
This looks more like a simple sprite attached to the back of the ship. What you want (from your description) doesn't really look like a particle system, more a fixed effect that follows its emitter.
Title: Re: Thor & Particle Effects
Post by: Valleriani on July 24, 2015, 04:58:57 pm
Ah okay, so not really a particle system that does what I want. So you think that a sprite (I'm guessing with a shader to give it a nice effect) could do this well then?
Title: Re: Thor & Particle Effects
Post by: Laurent on July 24, 2015, 05:33:36 pm
Yes. You don't even need a shader, just an alpha-blended sprite, that you scale according to the thrust.