> what is the algorithm for deciding the facing of a voxel under a slope?
> the things we know are:
> 1) the facing of voxels that are on the outside.
> 2) the diagonals that the 'outside' is accessible on.
> This is going to be a complicated switch statement, I can feel it.
I wonder if you couldn't take a different approach :
If you take a voxel and surround it with neighbouring voxels, you get a 3x3x3 grid, with the targeted voxel being in the middle.
Assuming you give that voxel a temporary coordinate system,
you can that look up if there is a voxel above, at 45° or next to it.
when in the Y plane it'd look like this :
[-1,0,1] [0,0,1] [1,0,1]
[-1,0,0] [0,0,0] [1,0,0]
[-1,0,-1] [0,0,-1] [1,0,-1]
if you store every voxel in an array, it would be fairly easy for a gifted programmer like you, to look up if there exist a voxel above/next/under/etc of this voxel.
In un-optimized form, this would mean you'll have to perform 26 checks per normal identification.
A 45° slope could be identified by looking for a voxel that has either [nx-1,ny,nz-1] or [nx+1,ny,nz+1.
Having a [nx,ny,nz-1] voxel below it would be an absolute requirement to identify this voxel as part of a 45° angled upwards slope.
pffff.. so far for a non-technical topic.. :)