schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.18k stars 279 forks source link

Could be possible to get per pixel z-depth information of the rendered image? #53

Open giagitom opened 5 years ago

giagitom commented 5 years ago

Hi,

Could be possible in some way?

speleo3 commented 5 years ago

It's currently not implemented. Pull requests welcome :-)

JarrettSJohnson commented 4 years ago

@giagitom What kind of format would you expected from this? Raw data or a greyscaled image?

giagitom commented 4 years ago

Hi @JarrettSJohnson , I am thinking about raw antialiased data

giagitom commented 4 years ago

Hi @JarrettSJohnson , a question.. Does depth already contains raw depth data at the end of the ray-tracing procedure? https://github.com/schrodinger/pymol-open-source/blob/4948dd0fd40962bd5d5fa9e26618cd7e2f654905/layer1/Ray.cpp#L5623

JarrettSJohnson commented 4 years ago

Hi @giagitom , your guess is as good as mine here since I'm not too familiar with the ray tracing code. Doing a quick inspection of the values before the buffer is deallocated, looks like these depth values are between -1 and 1.