Reading depth from maya viewport

maya

#1

Hello!

I’m trying to read the depth from a maya viewport without much luck :confused:
Here’s my simple code - which is giving me nothing but 0’s

https://pastebin.com/sck9njWP

Has anybody managed to do this?
Thanks so much in advance!

Seb


#2

Turns out this is not working in VP2 but I do get some values in the old renderer!
Link to area where an AD engineer kindly replied :slight_smile:
https://forums.autodesk.com/t5/maya-programming/reading-depth-from-maya-viewport/m-p/7008693/highlight/false#M5750