-
Notifications
You must be signed in to change notification settings - Fork 7
Does this require padding added to the voxel data? #7
Copy link
Copy link
Open
Description
I belive this is the same issue as #6
I have a source voxel struture.

When I import it with ao-mesher and ao-shader I get

If I pad the voxel ndarray with:
function paddVoxelNDarray(ndvoxels){
var resolution = ndvoxels.shape;
var padding = resolution.map(function (r) { return r + 4; });
var voxelsWithPadding = zeros(padding, 'int32');
var x, y, z;
for (x = 0; x < resolution[0]; x++) {
for (y = 0; y < resolution[1]; y++) {
for (z = 0; z < resolution[2]; z++) {
var v = ndvoxels.get(x, y, z);
v = v ? (1 << 15 | v) : 0;
voxelsWithPadding.set(x + 1, y + 1, z + 1, v);
}
}
}
return voxelsWithPadding;
}It renders as expected:
Should I PR the padding to be include in this module?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
