i'm doing a simulation in matlab which uses a 3D matrix as input, i.e. the matrix has the form (xDim, yDim, zDim). With a simple STL export and a voxelization of this STL file i can get only a matrix with all elements be either one or zero. But my part has four different materials which i need to distinguish in matlab. One single slice in the matrix should look like:
0 0 0 0 1 1 1 1 2 2 2 0 ...
0 0 0 1 1 1 1 2 2 2 0 0 ...
0 0 0 1 1 1 1 1 2 2 2 2 ...
.
.
.
As a first step: in which format should i export my part to preserve the materials as some value?