1
Python and Java API / Export normal map from Python
« on: May 21, 2020, 04:33:32 PM »
Is there a way to export the Normal map from the python API ? (I am refering to the Model NormalMap, not the per-camera normal map)
I am using this code, but I do not get any normal maps output as a file:
# Import new mesh
chunk.importModel(mesh_file)
# Bake DiffuseMap Texture
chunk.buildTexture(texture_size=4096, texture_type=Metashape.Model.DiffuseMap)
# Export Model and Texture
chunk.exportModel(os.path.join(output_folder, chunk.label + '.obj'))
# Bake NormalMap Texture
chunk.buildTexture(texture_size=4096, texture_type=Metashape.Model.NormalMap)
# Export Model and Texture (still exports the diffuse JPG....)
chunk.exportModel(os.path.join(output_folder, chunk.label + '_NORMAL.obj'))
I am using this code, but I do not get any normal maps output as a file:
# Import new mesh
chunk.importModel(mesh_file)
# Bake DiffuseMap Texture
chunk.buildTexture(texture_size=4096, texture_type=Metashape.Model.DiffuseMap)
# Export Model and Texture
chunk.exportModel(os.path.join(output_folder, chunk.label + '.obj'))
# Bake NormalMap Texture
chunk.buildTexture(texture_size=4096, texture_type=Metashape.Model.NormalMap)
# Export Model and Texture (still exports the diffuse JPG....)
chunk.exportModel(os.path.join(output_folder, chunk.label + '_NORMAL.obj'))