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 do ray casting on meshes / point clouds / voxels? #1721

Closed poodarchu closed 8 months ago

poodarchu commented 8 months ago

is there any function in pytorch3d that can implement operations similar to ray casting (omit some rays from an origin to some meshes / point clouds, then return the index where intersection)?

bottler commented 8 months ago

If your some rays are all the pixels in some camera object (either one of our simple ones or a specialised one you might make) then yes, that's exactly what our rasterizers do. The idea is that your object can be moved into screen space and then the rasterizer doesn't need to know anything about the viewpoint.

But in general, I don't think so. Our rasterizers can't work with an arbitrary ray bundle object.

bottler commented 8 months ago

(You mention voxels in the title as well. For that implictron has a lot of functionality for ray casting from an arbitrary ray bundle.)