I didn’t respond because I’m not sure what to tell you. As you indicated, this doesn’t seem to be a Chrono problem but rather an issue with your code. All I can suggest is export the terrain mesh from Chrono to an OBJ and use an external viewer to make sure it is what you also see in the Irrlicht rendering. If that is the case, you must have some bug in how you postprocess the mesh to generate your heightmap image.
You may want to use a third-party tool to generate the heightmap from an OBJ. A web search shows this: https://github.com/ryobg/obj2hmap
--Radu
From: projec...@googlegroups.com <projec...@googlegroups.com>
On Behalf Of Whop42 Whop42
Sent: Sunday, 22 January 2023 23:51
To: ProjectChrono <projec...@googlegroups.com>
Subject: [chrono] Heightmap of SCMDeformableTerrain Issues
I previously posted it in another conversation, however it got no attention due to the original question being resolved.)
I have run into a problem with this approach (although i suspect it's just my code.) I used the SCMDeformableTerrain's mesh's ChTriangleMeshConnected to gather a list of all the vertices in the mesh. I then added the heights to a 2D list (and normalized them), then dumped them into a grayscale image. However, the image turns out unintelligible (example attached.) It's supposed to be a shoeprint, imprinted from a (3D-scanned) .obj of a shoe.
Here's the code: https://gist.github.com/Whop42/43d496e42d8c8f227b53ada1d3da7502
Print in Irrlicht:
How do I rectify this problem and make the print show up, like it is in Irrlicht?
--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
projectchron...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/3d5ccf3d-6f49-4291-8a19-0bb0dda3815dn%40googlegroups.com.