pytorch3d icon indicating copy to clipboard operation
pytorch3d copied to clipboard

How could I ensure object is centered in rendered images (while changing viewpoints)?

Open The-Nerd-AI opened this issue 1 year ago • 1 comments

For a single 3D object mesh, I want to get its multiple views using PyTorch3D renderer. I set R, T = look_at_view_transform(dist=1, elev=0, azim=[0/360, 30/360, ..., 360/360],). Using R and T during the rendering process, I could obtain multiple views of the 3D object mesh.

However, I want to obtain "object-centered" images. In the above rendered images, objects are not located at the center of images. How could I obtain (1) multiple views (360 degrees in azimuth) and (2) object-centered images at the same time? ** I want to ensure that the center of the bounding box surrounding the object is equal to the center of image.

Please guide me with a specific code example :D

Thank you for this amazing project!

The-Nerd-AI avatar Dec 27 '23 07:12 The-Nerd-AI

You can find the center yourself and then pass it as the at in look_at_view_transform.

bottler avatar Jan 17 '24 18:01 bottler