Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

VFX Graph: Is it possible to randomise the MainTexture in an output

Discussion in 'Graphics Experimental Previews' started by highlyinteractive, Jul 15, 2019.

  1. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    New to VFX graph, but loving it so far.

    I'd like a way to generate particles that use a random texture from a predefined group. Is that possible?

    I've tried looking at the Texture2DArray node, but it doesn't seem possible to select a random texture.

    Has anyone done anything similar?
     
    lnwhitling likes this.
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Hey. At the moment, you need to pack your textures in a single texture sheet and use flipbook mode on the output to select the texture you want. Frame selection is done using texIndex attribute that you can randomize per particle.
     
  3. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    116
    Ah ok, thanks.

    I'm already using texture sheets, so perhaps I'll just pack a bunch of them into one.

    Thanks for your help