i alredy tryed to do that tonight , the proplem is when i try to go through the voxel grid and set the voxels i get an assertion error while the app runs....
Code:
Vector3 *vpos;
int ccc = getPosArraySize(ent);
vpos = new Vector3[ccc];
int count = 0;
getPositionArray(ent,vpos,count);
for (int z = 0; z < volData.getWidth(); z++)
{
for (int y = 0; y < volData.getHeight(); y++)
{
for (int x = 0; x < volData.getDepth(); x++)
{
for (int i = 0; i < ent->getMesh()->getSubMesh(0)->vertexData->vertexCount ; i++)
{
Vector3DFloat vol_pos;
vol_pos.setX(vpos[i].x);
vol_pos.setY(vpos[i].y);
vol_pos.setZ(vpos[i].z);
MaterialDensityPair44 voxel = volData.getVoxelAt(vol_pos.getX(),vol_pos.getY(),vol_pos.getZ());
uint8_t uDensity = MaterialDensityPair44::getMaxDensity();
voxel.setDensity(uDensity);
volData.setVoxelAt(vol_pos.getX(),vol_pos.getY(),vol_pos.getZ(),voxel);
}
}
}
}
i don't realy know how to set the voxels in the right way and how to ensure that the dimensions are valid...
I think doing the conversion in real-time would be to slow therefore i would like to write my own converter ^^
but using this converter tools wouldn't siut my needs because i have to convert .blend or a .mesh
file and converting from blender to a 3ds format screws up the mesh ^^
maybe you can help pointing out whats wrong