We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Height map from grayscale image to stl

Hello everyone,

I’m new to Aspose so please forgive me if I’m at the wrong place.

I want to create a .stl model from a 2D grayscale image. I managed to get all the pixels and their grayscale value as z coordinate.

My question is how do I properly create the triangle mash and build a stl file.

Thanks in advance.

Srdjan Vucic.

Hi Srdjan,

Thank you for contacting support. We can create a Mesh from scratch, assign this Mesh to the node of a new 3D scene, and then finally save a 3D scene in the STL format. Please refer to this help topic: Create a 3D Cube Mesh and Scene

We recommend our clients use the latest version and apply a valid Aspose license. You can get a 30 day temporary license for the testing purposes from the purchase portal. Its option is available in step 4. Please also refer to these helping links: Apply License to Aspose.3D for .NET API and Download Aspose.3D for .NET API

Hi Srdjan,

In addition to the above reply, we have created a small project to generate a height map from the grayscale image. Please refer to this download link: HeightmapZip. Furthermore, we have logged a feature request to achieve this with a short API. We will include this feature in the next Aspose.3D for .NET API version 17.7.