Page 1 of 2
How to draw this contrail?
Posted: Mon Apr 14, 2014 3:05 pm
by appleide
I saw this cool spaceship-engine-contrail effect in a game called "starsector".
- from starsector
- Screen Shot 2014-04-15 at 12.53.13 am.png (72.5 KiB) Viewed 9855 times
I was trying to recreate it in love2d but am quite far from it:
- Screen Shot 2014-04-15 at 12.59.40 am.png (9.03 KiB) Viewed 9855 times
How would I do something like the first screenshot?
The shape of my contrail looks nowhere near the one I'm trying to blatantly copy.
I've also uploaded a version of particleedit ported to 0.9.1, originally from
viewtopic.php?f=4&t=2110.
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 4:00 pm
by Ranguna259
You are telling me that your name if in orange color and you posted in the wrong section of the forum ?
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 4:17 pm
by Davidobot
Ranguna259 wrote:You are telling me that your name if in orange color and you posted in the wrong section of the forum ?
Give him/her a break, his/her last post was nearly 3.5 years ago.
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 4:45 pm
by Rockford
What does an orange name signify?
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 4:49 pm
by Germanunkol
I assume you don't want the trail to "turn" with the ship (i.e. when the ship turns then the trail should describe a curve and not spin around with the ship - the latter can also look good if the ship is moving fast enough, but is trivial to program - just attach a static sprite, maybe variate the alpha/color a bit and make it follow the ship).
I think it might look better with streched particles, i.e. particles which are longer than they are wide.
But I've never used particles in Löve...
Another way might be meshes - seting up a static trail should not be hard: create a new mesh, use an image which is 1 pixel wide and about 20 pixels high, with a gradient fading from transparent to bright white and back to transparent. Make sure the image's mode is set to "repeating".
Then create 4 vertecies for each "segment", create multiple segments after each other (going to the side, in the direction where the image is just 1 pixel wide). Make sure to re-use the same texture coordinates (the corners of the image) for each segment, but different screen coordinates.
Make sure to set blend mode to additive.
Moving this thing (using the second method) could however be dificult...
Come to think of it, I think I'll try programming this... I'll let you know if I can get it to work.
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 5:06 pm
by Ranguna259
Davidobot wrote:
Give him/her a break, his/her last post was nearly 3.5 years ago.
Yeah you're right, sorry about that.. and back on topic
Germanunkol if you are good with shaders then you could also add a glow effect where the mesh/particles starts, an oval object that fades it's color from the center to the edges maybe ?
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 6:12 pm
by Davidobot
Rockford wrote:What does an orange name signify?
That the person is a moderator.
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 6:44 pm
by slime
Davidobot wrote:Rockford wrote:What does an orange name signify?
That the person is a moderator.
Not quite. It just means they are/were a developer of LÖVE.
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 6:46 pm
by Uradamus
Here is my take on that particle effect. I am using two particle systems, one in the background for the smoke like effect, then another on top for the flames. Feel free to do whatever you want with the script or the images.
Re: How to draw this contrail?
Posted: Mon Apr 14, 2014 6:49 pm
by Davidobot
slime wrote:Davidobot wrote:Rockford wrote:What does an orange name signify?
That the person is a moderator.
Not quite. It just means they are/were a developer of LÖVE.
Ah, yes. Pardon me. That's the green names.