Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SamuelPATE

Pages: [1]
1
Python and Java API / Re: Problem with buildTexture
« on: January 06, 2025, 10:54:15 PM »
Thank you very much Paulo !
It works but only if I keep the source_model attribute...

2
Python and Java API / Problem with buildTexture
« on: January 03, 2025, 02:25:21 PM »
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 :

Code: [Select]
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 :
Code: [Select]
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 = 1These 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

3
Python and Java API / Re: Pixel size in tiled model
« on: December 09, 2024, 12:33:18 PM »
Thank you very much Alexey

4
Python and Java API / Pixel size in tiled model
« on: December 09, 2024, 10:29:00 AM »
Hello

I build a tiled model with pixel_size=0, so a default_value is set. Is there a way to recover this default value to use it in another tiled model building. The purpose is to merge both tiled models in a consistent unique tiled model.

Thank you

Pages: [1]