Is there a way to convert from any sort of 3D coordinates into any given object's UV coordinates?
I currently have a setup like this:
The node group gives me a 3D grid so it needs some sort of 3D coordinates as input to work correctly. (Here Object coordinates but really any 3D coordinates would work)
The image texture, however, is mapped onto the sphere using inherently Object-Bound, 2D UV coordinates.
What I want to accomplish here is to "pixelate" the texture as it appears on the sphere, based on the 3D grid. Conceptually, the easiest way to accomplish this would be to convert the grid from Object-coordinates into UV-coordinates and plug that into the texture.
I think for the special case of the sphere I could work some manual Mercator projection magic to replicate UV coordinates but that would be a bit tedious and, importantly, not universal. There's no way it'd work for a mesh with complex shapes.
Any ideas how I might accomplish this sort of thing?