Search Unity

Question VFX Particle Position Based on Depth Map

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

  1. stv001

    stv001

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

    I am really looking forward to understanding how to control the Z position of particles based on a depth map.
    I have processed the depth map using a Point Cache, and I am able to get the black and white values.

    However, I am not so sure how to position the particles that spawn from the point cache on the Z-axis based on this.

    Any help is greatly appreciated!

     
  2. stv001

    stv001

    Joined:
    Dec 8, 2019
    Posts:
    12
    Never mind, I got it.
    I used the Get Attribute Color (x) and used it to multiply the Z position of system
     
  3. doubleA_foundation

    doubleA_foundation

    Joined:
    Jun 18, 2021
    Posts:
    4
    Apologies to revive this thread, I'm trying to do the same but aren't a very skilled VFX Graph user. Could you be so kind to send me a screenshot or explanation of how you used these nodes to get the z positions? I'm able to generate a flat/2D pointcloud with the "Set position from Map" and "Set color from Map" nodes. But am still struggling to position the pixels in the Z axis with the depth map... thanks!