How to use Position (Depth)

Hi, I am trying to recreate this awesome example by Vlad, basically rendering everything with particles. I can’t seem to get the Position (Depth) node to work, whatever I do particles are instantiated on a flat plane in front of the camera. I’m probably missing something basic?

Hi @skoteskote ,

Are you using HDRP or URP?
VFX Camera buffer access for URP is still being worked on (part of this task on our roadmap)

1 Like

Thanks for the quick response @VladVNeykov , I am on HDRP, but now I tried it on my PC and there all works as expected. My laptop (mbp) still renders the particles on a flat plane… But that’s prob due to it being an old laptop, and it’s not a problem for me as it’s not my main workstation. All good!

We had an issue with the camera buffers on OSX, you might be in an earlier version where it still reproduced.
Glad it works on your PC! :slight_smile:

Yes, that is it! I am on 2020.3 on my laptop

Now I just need to figure out how to not render the objects I’m using for the depth buffer… But that’s another story :slight_smile:

@VladVNeykov any chance of uploading the project from that tweet? or at least the .vfx file?

Hey @andybak , sure thing, I’ve updated it to vanilla 2020.3 / 10.4 (as the original was using some custom stuff) and cleaned it up a bit. It is set up for HDRP as URP doesn’t have camera buffer access at the moment (that’s planned for 2021.2). You can grab it here.

6997427--826658--g99PEjcSUP_1.gif

2 Likes

That’s brilliant. Thanks!

Mind if I put it up on Github so it’s easier for other people to find (with proper credit of course)?

1 Like

Sure thing! Only bit I’m not 100% sure about is the mixamo dance animation (I put a *.txt in the package saying it came from there and from what I could tell from their FAQ it should be ok, but… mentioning it just in case ¯_(ツ)_/¯ )

1 Like

Maybe I’ll swap it out for an animation from the CMU mocap library.

Thanks!

1 Like

Hi Vlad, was this implemented in URP?

Hello.
Access to URP Camera Depth and Color Buffers landed in 2023.3.0a16 and above.
Have a lovely day.