Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Particle System and Camera Clipping

Discussion in 'Editor & General Support' started by mness, Jul 18, 2012.

  1. mness

    mness

    Joined:
    Jul 18, 2012
    Posts:
    1
    I'm attempting to create a 3D starfield using a static, box shaped particle system. For the most part it works great and I'm able to "fly" though the starfield with great results. However, I'm having trouble when the center of the particle system falls outside of the camera's field of view (if I rotate to look backwards or if I pass more than half way through the box). At that point the entire particle system is clipped from the scene and all the stars disappear. Is there any way to prevent this clipping?
     
  2. magnetix

    magnetix

    Joined:
    Apr 4, 2010
    Posts:
    102
    Hi - did you get anywhere with this? I am trying to fix a similar problem.
     
  3. magnetix

    magnetix

    Joined:
    Apr 4, 2010
    Posts:
    102
    Further info on this. If anyone can help, that would be much appreciated since we're trying to final our project! :/ Thanks in advance.

    - I'm using a Shuriken particle system in Unity 3.5.6f4
    - I've found that the legacy particle system does not have this problem.
    - I've also found that parenting the particle system to certain objects makes the problem happen or not (I cannot make any definite correlation between object type/contents and whether it works or not).
    - I found that sometimes setting the rigidbody on the parent object to kinematic would make it pop back in, but not always.
    - I found on one test that deleting/disabling part of the parent object's hierarchy makes the particles pop back in (it was a wheel collider in this case), but it didn't work every time.
    - The problem exists in both the editor camera and the game camera independently.
    - I've tried many combinations of camera/renderer settings to try to fix this but no luck.
    - Perhaps this is just a bug in the version of Unity I'm on?

    Any comments welcome. Thanks very much.
     
  4. kelthar

    kelthar

    Joined:
    Aug 22, 2012
    Posts:
    1
    Did it get resolved in 3.5.7? I have similar problems with object in an ortogonal view (UI-quads).
     
  5. magnetix

    magnetix

    Joined:
    Apr 4, 2010
    Posts:
    102
    Not that I know of, but I cannot confirm this. I ended up using legacy particles.
     
  6. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    I have the same issues - when the center of my particle system goes of the edge of the camera, my large particles which are still partially on screen are instantly destroyed. Very frustrating. I wish there was a way to just extend the margins of the in-view detection by a certain percentage.

    Update: It appears that this only happens when I used Render Mode "Mesh" because Billboards are not destroyed when they are partially off screen. I can't use billboards since I need the particles to rotate with the camera, but I did notice that if I use a small custom made 1x1 meter quad mesh instead of a standard Unity Plane the particles appear to survive their near clipping edge experience... so far anyway =)
     
    Last edited: Feb 11, 2013
  7. Django

    Django

    Joined:
    Nov 25, 2008
    Posts:
    120
    Just to let you know, I filed a bug at the beginning of last november for this with the render mode "mesh" (exact same thing you are saying). Unity has acknowledged the problem quickly and it has been sent for resolution. Hopefully it will be fixed in a coming update. The status of the case is still open at the moment.
     
  8. Egil

    Egil

    Joined:
    Jul 29, 2012
    Posts:
    215
    This also happens when the transform scale values are higher or lower than one. (Unity 3.5.6f4)
     
  9. superman7toni7

    superman7toni7

    Joined:
    Jul 17, 2013
    Posts:
    5
    Dear all,

    I have exactly the same error.
    It is very annoying and I did not manage to address it.

    The Particle system dissapeared with camera angles.
    Could you finally found a solution?
    There is another way of positioning particles in space with independent x,y,z positions, instead of using shuriken particles and creating the same effect?

    Thank you very much
    Antonio
     
  10. magnetix

    magnetix

    Joined:
    Apr 4, 2010
    Posts:
    102
    We finalled our project using the legacy system which did what we needed it to do. I think there were some improvements to shuriken in later releases of unity, however I did not go back to test this problem. I'm interested to know if the bug report was taken through to implementation.
     
  11. superman7toni7

    superman7toni7

    Joined:
    Jul 17, 2013
    Posts:
    5
    I understand magnetix.
    By the way, do you know if using the legacy system I could achieve positioning particles un space with their x,y,x coordinates, exactly as in shuriken?
    If yes, do you have any sample code?
    I need to create a galaxy map with stars.

    Best
    Antonio G.
     
  12. imphenzia

    imphenzia

    Joined:
    Jun 28, 2011
    Posts:
    413
    Hi - my method with custom quad 1x1m mesh still works and I haven't investigated any further since the previous post.
     
  13. paver

    paver

    Joined:
    Sep 28, 2013
    Posts:
    1
    I'm having a similar problem. Has no one solved this!?! Come on Unity! It's been a long time!
     
  14. Vire

    Vire

    Joined:
    Jun 17, 2012
    Posts:
    178
    This bug STILL EXISTS. Unacceptable.
     
  15. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Any updates on how to fix this?

    Someone suggested to check OnBecameVisible and OnBecameInvisible to tell us when this happens, but I don't know how to make the actual particles visible after that. I tried setting the enabled variable to true, but this still does not work.
     
  16. magnetix

    magnetix

    Joined:
    Apr 4, 2010
    Posts:
    102
    I'm not aware of any further progress on this bug, however this fella has been doing some cool things with custom DX11 particles. Maybe that will help you.

    Meanwhile, I'm not sure if superman7toni7 got an answer to his question, but, if you're still looking superman7toni7, I'd probably use custom quads to draw objects at set locations. Then you can position and draw them how you like. Your stars probably don't need all the features of a particle system such as life span or velocity, so I'd go with something more dedicated. I didn't notice the question before, sorry!
     
  17. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I'm working on iOS unfortunately. Is it possible to still use the custom DX11 particles in Unity then run in iOS or is that out of the question?
     
  18. sun_spider

    sun_spider

    Joined:
    Dec 3, 2013
    Posts:
    6
    Why is this still a bug?
    No one knows how to keep an emitter going when it's offscreen?
     
  19. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Unfortunately, the only hack I could find is parent the emitter game object to the Camera GameObject, then when the scene was done or I was done with the emitter, I called destroy.

    By parenting the Emitter to the camera game object it was tricking Unity into thinking the emitter was onscreen at all times. From there you just change the position of the particles where you need them to be in the world position.
     
  20. Pencrest

    Pencrest

    Joined:
    Sep 26, 2012
    Posts:
    1
    Im not sure if this will fix your problems but maybe it'll help. Make sure the scale on your particle system is set to 1 for x, y and z. I did this in my project and now the particles behave as expected on the screen edges.
     
  21. AA8A5

    AA8A5

    Joined:
    Jul 5, 2013
    Posts:
    4
    It worked fine for me to set the scale of particles to 1 in same case
     
  22. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    463
    More than 3 years later, and the bug is still here... o_O

    I found a fix, though, at least for my case, thanks to @Pencrest comment. But instead of setting all scales to 1, I raised scale.x till my particles stopped to disappear, which was at a value of 4.

    If your object has children, you might need to unparent them 1st, change the scale, reparent the children, then if some of them are particle system, you probably will have to restore their original scaling values.

    Note: I'm using a custom mesh.
     
    Last edited: Aug 8, 2015
  23. Shutter

    Shutter

    Joined:
    Feb 6, 2016
    Posts:
    22
    Almost 4 years and a similar problem still occurs to me: particles do not get rendered depending on camera angle. Worst thing is that Unity 5.3.3 suposedly fixed that, but I am having the problem with 5.3.4f.
     
    ToneDP likes this.
  24. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,852
    Which bug fix are you referring to in 5.3.3? I am not aware of this issue. Can you file a bug report with a sample project please?
     
  25. Toterain

    Toterain

    Joined:
    Aug 20, 2015
    Posts:
    1
    I've been playing with Renderer/Pivot and sometimes it's enought to mask this problems. I also create a father without emission because i like to have the pivot at the center of the prefab. Good luck!