Using distance transformation for voxel carving