NVlabs / nvdiffrecmc

Official code for the NeurIPS 2022 paper "Shape, Light, and Material Decomposition from Images using Monte Carlo Rendering and Denoising".
Other
363 stars 28 forks source link

low mesh quality with 256 tet + 128 spp #32

Open iraj465 opened 1 year ago

iraj465 commented 1 year ago

Hi, Fantastic piece of work, unreal to imagine this works so well out of the box. Appreciate this great work guys!

I'm getting good "smooth" quality meshes withe dmtet_grid:128 but i wanted to increase the details and hence generate the centred 256 tets and set dmtet_grid:256 keeping other hyperparams constant, but getting far worse quality with 256 dmtet. Why is that? Is there a technical problem that i'm not seeing here?

dmtet_grid:128 sample

Screenshot 2023-09-01 at 4 11 17 PM

dmtet_grid:256sample

Screenshot 2023-09-01 at 3 57 10 PM

Config:

{
  "ref_mesh": "/test_1",
  "random_textures": true,
  "iter": 2000,
  "save_interval": 100,
  "texture_res": [
    2048,
    2048
  ],
  "train_res": [
    1080,
    1920
  ],
  "batch": 3,
  "learning_rate": [
    0.03,
    0.003
  ],
  "dmtet_grid": 256,
  "mesh_scale": 2.1,
  "validate": true,
  "n_samples": 12,
  "denoiser": "bilateral",
  "display": [
    {
      "latlong": true
    },
    {
      "bsdf": "kd"
    },
    {
      "bsdf": "ks"
    },
    {
      "bsdf": "normal"
    }
  ],
  "background": "white",
  "out_dir": "nerf_materials",
  "ks_min": [
    0,
    0.1,
    0
  ],
  "ks_max": [
    0,
    1,
    1
  ]
}
JHnvidia commented 1 year ago

Hi @iraj465,

Thanks for checking out the code. We've also noted that training becomes increasingly difficult as tessellation increases. The problem is essentially that geometry gradients only propagate through silhouette edges. As the DMTet resolution goes up, the random noise initialization makes the gradients too noisy. It's the same in the original nvdiffrec codebase.

Unfortunately, I think it will be hard to get to work by only tuning the parameters. We haven't really looked into increasing detail, but some "off the top of my head" implementation alternatives would be: