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

Added meshing of density field using marching cubes #11

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

amanshenoy
Copy link

Added meshing during training and meshing-only once trained, creating a grid of densities and meshing using marching cubes

@yashbhalgat
Copy link
Owner

Thanks for the useful contribution, @amanshenoy! I will review the added code soon. In the meantime, do you have any mesh outputs to showcase?

Previous code could have thrown an error if one of the level sets for meshing did not exist in the density field. This is very likely for high density level sets that are attempted to mesh early on in training, since the density field would not have learned much early on and lower densities would be more common.
@amanshenoy
Copy link
Author

amanshenoy commented Mar 29, 2022

Hey, yeah - had largely tested on synthetic lego dataset. The following mesh screenshot is the synthetic lego dataset trained to 8k iterations with default training configs. Meshing was done at resolution 512 and level set 40.

The mesh does have a lot of artifacts; a lot of which probably is due to the nature of NeRF (no clear definition of where the surface is) and also since it wasn't trained to completion. Higher resolutions should generate better meshes and texturing the mesh would definitely improve appearance!

mesh_lego

@yashbhalgat
Copy link
Owner

This looks great! You can see much of the geometry here. Ofcourse, the surface isn't high quality but that's an inherent weakness of NeRF. Thanks for the effort here and adding this feature! Will review and merge as soon as I get some time.

@ghasemikasra39
Copy link

This is what I was looking for. Any plan to merge it? Or is there still work needed for this?

@MvWouden
Copy link

This is what I was looking for. Any plan to merge it? Or is there still work needed for this?

Was randomly checking this PR and saw that you accidentally included a datadir change in configs/lego.txt:

+  datadir = /home/ubuntu/aman/datasets/lego

Might want to leave that out.

@7eta
Copy link

7eta commented Sep 21, 2023

@amanshenoy
thanks a lot! i have created a mesh file.
but, how do i apply color to the mesh?

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

Successfully merging this pull request may close these issues.

5 participants