pytorch3d
                                
                                 pytorch3d copied to clipboard
                                
                                    pytorch3d copied to clipboard
                            
                            
                            
                        Some artifacts on rendered images
Example from: https://github.com/facebookresearch/pytorch3d/blob/main/docs/tutorials/render_textured_meshes.ipynb
I change the camera to: cameras = OrthographicCameras(R=R, T=T, device=device) and replace azim from 180 to 0 in R, T = look_at_view_transform(2.7, 0, 180) , and add code to export the image:
import cv2
import numpy as np
img_c = images[0].cpu().numpy()
img_c = img_c[..., :3]
img_c = img_c[..., ::-1]
img_c = (img_c * 255).astype(np.uint8)
cv2.imwrite(obj_filename[:-4] + "_c.png", img_c)
Here is the result:

Some artifacts on the image:

This is because a few pixels in the middle of face is assigned to other faces.
This seems to originate from MeshRasterizer when using OrthographicCameras or FoVOrthographicCameras.
Below figures are visualization of fragment.pix_to_face which is output value from MeshRasterizer.
When converted from OrthographicCameras into FoVPerspectiveCameras, these artifacts disappear.
I'm not very familiar with this part, I just encountered this phenomenon when using it, and I still don't know how to improve this problem...
The problem is in either OrthographicCameras or MeshRasterizer.
Since MeshRasterizer is mainly written in cuda, I hope the bug is in OrthographicCameras.
Just using perspective camera may be good solution though haha.
Since I need orthographic cameras, I'm going to dig into this problem within 2 weeks.
I really hope the bug is just in OrthographicCameras.
I am looking forward to hearing good news from you.
Does this go away if you set bin_size=0 in the RasterizationSettings?