Anttwo / SuGaR

[CVPR 2024] Official PyTorch implementation of SuGaR: Surface-Aligned Gaussian Splatting for Efficient 3D Mesh Reconstruction and High-Quality Mesh Rendering
https://anttwo.github.io/sugar/
Other
2.05k stars 147 forks source link

Is there a good way to fill empty surfaces? #137

Open hanjoonwon opened 6 months ago

hanjoonwon commented 6 months ago

image

Currently my images are like this with the subject on a pedestal, so the lower part of the battery is not reconstructed properly. Is there a good way to solve this problem? And the lower part is restored too dirty ++Why is the mesh result much smaller than the actual size? I tried to output to 3dprinter, but the size is too small image

Anttwo commented 6 months ago

Hello @hanjoonwon,

I suppose the lower part of the battery is badly reconstructed mainly because of the transparent pedestal. A transparent object like this one is a nightmare for mesh reconstruction algorithms haha, so I think it plays a role.

Also, because your object is small and quite simple, you may not need such precision and triangles.

  1. You may try to use the argument low_poly True with the script train.py.
  2. You can also get a smoother mesh and avoid holes in the surface by following this advice in the Tips section of the README.md file (please make sure you pull the recent changes I pushed to the code first):

4. I have holes in my mesh, what can I do?

If you have holes in your mesh, this means the cleaning step of the Poisson mesh is too aggressive for your scene. You can reduce the treshold vertices_density_quantile used for cleaning by modifying line 43 of sugar_extractors/coarse_mesh.py. For example, you can change this line from

  vertices_density_quantile = 0.1

to

  vertices_density_quantile = 0.

5. I have messy ellipsoidal bumps on the surface of my mesh, what can I do?

Depending on your scene, the default hyperparameters used for Poisson reconstruction may be too fine compared to the size of the Gaussians. Gaussian could then become visible on the mesh, which results in messy ellipsoidal bumps on the surface of the mesh. This could happen if the camera trajectory is very close to a simple foreground object, for example.
To fix this, you can reduce the depth of Poisson reconstruction poisson_depth by modifying line 42 of sugar_extractors/coarse_mesh.py.
For example, you can change line 42 from

  poisson_depth = 10

to

  poisson_depth = 7

You may also try poisson_depth = 6, or poisson_depth = 8 if the result is not satisfying.

hanjoonwon commented 6 months ago

Hello @hanjoonwon,

I suppose the lower part of the battery is badly reconstructed mainly because of the transparent pedestal. A transparent object like this one is a nightmare for mesh reconstruction algorithms haha, so I think it plays a role.

Also, because your object is small and quite simple, you may not need such precision are triangles.

  1. You may try to use the argument low_poly True with the script train.py.
  2. You can also get a smoother mesh and avoid holes in the surface by following this advice in the Tips section of the README.md file (please make sure you pull the recent changes I pushed to the code first):

4. I have holes in my mesh, what can I do?

If you have holes in your mesh, this means the cleaning step of the Poisson mesh is too aggressive for your scene. You can reduce the treshold vertices_density_quantile used for cleaning by modifying line 43 of sugar_extractors/coarse_mesh.py. For example, you can change this line from

  vertices_density_quantile = 0.1

to

  vertices_density_quantile = 0.

5. I have messy ellipsoidal bumps on the surface of my mesh, what can I do?

Depending on your scene, the default hyperparameters used for Poisson reconstruction may be too fine compared to the size of the Gaussians. Gaussian could then become visible on the mesh, which results in messy ellipsoidal bumps on the surface of the mesh. This could happen if the camera trajectory is very close to a simple foreground object, for example. To fix this, you can reduce the depth of Poisson reconstruction poisson_depth by modifying line 42 of sugar_extractors/coarse_mesh.py. For example, you can change line 42 from

  poisson_depth = 10

to

  poisson_depth = 7

You may also try poisson_depth = 6, or poisson_depth = 8 if the result is not satisfying.

@Anttwo thank you so much :)

I thought I should make it transparent so the bottom of the object would be visible so it would be reconstructed properly. My purpose was to reconstruct the battery perfectly down to the bottom, but I think the bottom of the object would be obscured too much if the base was colored.

image image

because of transparent?