postech-ami / Paint-it

[CVPR'24] Official PyTorch Implementation of "Paint-it: Text-to-Texture Synthesis via Deep Convolutional Texture Map Optimization and Physically-Based Rendering"
https://kim-youwang.github.io/paint-it
MIT License
199 stars 6 forks source link

About generated textures #5

Closed LIU-Yuxin closed 7 months ago

LIU-Yuxin commented 7 months ago

Hi, could you please explain how the rgb channels in Ks texture should be interpreted? If I understand the paper correctly, there are roughness and metallic in that texture, but I am not sure which channels stores which property. In addition, are there any processing needed, before these textures can be used as albedo, roughness and metallic input for shaders in common softwares like Blender or Unity?

Youwang-Kim commented 7 months ago

Hi, thanks for the interest and question.

Regarding RGB channels in Ks texture, we use G channel as "roughness" and B channel as "metalness", and we omit R channel. We borrowed the design choice of NVDiffrec, and you can find the details below: https://github.com/postech-ami/paint-it/blob/407c55b4255dd8e13fd950313ea860cf0ffe71e2/nvdiff_render/light.py#L88-L92

Furthermore, if you want to load the Ks texture in Blender, you can simply load Ks texture and use the "ShaderNodeSeparateRGB" node to separate the material properties. It would be much easier if you use python scripting at Blender. You can find a useful python script here: https://github.com/NVlabs/nvdiffrecmc?tab=readme-ov-file#use-the-extracted-3d-models-in-blender

Please let me know if you have additional questions :)

Thanks.

LIU-Yuxin commented 7 months ago

Thank you for your detailed answer!