Search Unity

Question Random Image for Each Particle

Discussion in 'Visual Effect Graph' started by stv001, Mar 28, 2023.

  1. stv001

    stv001

    Joined:
    Dec 8, 2019
    Posts:
    12
    Hi to all,

    I have been trying to set a new image for each particle in the VFX Graph, but with no success.

    I was wondering if this is possible. For example, if I have a list of images in my assets, can I create a case in which each particle gets a random texture from the pool?

     
  2. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,307
    Not possible via assets - particles do not store textures in their data. The closest easy thing you can do is create huge texture containing small images (flipbook) and use particle id or something to get small slice of that texture in shader.

    If one huge texture is not enough, then maybe it would be possible to pass texture2Darray to shader (or via globals?), never tried that, so hard to say.