Page 1 of 1

PCV/AO calculated under orthographic or perspective mode?

Posted: Mon Apr 02, 2018 3:02 pm
by CCLiang
Hello Daniel,

Recently I am learning the source code of CC, yet I have a question about the calculation of PCV/AO. Is the depth or tz calculated under orthographic mode? I saw these comments in the CHANGELOG.md, but I also see the gluLookAt used in the code.
"Note that only the normals are taken into account as the lighting direction is simulated in orthographic mode (no perspective, i.e. the relative position of the light source has no effect on the result"
I am a newbie of OpenGL, and not sure if I misunderstand the code.

By the way, I am also interested in the function of "Gradient", and the doxygen recommonds to read your ph.D paper. However the paper was written in French. May I ask you for an English version or some related papers ?

My gratitude at last.
Thanks a lot! To the excellent CC and Daniel and other contributors. Hope you all well.

Re: PCV/AO calculated under orthographic or perspective mode?

Posted: Tue Apr 03, 2018 5:35 pm
by daniel
Indeed PCV / Shadevis works only in orthographic mode. Therefore if you input a point cloud to specify the 'light directions', only the normals are considered because the light source position won't change anything (due to the parallel projection).

And for the gradient, it's indeed explained a little bit in my PhD manuscript, but it's not in any scientific paper. It' a really simple approximation of a gradient value based on the local variance of the scalar field in the vicinity of a point. So it's not a 'directional' gradient.

And there's only one small mathematical demonstration in my PhD that shows that if the scalar field is equivalent to Euclidean distances (i.e. what you get when computing the distances between two 3D entities) then this value should be bounded (this avoids some strange 'noise' that can occur with the way the local variance is computed).

Re: PCV/AO calculated under orthographic or perspective mode?

Posted: Wed Apr 04, 2018 10:02 am
by CCLiang
Hi , Daniel.
It is more clear to me now. I will then continue my reading of the corresponding codes to have a better understand of the "PCV" and "gradient".

Thanks for your reply.
Best wishes!