Search Unity

Question Particle system disappears when origin is outside camera view

Discussion in 'General Graphics' started by MeteorStudio, Aug 25, 2021.

  1. MeteorStudio

    MeteorStudio

    Joined:
    Nov 11, 2017
    Posts:
    3
    I'm manually setting the particle positions in a particle system (using custom vertex streams through a shader) and I've found that the entire particle system disappears if the origin/transform isn't in view of the camera, both in scene view and in game view. Does anyone know how to fix this?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    The particle system's bounds are calculated on the CPU based on the particle positions. If you're moving the particles in the shader, the CPU doesn't know that and things they're confined to the spawn position (which in this case I guess is jut the pivot).

    There's no way to fix this for particle systems as they weren't designed expecting people to significantly move the particles using a shader.

    You probably want to look to using a different way to accomplish this goal. Like just moving the particle positions directly. If you're modifying them via a custom vertex stream, there's no reason you couldn't just move the particles directly.
     
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Unity 2022.1 introduces a way to set a custom bounds for any renderer, which would help with this.

    But we don’t have any other solutions for you right now I’m afraid.

    Perhaps an option to include the transform position in the bounds would be a nice feature..