Forum

Author Topic: Split Mesh and Export no texture  (Read 1378 times)

rbush

  • Newbie
  • *
  • Posts: 3
    • View Profile
Split Mesh and Export no texture
« on: June 05, 2023, 10:56:55 AM »
I’ve tried and searched extensively for a solution I think should be simple, but I am not getting it right, thus the request. Sorry if it seems mundane, but have tried everything within my non-coding realm.

Scene: Imported Point Cloud (LAS), Coord system UTM 40 N (EPSG::32640), and meshed.
Situation: Need to split into smaller blocks of max 2GB

Actions: Used Alexey Pasumansky’s post : “Re: How to split mesh?” but his export  solution has very long extensions unless modified, and resets/transforms to origin 0,0,0 for primary mesh, while the 2 sub meshes created also reset to origin 0,0,0 but relative to the primary mesh.

Attempts: I have tried to use various codes I’ve found, but all solutions appear to transform to 0,0,0. Some attempts on the projection include: “projection=crs”, “projection=PhotoScan.CoordinateSystem("EPSG::32640")”, ““projection=Metashape.CoordinateSystem("EPSG::32640")”, ““projection=PhotoScan.CoordinateSystem("EPSG::32640")”,” CRS = WGS 84 / UTM zone 40N.

Please could someone look at the code an suggest where I am going wrong? I’ve attached an example.

rbush

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Split Mesh and Export no texture
« Reply #1 on: June 07, 2023, 09:28:39 AM »
Any suggestions from anyone? The split works, the parts export doesn't correctly? Manually exporting each mesh with 40N selected works (same as project coordinate system), but bulk python automated exports don't.

A would greatly appreciate a solution, or a suggestion of someone else's script I can look at to get it working.

Thanks.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14753
    • View Profile
Re: Split Mesh and Export no texture
« Reply #2 on: June 07, 2023, 12:43:00 PM »
Hello rbush,

I haven't yet checked your code, but please specify if you have the only problem with the mesh export?

Probably, the easier way would be to create a grid of rectangular shapes and use each cell of such grid as a boundary for the mesh export. There was orthomosaic export script that worked in the described way.
Best regards,
Alexey Pasumansky,
Agisoft LLC

rbush

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Split Mesh and Export no texture
« Reply #3 on: June 07, 2023, 12:51:21 PM »
Afternoon Alexey,

The split mesh function works perfectly (your existing code), and stores the primary mesh and split pieces in the same chunk. The export code though exports them all (primary and splits), with the primary transformed to 0,0,0, and its splits transformed relative to the primary at 0,0,0. If I manually export each split mesh, select .obj and EPSG 32640 then each exported mesh its geopositioned correctly. Just cant seem to get the last bit of code (exports) to do this. 

If the grid shape file methods works, I'd be very happy to use that too. Please could you link me to that?

Much appreciated.