pytorch3d
pytorch3d copied to clipboard
optimize textures with TexturesUV and save as obj file
Dear author,
Can I optimize textures with TexturesUV with given image , geometry, and camera pose, then save the result as obj file so that I can view the textured mesh in the MeshLab software?
Is the TexturesUV rendering process fully differentiable ?
Thanks !
Can I optimize textures with TexturesUV with given image , geometry, and camera pose, then save the result as obj file so that I can view the textured mesh in the MeshLab software?
Yes, but unfortunately you have to use the save_obj
function (see here). If you use the generic IO
method it won't save the texture data. This should be fixed. Thank you for pointing this out.
Is the TexturesUV rendering process fully differentiable ?
I don't know what you mean by "fully", but yes it is differentiable where it makes sense, so the inputs determine how differentiable this is. You need to understand roughly what the model does, e.g. to make occlusion differentiable. (For example, gamma and sigma matter, and soft blending is needed.)
Thanks so much for your reply.
I have the mesh and the images , camera pose, in principle I can initialize the texture with xatlas, and then load them into pytorch3d.
For TexturesUV, I need maps, faces_uvs, verts_uvs. As what I understand, I can get faces_uvs, verts_uvs from xatlas, but I need to opitimize maps from pytorch3d. So I need to make maps differentiable .
Is my understanding correct?
I don't know xatlas and I can't help with your modelling question. Rendering is differentiable with respect to maps
.