Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visualization of Spherical Descriptors on Mesh #8

Open
Nowwin opened this issue Oct 24, 2024 · 11 comments
Open

Visualization of Spherical Descriptors on Mesh #8

Nowwin opened this issue Oct 24, 2024 · 11 comments

Comments

@Nowwin
Copy link

Nowwin commented Oct 24, 2024

Hi,

I was trying to visualize the spherical descriptors on a mesh. I tried to only visualize spherical descriptors with l >= 10 (higher frequency descriptors) by mapping the vertex to neighboring spherical samples and then normalize the sum of the weights over all vertices for frequencies l >= 10. Is it possible for you to confirm if what I am getting is in line to what you would expect?

[I am running the descriptor code with standard parameters and --noCQ]

image

image

image

@mkazhdan
Copy link
Owner

I'm afraid it is unclear to me what you are doing so I can't really say if the results seem reasonable.

@Nowwin
Copy link
Author

Nowwin commented Oct 27, 2024

Hi,
Sorry if it seems confusing but I was trying to map out the SHT coefficients I get to the actual mesh. I try to take the sum of only higher frequency SHTs so as to map which portion of actual mesh has more detail and which has lower detail (running hypothesis being - higher frequency SHTs will have a higher sum where the geometry has more detail)

@mkazhdan
Copy link
Owner

Still somewhat confused. Given a shape, you obtain a representation of it a spherical function. How do you get the mapping from mesh vertices to the sphere (where I am assuming you then sample the function)?

@Nowwin
Copy link
Author

Nowwin commented Oct 28, 2024

Oh I get the confusion now. So, I take the distance of the vertex from the shape's bounding box's center and then using this radius I try to identify between which spheres it lies. Say during our calculation we took 32 spheres, we know all of them have their center at the center of the bounding box and each spherical sample's radius. I use this information and identify the closest sphere.

A point x lies between sphere sample 11 and 12. I then use linear interpolation using distance of x from 11th and 12th sphere's surface and calculate the spherical harmonic weight for the vertex using the spherical harmonic weights we got for 11th and 12th spherical sample.

@mkazhdan
Copy link
Owner

I think I see.
In that case, I'm not sure the visualization makes sense.
The implicit representation is a GEDT -- a function in 3D that is one at the surface and falls off (as a Gaussian) with distance.
If you sample it at points on the surface, you should get a function that is constantly equal to one.

@Nowwin
Copy link
Author

Nowwin commented Oct 29, 2024

Hi,
Thank you for bearing with me till this point. I think I might be making the wrong impression, I am not trying to sum the SHT itself rather the weight of the SHTs that is given by the code assuming higher detailed surface will have higher weights for higher order SHTs. I then do something that is drawn below. I don't think it will be constantly one then right?
temp

@mkazhdan
Copy link
Owner

What does "the weight of the SHT" refer to?
Also, the spherical harmonic coefficients are not associated with any particular point in space, so how do you assign values to individual vertices based on the coefficients?

@Nowwin
Copy link
Author

Nowwin commented Oct 29, 2024

I was assuming that the descriptors produced by ShapeDescriptor.cpp, which I refer to as weights, can be evaluated based on their radius. Although the coefficients may not correspond to a specific point on the mesh, the features of each vertex contribute to the nearest sphere. Therefore, if I map these coefficients back onto all the vertices using the sphere’s radius, I can gain a positional understanding of how the descriptors vary across the mesh.

Am I wrong in assuming the above?

@mkazhdan
Copy link
Owner

It doesn't really make much sense to me.
If I understand correctly, two vertices at the same distance from the origin will be assigned the same weights.
So what the visualization is (mostly) encoding is the distance of vertices from the origin.

It sounds like you want more (e.g. something about the frequency of the geometry) but that's not really being captured. (And certainly not in a localized sense in that the frequency is an integrated quantity over the entire sphere so that you would be encoding the frequency content at that radius, not at that vertex.)

@Nowwin
Copy link
Author

Nowwin commented Oct 30, 2024

Makes sense. Thank you for bearing with me on this!

@mkazhdan
Copy link
Owner

No problem.
It may be the case that what you're looking is per-vertex estimation of curvature. Packages like LibIGL may compute that for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants