NVlabs / nvdiffrec

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

How to show mesh with textures? #8

Closed Doraemon167 closed 2 years ago

Doraemon167 commented 2 years ago

Thank you for the amazing work! Now, I have trained the Nerf datasets of chair and I get a great result. I want to show the mesh with texture in MeshLab, but the chair mesh has nontexture in MeshLab. So what method should I use? 1

jmunkberg commented 2 years ago

Thanks! We use a pbr shading model, and I'm not sure that is supported in Meshlab. If you want to just apply the diffuse texture, you could likely try Filters -> Texture -> Set Texture -> Texture file (load mesh/texture_kd.png).

However, that would not directly match the setup in our renderer, where we use kd, ks and a tangent space normal map. You can, e.g., load the mesh in Blender (or any tool of your choice supporting PBR) and map the three textures.

Doraemon167 commented 2 years ago

Thank you jmunkberg! I solve this problem by Blender, it has a great result!

fahimsun commented 2 years ago

@Doraemon167 Can you please share your setup or instruction where KD/KS and (n) normal file will apply to which node? if you can provide picture of your node setup in blender that would be great.

Doraemon167 commented 2 years ago

@fahimsun sorry,I'm not very good at using bleder,when I load the mesh, I can see the texture.

jmunkberg commented 2 years ago

@fahimsun See example here https://github.com/NVlabs/nvdiffrec/issues/21