Sample 2d texture into 3d Volume

Loking for a way to sample a 2d texture of arbitrary transformation into a 3d volume as kinda shown here.

I’ve been using this faked volume technique of stacked additive image planes, but as shown right, this has issues with camera orientation. Also, since the images I’ll be sampling will be more irregularly spaced than shown, the additive nature would result in hotspots.

What I’d like is to set 3d points in a volume from the sampled positions of each plane. This could be a texture3D - or more fun but maybe more complicated densities in a 3d fluid.

sampleTexture2DBox (gridspace) seems somehow the answer, but otherwise pretty stuck… having tried several permutations from various help patches.

If I understood correctly, the Fuse Presence Texture might be what you are looking for.
Or you can just use GridSpace (3D):

  1. Create a GridSpace that defines a volume transformation.
  2. Apply transformations to your 2d texture splice
  3. Calculate the position in world/volume space for each pixel of a slice (maybe you could define a GridSpace for your texture 2d as well)
  4. Calculate position inside volume using PositionToCell node
  5. Write pixel value to a calculated cell coordinate.

GridSpace (3D) is super handy when you need to transform between texture and world space.