Search Unity

Particle system distance sorting doesn't work?

Discussion in 'Editor & General Support' started by Alabatross, Oct 2, 2015.

  1. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    I can't seem to get this to work, I've made sure my scale is 1,1,1 and this happens in builds too?

    Is this a bug or do I need to manually edit a built in shader to fix it?

     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Martin_H likes this.
  3. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Thank you so much! I was actually using world space but this is great news, hopefully it fixes it in world too :)
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hmm no the fix is just for local. Can you report it as a bug with the example scene and post the number here, ill take a look.
     
  5. Alabatross

    Alabatross

    Joined:
    Dec 15, 2012
    Posts:
    223
    Sure, here you go: (Case 733312) I did the same setup green > red

    Here it is breaking in the example scene:

     
    karl_jones likes this.
  6. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    Getting the same sort of issue with particle systems not sorting correctly. in my scene i have multiple cameras rendering the particles could that be causing any issue?
     
  7. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    An example of the sorting issues i have been having. the particle effect is set to world and sort by distance. also the angle of the particle sorting errors are facing towards another camera that is rendering to texture off the the top right of the screen. multi threaded quick sort issues maybe? i can package this up if that helps

    Smoke Sort Errors.png
     
  8. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hi. That project looks nice but not very good for debugging ;)
    Very simple is ideal.
    I believe I have just solved the sorting issue, we were getting the position of the camera in a really wrong way :eek: causing all sorts of bad distance sorting. Just fixed it and its looking good, need to get it tested and hopefully we will have it out in an upcoming patch. So good news :)
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Yes it does :)
     
    Alabatross likes this.
  10. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Did the distance sorting change in 5.2? Some of our particles are flickering. Was not a problem in 5.1. Very obvious in 5.2!
     
  11. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Hi Prodigga. Yes a bug was introduced when using sorting by distance. This is now fixed in 5.3 and we are currently trying to backport it to a 5.2 patch.
     
  12. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Will this fix be in the next patch update for 5.2, the sorting is making my particles look very ugly.

    Edit: Didnt make it into the Oct 30th patch then?
     
  13. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Its in next weeks, I missed this weeks cut off :(
     
  14. jack-riddell

    jack-riddell

    Joined:
    Feb 11, 2014
    Posts:
    326
    so i downloaded the latest update and the particle sorting is still busted, is a fix still in the works?
     
  15. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    The fix is now out. Did you file a bug report? It's possible your problem is something else, if you have an example project/bug report I can check.
     
  16. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    For us the sorting is much better than in 5.1 (The particles actually do some sorting now), but it isn't flawless like it used to be before. We are able to observe some sorting errors - no where near as bad as before but every now and again we are seeing a stray particle or two being sorted incorrectly and it totally destroys the effect. Never had any issues with distance sorting prior to 5.2 - it's always been perfect and it 'just worked'. I will try and get a screengrab for you Karl.
     
  17. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    350
    Sort by distance in 5.2.3 is slightly better than 5.2.2 but it's still far from perfect. Again, it looks alright with the camera from back to front, but once it turns from front to back, the z-fight begins which results in alpha particles flicker severely. It really doesn't matter whether the simulation space is world or local. Same result. The video below demonstrates the glitch at 0:16



    The tornado effect can be downloaded from Asset Store for free
     
  18. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,282
    Thanks I'll take a look at it.