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

cropped output #106

Closed derrick-xwp closed 1 year ago

derrick-xwp commented 1 year ago

I am using following configs:

the dmtet_grid is 256

"random_textures": true,
"iter": 5000,
"save_interval": 100,
"texture_res": [ 2048, 2048 ],
"train_res": [800, 800],
"batch": 8,
"learning_rate": [0.03, 0.01],
"ks_min" : [0, 0.1, 0.0],
"dmtet_grid" : 256,
"mesh_scale" : 2.3,
"laplace_scale" : 3000,
"display": [{"latlong" : true}, {"bsdf" : "kd"}, {"bsdf" : "ks"}, {"bsdf" : "normal"}],
"layers" : 4,
"background" : "white",
"out_dir": "nerf_drums_256"

The rendered image is cropped: img_dmtet_pass1_000001

jmunkberg commented 1 year ago

Hello,

I assume you generated the high resolution (256) grid yourself? My guess is that the scale or origin of the tet grid is different from the ones we shipped. I would recommend to print the bbox min/max value for a run using "dmtet_grid" : 128, and then verify that your generated 256 grid has the same extents.

jmunkberg commented 1 year ago

You can also look at early training images. The tet grid should be centered and tightly cover the object.

derrick-xwp commented 1 year ago

Thanks for your answer. May I ask about the necessity of scale? It just rescales the verts to be within [-0.5, 0.5] ?

jmunkberg commented 1 year ago

The tet grid spans the volume we optimize inside. Only inside that volume can we create geometry. The same extents are also used for volumetric texturing.