NVlabs / nvdiffrec

Official code for the CVPR 2022 (oral) paper "Extracting Triangular 3D Models, Materials, and Lighting From Images".
Other
2.09k stars 222 forks source link

How to train from a pre-defined mesh? #150

Closed DRosemei closed 6 months ago

DRosemei commented 6 months ago

Thanks for you great work! I want to know how to train an obj from a pre-defined mesh like bellow. Thanks in advance :) image

jmunkberg commented 6 months ago

Thanks @DRosemei ,

You can use the "base_mesh" option in the config to only run the second pass of the optimization. Additionally, if you specify "lock_pos" : true the vertex positions will not be moved during the optimization. If you want some geometry optimization when using a pre-defined mesh as above, I would recommend a large Laplacian factor "laplace_scale" : 3000, so that the geometry movement is constrained.

This config is one example of using a pre-defined mesh: https://github.com/NVlabs/nvdiffrec/blob/main/configs/spot_metal.json

DRosemei commented 6 months ago

@jmunkberg Thanks for your kind help:)