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

How to get obj files #5

Open
Pavankunchala opened this issue Dec 3, 2022 · 6 comments
Open

How to get obj files #5

Pavankunchala opened this issue Dec 3, 2022 · 6 comments

Comments

@Pavankunchala
Copy link

Hey it is a wonderful repo

I wonder how I can get the output as a 3d model in the obj or fbx format

@elloza
Copy link

elloza commented Dec 3, 2022

Same here! It would be a great addition for this demo!
Congratulations for the amazing work by the way!

@dkebude
Copy link

dkebude commented Dec 4, 2022

Hi!

I have been trying to extract an OBJ file with marching cubes from your Voxel NeRF implementation.

My initial idea was to make your code work similar to the Stable-DreamFusion's mesh extraction implemented here: https://github.com/ashawkey/stable-dreamfusion/blob/53d4cef2055234e242d0b9b247c6f41bee7bbf46/nerf/renderer.py#L148L328

I like the utilization of xatlas here since the generated UV becomes very easily editable.

However, I got confused at one point: Here at line 170, https://github.com/ashawkey/stable-dreamfusion/blob/53d4cef2055234e242d0b9b247c6f41bee7bbf46/nerf/renderer.py#L170, the density function retrieves the albedo information as well as the sigmas. The same density function is utilized later at 244.

Furthermore, as far as I understand, they retrieve the mask information from the nvdiffrast after rasterization.

I have read your implementation, and I saw that you generate your own alpha masks and feats/colors.

I would like to utilize your implementation to export mesh in a similar manner and then create a PR for you to review and utilize. However, I was unsure at the points below, could you correct me if I am wrong?

  1. I believe I should utilize the sigmas generated by compute_density_feats function within Vox_RF class.
  2. Albedo channel/colors/feats (I am unsure about the difference here as well) should be retrieved from compute_app_feats function within Vox_RF class.
  3. Mask should be retrieved by running make_alpha_mask function and then utilizing Vox_RF.alphaMask
  4. Is there another way of retrieving sigmas, feats and masks in a single dictionary? I can write a function to retrieve them all from a single function as well. Does state_dict do that?
  5. I am unsure about the binary dilation and erosions within the export_mesh function of Stable-DreamFusion implementation and the nearest neighbors search for anti-aliasing part. Would you like me to implement that part as well?

@caseybasichis
Copy link

Did you make any progress exporting an obj from NeRF?

@w-hc
Copy link
Contributor

w-hc commented Dec 14, 2022

@caseybasichis thanks for ur interest we are doing a few other things but it's on our mind.

@AmanKishore
Copy link

Looks like Sparsefusion just released some of their code! Could be interesting to integrate!

@Pavankunchala
Copy link
Author

Any update on this

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

6 participants