facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

How to use Pytorch3d to render a uv normal map for a given mesh? #1853

Closed yejr0229 closed 1 month ago

yejr0229 commented 1 month ago

I wonder how to use Pytorch3d to render a uv normal map for a given mesh? Like this one: image

bottler commented 1 month ago

I think you will need to work out the maths for this for yourself. for each face in the mesh, you can find both its normal and it's location in the UV map. The logic for the latter ican be adapted from the centers_for_image function. You can then fill in a colored image with all these data.