Free Support Forum - aspose.com

2.5D Topography with Color - Export to File

I have topographic data that is gridded with an image overlay. I need to export this to a file (GLB, PLY, etc). that retains height and color/texture.
image.jpg (72.6 KB)

The data structure is:
int nPtsAlongX = 1024; // width in pixels
int nPtsAlongY = 768; // height in pixels
double dSpacingAlongXMM = 1.5;
double dSpacingAlongYMM = 2.5;
double dXOriginMM = 10.0;
double dYOriginMM = 5.0;

// INVALID POINTS are float.MinValue
float fSurfaceHeightsMM = new float[nPtsAlongY, nPtsAlongX];
Bitmap bmpOverlay = new Bitmap(nPtsAlongX, nPtsAlongY);

Individual points and colors can be extracted via:

for (int nY=0; nY<nPtsAlongY; nY++)
{
for (int nX=0; nX<nPtsAlongX; nX++)
{
if (fSurfaceHeightsMM[nY, nX] != float.MinValue)
{
double dXCurrentMM = dXOriginMM + dSpacingAlongXMMnX;
double dYCurrentMM = dYOriginMM + dSpacingAlongYMM
nY;
double dZCurrentMM = fSurfaceHeightsMM[nY, nX];
Color colorCurrent = bmpOverlay.GetPixel(nX, nPtsAlongY-1-nY);
// do something with X, Y, Z and color… like put them in a list for saving to a file! :blush:
} // end if valid
} // end for nX
} // end for nY

What is the most efficient way to convert these points to a scene and export to a 3D file?

Thanks!

@mcmalburg

We have logged an investigation ticket as THREEDNET-838 in our issue tracking system for your requirements. We will look into its details and keep you posted with the status of ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.