facebookresearch / pytorch3d

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

Textures based off of F(x,y,z) instead of T(u,v) #1904

Closed MartensCedric closed 3 weeks ago

MartensCedric commented 3 weeks ago

🚀 Feature

Instead of texturing the mesh with a UV parametrization, I want to use a function F(x,y,z) = color. This means that translating or rotating the object would change its texture.

Motivation

It appears that the current implementation of Pytorch3d only supports textures parameterized by a UV space, but I would like to see support for 3d textures that do not rely on UV parameterization. This indirectly enables the addition of dynamic per-vertex features.

Pitch

With this feature in place, we can have a feature F(x,y,z) at each vertex which will be used in the rendering.

bottler commented 3 weeks ago

I think it would be quite easy for someone to make their own Textures subclass with a sample_textures() method to do what you suggest. I don't think it would get added to the library though.

MartensCedric commented 3 weeks ago

Thanks I didn't notice this existed!