Search Unity

  1. Engage, network and learn at Unite Austin 2017, Oct 3 - 5. Get your ticket today!
    Dismiss Notice
  2. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  3. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Unity 2017.2 beta is now available for download.
    Dismiss Notice

[Feedback] Ribbonized Particle Trails

Discussion in 'Particle System Previews' started by richardkettlewell, Aug 18, 2017.

  1. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    474
    karl_jones likes this.
  2. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    254
    Thank the particle team! This is exactly what I am looking for and works very straightforward! Few comments after a preliminary test:
    1. It doesn't work with sub emitter as expected as the ribbonized trail connects all sub particles without distinguishing between spawning particles.
    2. I am not entirely sure how "ribbon count" works practically. Only "1" ribbon gives the reasonable result.
    3. "Blend" mode gradients of both "color over lifetime" and "color over trail" in trails module prevent changing color regardless of "particles" or "ribbon" modes, but can be undo by changing to "fixed" mode gradient then revert back to blend mode.
    "Restart" button in particle effect panel saves tons of clicking between stop and play :D
     
    Last edited: Sep 3, 2017
    karl_jones likes this.
  3. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    207
    1. Without any smoothing the amount of practical applications for these ribbons will be very, very limited. What I am seeing is straight line connection between each particle with hard corners. This might work for some stylized effects but for anything else, this is not acceptable. If you guys don't want to do any CPU curve interpolation to smooth the corners, maybe you might try somehow supporting that in a shader? Tesselation would be one of the things you might want to try.

    2. For "Texture Mode: Tile" I can't see any tiling settings. Where do I set tiling options? If this needs to be set per-material I would end up with tons of same materials with just different tiling options. Not very good for project upkeep.

    3. "Texture Mode: Tile" had the same issues as normal trails. USs are not "glued" to the front so when the ribbon moves, the whole texture is creating very odd, epileptic visual results. You can see the odd visuals here


    This was already discussed on realtimevfx forums so @richardkettlewell , you probably know what the issue is ;)

    4. Ribbons geometry seems to be generated differently depending on the camera angle. Mesh is changing it's width and positions. You can see it at the beginning of the video


    5. It seems that normals are all wrong and thus lighting on lit shaders is wrong too. Also, a slider which would say how round ribbon normals are would be nice.
     
  4. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    254
    @varfare I agree tessellation would help, but this thing is really meant to be applied on high particle emission count and the particles are able to form a proper curve to reduce hard corners at control points of the ribbon. In Final Fantasy XV, the "Death" spell fx also uses this kind of ribbonized trail but there is obvious "hard corners" if you pay slight attention, meaning they have some performance concern to make the ribbon smoother.



    Also I don't think it's a very good idea to make the trail very wide, considering it's a common practice to use HDR bloom to "thicken" thin trail today.
     
    Last edited: Aug 23, 2017
    laurentlavigne likes this.
  5. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    207
    The seer fact that Final Fantasy has hard corners does not mean this is cool :) Cryengine is doing more or less what Unity is doing now but you can use integrated shader with tesselation and curve interpolation to get smooth transition between control points. This approach is very fast and rock solid. Your demo is using up to 1ms on the CPU. I am assuming that Noise has a lot to do with this thing but since Trails are expensive, I guess Ribbons are too so the cost without Noise would be pretty high anyway.
     
    laurentlavigne likes this.
  6. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    474
    Thanks for the feedback so far!

    Good idea - Ill add this to our roadmap to be implemented in the future.

    2 ribbons will join particles 1,3,5,7 and 2,4,6,8. etc. We are using it in internal demos for things like smoke from an incense stick burner, or cigarette, etc.

    I disagree - with a more considered setup of the particle settings, as shown by ifurkend, you can create smooth effects. Furthermore, I suspect that when we add the ability to have 1 ribbon per birth sub-particle, (the first part of my reply, above), it will be trivial to create smooth effects.

    As you suggest, they are in the Material settings.

    You probably just need to check Generate Lighting Data in the Trail Module. We disable this by default for performance.

    I would strongly advise against evaluating the performance of any specific feature based on overall frame timings, even if that effect is the only thing in the scene. I would also recommend not assuming anything when it comes to performance, and to always measure. Each aspect of an effect can be measured accurately using the Profiler - we have markers for each module, plus the geometry creation. Trails are only expensive when creating many, high detailed trails.
     
    laurentlavigne and ifurkend like this.
  7. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    254
    Now I have actually tested it, it turns out tessellation doesn't work on any trail (trail renderer, particle trails/ribbons), at least with the example shaders in the official doc which otherwise work on normal mesh and mesh particles.
     
    Last edited: Aug 30, 2017
  8. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    254
    I'm finally able to achieve that multi-ribbons with a single particle system using arc loop in shape module, even though it doesn't look very stable. At some point the ribbons still seemingly attempt to cling to their siblings.
     
  9. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    254
    Using the aforementioned multi-ribbon method with spread and speed of shape module, influencing the particle/ribbon size by Noise module, no matter how small the factor is, just looks very wonky.

    At one point, noise-size starts to freak out (attached particle prefab package), even though I can create a new particle system with noise-size setting which looks absolutely normal during edit mode and runtime.

     

    Attached Files:

    laurentlavigne likes this.
  10. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    254
    Tried to use emission rate over distance, the problem is that when both types of emission (time and distance) are emitting particles simultaneously, the ribbon is screwed. Perhaps a boolean option to mutually exclude both types of emission would help, i.e. when both emission types are given some value and the emitter is moving (emission rate over distance is spawning particles), disable emission rate over time temporarily until the emitter is stationary. This new property can benefit use case beyond ribbon, e.g. car exhaustion smoke.
     
  11. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    207
    I would say this would be very useful in general, not only for ribbons. We have something like that in custom particle system in my company. We called that "Maintain Density". It is keeping spatial density of particles when emitter is moving. Let's just say you have smoke trailing behind the spaceship engine just like here:



    You want to make sure that no matter what spaceship movement speed is, you maintain certain density of particles for each unit traveled. But at the same time, if spaceship is not moving you still want to emit as much particles as you specified in emission rate. In our particle system case, with maintain density = 1 we are saying that when particle emitter is moving, it should emit as much particles as it needs to keep the same density as with stationary emitter. 0.5 means 50% of this density and so on. It would make sense to have this for ribbons and as a parameter in general.
     
  12. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    474
    We've added a new checkbox to the Trails Module for this, called "Split Sub Emitter Trails" :)

    And this whole feature is going to be released in 2017.3!
     
    vx4, ifurkend and hippocoder like this.
  13. vx4

    vx4

    Joined:
    Dec 11, 2012
    Posts:
    87
    Hi
    It will be nice to be able to select the range of live time of particles which ribbons will form from. The range can change to make ribbons act as it move. for example if exist 6 particles with live time remaining 1,2,3,4,5,6 and selected range from 2.5 to 4.5. The particles 2,3,4 will be selected to form ribbons In addition to 2 extra linear interpolation halve distance from particles 1 to 2 and 4 to 5. I provide simple demo show what i want to achieve.
     

    Attached Files:

  14. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    474
    Can you achieve this kind of thing with the Width over Trail or Width over Lifetime curves?
     
  15. vx4

    vx4

    Joined:
    Dec 11, 2012
    Posts:
    87
    I couldn't get the same thing.


     
    richardkettlewell likes this.