Search Unity

Question Particle System visualization problem

Discussion in 'General Graphics' started by Poi-son, Jan 2, 2022.

  1. Poi-son

    Poi-son

    Joined:
    Dec 22, 2021
    Posts:
    33
    Hi,

    After working on it a couple of hours, I finally created a particle system to be used as a projectile, until finding out that it doesn't really move or what it supposed to look like when instantiated and moved as a projectile.

    I tried playing around with simulation space etc but couldn't make it.
    While selecting Hierarchy as a scaling mode works perfectly and particle fx scales the way I want with its parent GameObject(which has a collider and some other stuff on it), simulation doesn't look anything close to what I want particularly when it's moving in the world.

    It simulates perfectly while standing still in its local space but terrible when it travels across the screen.

    The problems are,

    1) It fades in too late. What I mean by this is, when the actual projectile travels some amount of distance particle fx just begins to show itself. Should I play around with Start Color(alpha value) and Start Lifetime to make it faster to appear and make it to be fully simulated and have a "full body" in very short distances?

    2) It does not obey the projectile's forward motion. By this I mean that it always points to the same direction even if I tried multiplying localScale on preferred axis by -1 when instantiating.

    Edit : NVM for the second part. I found that I was trying to manipulate the original prefab instead of its instantiated instance. Corrected it and now it works. But the 1st question is still valid.

    For the 1st problem, I checked "prewarm" to make it appear as quick as possible without a delay when generated but aesthetically it doesn't look nice with near no alpha fades. What is the optimal way of doing it?


    Any help is appreciated.
    Thank you!
     
    Last edited: Jan 2, 2022
  2. Torbach78

    Torbach78

    Joined:
    Aug 10, 2013
    Posts:
    296
    direction is better handled in Local space projectile logic imho, but a particle system can do it a few ways

    renderer > render alignment = velocity
    Renderer > Mesh > Quad (often requires Start Rotation [3D] to orient correctly)
    renderer > stretch billboard

    each may require marginal start speed so it has a vector to aim with, 0.005 will suffice

    Because stretch billboard has Stretch speed, it has an ability to start with 0 length and grow into full size to grant an element of fadeIn if you use 2-3 frames of acceleration.

    another way is to hide generation of a projectile with a muzzle flash or spawn effect to telestrate the anticipation of motion, this gives projectiles a visual appearance of emanating more naturally.
     
    Poi-son and richardkettlewell like this.