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

Why the extracted texture is much brighter than it should be? #17

Open CCOSerika opened 1 year ago

CCOSerika commented 1 year ago

Hi, author. First of all, cheers on such an awesome work. I've managed to obtain textured mesh from an existing geometry. The results are as follows. The right is from this project and the left is from another. 2023-01-09 11-44-36 的屏幕截图 2023-01-09 11-46-35 的屏幕截图 It's clear that the right texture is much brighter than the left, which caused texture detail missing sometimes. I wonder why and how to adjust it?

jmunkberg commented 1 year ago

Thanks @CCOSerika ,

Note that we use a PBR shading model with a diffuse and specular lobe (see paper for details), so directly visualizing only the diffuse texture in MeshLab won't capture the full shading. Does it also look brighter during training in our renderer (check the images dumped during training)? You can look at the included blender example on how to setup the PBR shading network: https://github.com/NVlabs/nvdiffrecmc/#use-the-extracted-3d-models-in-blender

Another issue is that we optimize the material and lighting jointly, so the optimization process has freedom to either make the lighting darker and materials brighter or vice versa. This is a bit tricky to control. You can constrain the material parameters with the config flags

    "kd_min" : [0.03, 0.03, 0.03], # diffuse texture min values 
    "kd_max" : [0.8, 0.8, 0.8],      # diffuse texture min values 
    "ks_min" : [0, 0.08, 0.0], # specular parameters: x (unused) , roughness, metalness
    "ks_max" : [0, 1.0, 1.0],

Controlling the light intensity is harder, as it is an HDR probe.