mkazhdan / PoissonRecon

Poisson Surface Reconstruction
MIT License
1.58k stars 427 forks source link

The reconstruction process(matching cubes) #147

Open pyramidpoint opened 4 years ago

pyramidpoint commented 4 years ago

I have two questions

  1. In the Matching Cubes algorithm,Is a node a cube?
  2. In the function getMCIsoSurface, we Process at all depths that contain slice,What does this part of the code(“o>>=1”) mean?(In the following picture) I hope to receive your reply,thank you!!! 屏幕快照 2020-03-17 下午6 52 42
mkazhdan commented 4 years ago
  1. Yes.
  2. It's a division by two (or a bit shift to the left by one) accounting for the fact that as you move to the next coarser level your index is divided by two.

On March 17, 2020 6:57:29 AM EDT, pyramidpoint notifications@github.com wrote:

I have two questions>

  1. In the Matching Cubes algorithm,Is a node a cube?>
  2. In the function getMCIsoSurface, we Process at all depths that contain slice,What does this part of the code(“o>>=1”) mean?(In the following picture)> I hope to receive your reply,thank you!!!> <img width="941" alt="屏幕快照 2020-03-17 下午6 52 42" src="https://user-images.githubusercontent.com/45737133/76849533-897d1500-6880-11ea-85f4-9fe9782ba49a.png">>

    -- > You are receiving this because you are subscribed to this thread.> Reply to this email directly or view it on GitHub:> https://github.com/mkazhdan/PoissonRecon/issues/147

pyramidpoint commented 4 years ago

@mkazhdan Do you mean that there are 2^d slices on d-th level? Thank you!

mkazhdan commented 4 years ago

Yep.

On March 17, 2020 11:32:36 PM EDT, pyramidpoint notifications@github.com wrote:

@mkazhdan Do you mean that there are 2^d slices on d-th level? Thank you!

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/mkazhdan/PoissonRecon/issues/147#issuecomment-600407036

pyramidpoint commented 4 years ago

@mkazhdan Thank you for your reply. I see A function called _isValidSpaceNode() in the function _setSliceIsoCorners().If a node doesn't belongs to "ValidSpaceNode", are all eight of its nodes internal or external? So we don't have to deal with it? I hope to get your reply, thank you!

屏幕快照 2020-03-26 下午11 15 39
mkazhdan commented 4 years ago

For defining finite elements, we need to be able to represent not just the nodes within the unit cube, but also some around. (For example, the second-order B-splines are supported within a one-ring neighborhood. So if we use those and we want to consider all B-splines supported on the unit cube, we need to be able to index nodes just outside of the unit cube. Such nodes contribute finite elements but they (and their children) are not valid space nodes.

pyramidpoint commented 4 years ago

@mkazhdan Thank you ! So if it's a valid space node it's used in the MC algorithm.

mkazhdan commented 4 years ago

Yep.

pyramidpoint commented 4 years ago

thank you so much!

pyramidpoint commented 4 years ago

@mkazhdan If only partial vertices of the model are input, why is the reconstructed surface still closed?I expect for your reply,thank you!

mkazhdan commented 4 years ago

The level-set of an implicit function is always closed. (It is a closed surface if the implicit function does not have a vanishing gradient at the level-set value.)

pyramidpoint commented 4 years ago

@mkazhdan What does the stencil( x , y , z ) in _addFEMConstraints means? Thanks for your reply.

mkazhdan commented 4 years ago

The stencil is designed to support filtering. It provides a (3-dimensional) array of values that are treated as a window that can be moved around the domain.

pyramidpoint commented 4 years ago

@mkazhdan Thank you! And do the coefficients(node) represent the divergence of the Normal field (node)?(3-dimensional)

mkazhdan commented 4 years ago

Which coefficients are you referring to?

pyramidpoint commented 4 years ago

@mkazhdan I mean does normalInfo mean the divergence of normal field and is each of those elements three dimensions or one dimensions ? thanks for your reply!

mkazhdan commented 4 years ago

Nope. normalInfo is the (3D) normal field extrapolated from the point's orientation. It is used to compute the divergence component of the constraints in the addFEMConstraints line.

pyramidpoint commented 4 years ago

@mkazhdan Thank you! So the step are shown in the following is to calculate the divergence of the normal field.(My problem is that I don't know what the steps are for calculating divergence),Thank for your reply!

截屏2020-08-15 上午12 04 32
pyramidpoint commented 4 years ago

@hello, Where are the steps for calculating divergence? Thank you for your reply!

mkazhdan commented 4 years ago

It's done in the method "addFEMConstraints". The "Constraint" object is defined to take the normal vector field and integrate it against the gradients of the different B-splines. (This is the weak form expression of the divergence of the normal vector field.)

pyramidpoint commented 4 years ago

@mkazhdan Thank you for your reply! I have another question. What does the sample.weight mean?

mkazhdan commented 4 years ago

I'm not sure which "sample.weight" you are referring to. Likely you are referring to the class member ProjectiveData::weight. This class is used to accumulate the weighted sum of Data. The "weight" member tracks the sum of the weights used for accumulation.

pyramidpoint commented 4 years ago

@mkazhdan Thank you ! I understand. And what does the dxdydz in void Octree< Real >::_splatPointData() mean?Is it image? please , thank you.

dataInfo[_node] += v * (Real)dxdydz;

mkazhdan commented 4 years ago

I believe it's the (trilinear) interpolation weight

pyramidpoint commented 4 years ago

@mkazhdan thanks. But where is the process of calculating image? And result of setNormalField function is V(q)? image

mkazhdan commented 4 years ago

The normal field is set in the function FEMTree::setInterpolatedDataField

pyramidpoint commented 4 years ago

@mkazhdan Thank you! Now I'm learning the code of version 3. And I want to ask you a question:Why is the Octree:: width set to an integer rather than double(radius+0.5-EPSILON)*2 in function void Octree::setFunctionData()?

mkazhdan commented 4 years ago

I can't remember exactly, as version 3 was a while ago, but I believe it was because the basis functions have a support that has a strictly integer width. So storing the width as such avoids issues of numerical precision.

pyramidpoint commented 4 years ago

thank you very much

pyramidpoint commented 4 years ago

@mkazhdan hello! I have a quesiton about basis function in version9.0. Does the BsplineElements mean basis function? If true, pls Just a little bit about what BsplineElements contents, else pls tell me where is the basis function? thank you very very much!!

mkazhdan commented 4 years ago

The BSplineElements object is a vector of BSplineElementCoefficients objects, which can be used to describe a B-spline function. In general, a B-spline is a piecewise polynomial which is described by partitioning the domain into regular intervals and defining a polynomial function on each interval. In the case of a BSplineElements object, the size of the vector is the number of intervals, and each BSplineElementCoefficients describes the polynomial function in the associated interval.

pyramidpoint commented 3 years ago

@mkazhdan Thank you!! And I found that the iosvalue of version 3.0 is different from that of version 9.0. The iosvalue of version 3.0 is not in the range of 0-1. Why is that? thank you .

mkazhdan commented 3 years ago

Screening was only introduced in version 4. Until then, the solution was only defined up to a constant offset.

pyramidpoint commented 3 years ago

@mkazhdan But after I use the --pointWeight 0 argument to disable the screening, and the iosvalue is also in the range of 0-1.

pyramidpoint commented 3 years ago

@mkazhdan I think it's probably because the base function of version 9.0 and 3.0 is different, right?

pyramidpoint commented 3 years ago

@mkazhdan I set pointWeight to 0 and use the neumann boundary,why the isovalue is close to 0.5? Thank you for your reply!

mkazhdan commented 3 years ago

It could be that with Neumann boundary conditions, at the constant term (i.e. the term associated with basis function at the root of the tree) which is not constrained by the Poisson equation, is forced to 0.5. That would make the computed function have an average value of close to 0.5, which would explain the value obtained by averaging over the input samples.

pyramidpoint commented 3 years ago

@mkazhdan thank you!!!

pyramidpoint commented 3 years ago

@mkazhdan Hello ,I wanti to ask another question. What does Ghost node do in version 9.0? Thank you! ! !

mkazhdan commented 3 years ago

It's us d to track nodes that are in the tree but do not have finite element basis functions associated with them.

pyramidpoint commented 3 years ago

@mkazhdan Ohh , I know, thanks !!! And in the Marching Cubes step, How do you track nodes that are in different layers? Thank you!

pyramidpoint commented 3 years ago

@mkazhdan Excuse me, I haver a question about node function. The "node function"(base function) in SGP06 is unit-integral, but when I read the code in version 9.0, I don't find the 1/(o.w^3) In the integration between the base functions. imageSo I want to know why. Thank you very much!!!

pyramidpoint commented 3 years ago

How do you relate targetvalue(0.5) to screened Poisson's equation? ∆x=∇∙V+α(x-0.5)?

mkazhdan commented 3 years ago

See the discussion at the beginning of Section 3 of http://www.cs.jhu.edu/~misha/MyPapers/SGP20.pdf