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

Using xatlas instead of the uvs from marching_tet #94

Closed xk-huang closed 1 year ago

xk-huang commented 1 year ago

Thanks for this wonderful work! I have a question about the design choice here, which is using xatlas to create uv coordinates instead of taking the uvs coordinates from marching_tet.

jmunkberg commented 1 year ago

Hello,

Thanks for your feedback! To avoid texture seams (or use texture filtering/mip maps), we ideally want large, continuous regions in UV-space, which is the reason for computing a parametrization. Simply allocating a small fraction of the UV domain for each triangle in the dense tet-grid works as well, but this (naïve) parametrization texture seams nearly everywhere, and produces sparser, lower-quality textures.

That said, xatlas is quite slow for very dense meshes, so for some applications, you may want to revert to a "per-triangle" parametrization, or rely on volumetric texturing (as we do in the first pass of optimization).

xk-huang commented 1 year ago

Thank you so much for the helpful reply! 😄