Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    94
    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?
     
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    185
    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.
     
    Chmyke and highlyinteractive like this.
  3. highlyinteractive

    highlyinteractive

    Joined:
    Sep 6, 2012
    Posts:
    94
    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
     
unityunity