Hello
I try to build a tiled model from a colored point cloud. I use this process :
- import point cloud
- build mesh
- build texture from mesh
- build tiled model from mesh with transfer model texture
The process works when I use the app but crashes when I use the python module (even in the app).
Here is my script :
chunk.importPointCloud(
path="point_cloud.ply",
format=Metashape.PointCloudFormatPLY,
crs=Metashape.CoordinateSystem("EPSG:4978"),
shift=Metashape.Vector(shift)
)
chunk.importShapes(
path="outline.geojson",
replace=False,
boundary_type=Metashape.Shape.OuterBoundary,
format=Metashape.ShapesFormatGeoJSON,
)
chunk.buildModel(
source_data=Metashape.PointCloudData,
vertex_colors=True,
vertex_confidence=False,
clip_to_boundary=True,
build_texture=True
)
chunk.buildTexture(
source_model=0,
transfer_texture=False
)
...
It crashes on the buildTexture instruction.
I noticed than the parameters are different when I launch the buildTexture from the app :
BuildTexture: mapping_mode = GenericMapping, page_count = 1, texture_size = 8192, pixel_size = 0.20326334238052399, texture_size = 8192, fill_holes = off, texture_type = Diffuse map, source_model = 0, transfer_texture = off, anti_aliasing = 1
These parameters are a blend of buildUV and buildTexture api instructions.
How can I manage to build the texture to build the tiled model only with python module ?
Thank you