mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.56k stars 425 forks source link

Normals - inward or outward? #289

Closed jaquilio closed 9 months ago

jaquilio commented 9 months ago

In Kazdan et al's 2006 "Poisson Surface Reconstruction" paper, normals are assumed to be pointing inward. But, does the code actually assume the opposite, i.e., that they are pointing outward?

I got that impression by the response to the following issue: https://github.com/mkazhdan/PoissonRecon/issues/121

Also, in the discussion of a couple of issues (e.g., https://github.com/mkazhdan/PoissonRecon/issues/214), I saw the comment saying "the dot-product of the view direction and the surface normal must be negative". Following the usual convention of taking the view direction to be the vector from the view point to the scene point, for that condition to hold, the surface normal should be facing outward.

mkazhdan commented 9 months ago

In the code code, the normals are assumed to be pointing outward. They are flipped in the code so that the indicator function changes from 0 (outside) to 1 (inside.).

It should not make a difference using the default settings. However, if you use Dirichlet boundary conditions (instead of the default Neumann conditions) or use an envelope, the results will be different depending on whether normals are inward or outward facing..