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: [email protected] <[email protected]> On Behalf 
Of Whop42 Whop42
Sent: Sunday, 22 January 2023 23:51
To: ProjectChrono <[email protected]>
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
[https://groups.google.com/group/projectchrono/attach/29840fd10d74b/tmpw15joiam.PNG?part=0.1&view=1]
Print in 
Irrlicht:[https://groups.google.com/group/projectchrono/attach/29840fd10d74b/2023-01-19_16-10.png?part=0.2&view=1]
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/3d5ccf3d-6f49-4291-8a19-0bb0dda3815dn%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/3d5ccf3d-6f49-4291-8a19-0bb0dda3815dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/PH0PR06MB8237F56E0692443C2214C886A7C89%40PH0PR06MB8237.namprd06.prod.outlook.com.

Reply via email to