Home Unity

Shuriken particles and z-fighting

mod
Offline / Send Message
rooster mod
Hi, I have some particles which are using the default alpha blend shader with no texture, so they are just squares that fade out over time using alpha.

as soon as I apply an image or vary their colours, it becomes apparent that there are z-fighting issues. I have tried all the sort mode options and they don't seem to make any difference :/

has anyone come up against sorting problems in shuriken?

EDIT: OOOHH I think I know what's causing it, but not how to fix... I have a couple of particle systems near each other. I think it may be particles from each system fighting

thanks,
-Rich

Replies

  • Farfarer
    Options
    Offline / Send Message
    There's sorting options on the Cameras, I think. Perhaps one of those'll work? Orthographic maybe?
  • Brendan
    Options
    Offline / Send Message
    Brendan polycounter lvl 8
    Talon wrote: »
    There's sorting options on the Cameras, I think. Perhaps one of those'll work? Orthographic maybe?

    what



    Rooster, sorting for transparent stuff is done (by default) using their positions, not by ZTesting every pixel. So what must be happening is you've either got particles all emitting on one 2d plane (or close enough) or your particles are weaving in and out of each other.

    For shuriken there's a few ways to deal with this, the cheapest (and usually most effective) way to deal with this is the sorting fudge option. Crack that up or down depending on which way you want them to sort - this will adjust their 'distance' to the camera. So if you adjust it to be further away, it'll be drawn behind whatever's in front.

    Another thing to look at is the sorting mode options; oldest first and youngest first can be good depending on where you want the particles to look like they're sorting the best (spawn or death).
  • Farfarer
    Options
    Offline / Send Message
    Brendan wrote: »
    what
    Very much so. I hadn't tried it myself, just read threads on the Unity forums about similar issues and that was a suggestion.

    Now I've checked for myself, I (and they) are talking out of their arse :P
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    In Shuriken Renderer component look for fudge setting and sorting order dropdown... Try to play with them.
Sign In or Register to comment.