dvg729150
dvg729150

Reputation: 21

.ply polygonal mesh to 2D depth map

I am trying to convert a polygonal mesh in .ply format into a 2-D depth map, to be saved in a standard array or image format.

Ideally I'd like to use python, but would be open something else if it's simpler. I'm looking for something to use in a pipeline.

Upvotes: 2

Views: 3068

Answers (1)

David de la Iglesia
David de la Iglesia

Reputation: 2534

You can use Meshlab wich is open source and can do exactly what you want.

Follow this steps:

  • Download Meshlab from the link above.
  • Import your .ply mesh:

import mesh

  • Go to Render-> Shaders -> depthmap.gdp:

depthmap

  • Change zmin and zmax values to get the result you want:

depthmap parameters

  • Rotate and move the mesh to get the position/orientation you want. And then save a snapshot of the scene adjusting the parameters as you want:

saving snapshot

Final result:

final depthmap

Upvotes: 1

Related Questions