Open zhw-github opened 2 years ago
Hi, converting length to Z-depth can be easily done in python.
You can divide by the length of the ray for pixel (x, y)
in {0, ... w-1} x {0, ... h-1}
X = (x+0.5-cx)/fx
Y = (y+0.5-cy)/fy
Z = 1
z_depth = length * 1/sqrt(X**2 + Y**2 + Z**2)
Hi, I have one question after reading the code. In svox2.py file,you define a volume_render_depth function?Then the note below says this is the absolute length along the ray, not the z-depth as usually expected.But how can i get the zdepth with changing you code. I think that this code is the key: while (t <= ray.tmax) {
pragma unroll 3
what does t and pos mean?