Help improving Ribbon Particle Emitter
We have a rather unique gameplay mechanic in our mobile-based game where the player draws a path from the ground upwards and a rocket follows the path, destroying anything it touches.
To achieve this we're using a single ribbon particle emitter spawned in an actor (which doesn't move) that we teleport -- via SetWorldLocation() -- to a new location in 3D space whenever the player moves their finger a certain distance along the screen. Generally, this works extremely well. However, there are two problems that I'm looking for help in addressing (if possible).
Below is a screenshot of a particularly bad case scenario:
The light-blue line is the in-game ribbon effect.
The solid red line is (vaguely) the path that the player drew (I've offset it slightly to make it clear).
The dotted-red circles show two locations where the trail jumps off of the requested path (ISSUE #1).
The dotted-dark-blue circles show where the trail is twisted around facing the wrong direction (ISSUE #2).
So, what I'd like to see is something similar to the red line. A thick solid, consistent line that is 99% accurate to what the player is drawing. Instead there's two issues:
1) Even though I'm only moving the emitter when the player moves their finger a significant enough distance, the emitter seemingly jumps and creates huge additional loops on the corners. These can be HUGE at times and go from one side of the screen to the other.
2) After corners, the emitter will frequently twist over in 3D space, causing there to be holes in the trail.
Note: Both of these issues are at their worst when the framerate is low / spiking.
Below is a capture of how I've setup the ribbon data:
And the spawn parameters:
I'm absolutely NOT moving the emitter along the Y axis (the camera is fixed and points down Y). I'm also absolutely sure that the emitter does not end up getting teleported to places it shouldn't go. I've also tried all kinds of combinations of the emitter's settings, with very little luck.
I have managed to slightly improve the situation in the past by greatly increasing the detail of the emitter (more tessellation, basically), but it never completely solves the problem and greatly degrades the game's performance as a result.
So, any ideas? I'd love to get these two glitches out of the game as they greatly ruin the aesthetic.
asked Feb 15 '16 at 03:18 PM in Rendering
Hi Triblade -
Try Telling your Ribbon Module to Recalculate Tangent on Every Frame. That should correct most of the issue and setting your material to two-sided should correct the other problem you are having as well. Assuming this works for you, you should be able to reduce the amount of tessellation on your ribbon to a more performance friendly number.
answered Feb 15 '16 at 08:19 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here