Im trying to implement smooth voxel grid meshing using marching cubes algorithm but I dont quite understand how to do the interpolating (I understand that this would solve the problem) to achieve the smooth transitions on the borders between the empty space and filled space.
In the picture above I have rendered my voxel grid cells as cubes. Currently the voxel grid is just a 3d array which stores the values if the cell is empty (0.0) or filled(1.0) (not sure if this is ok, do I need to store each cell corners instead).
When processing marching cubes iteration I have to sample my data at floating point indices e.g. I need to look up if position (3.316, 0.16, 0.5) is empty space / on the surface of the data / inside the data.
Currently I just check the cell value where the position is e.g. (3, 0, 0) for the example above which results with cube mesh.