Skip to content

Increased mesh size/triangle count on macOS with Python 3.13+ or numpy 2.X #71

Description

@shred86

Pulling this into its own issue since the root cause is still unknown. For now, I'll revert the next version to Python 3.12 to ensure consistency in the mesh output across macOS, Windows and Linux builds.

After a lot of variations of Python versions and dependencies, I think I'm convinced there's two cases that cause the increased triangle count.

I installed Python 3.12 with all of the original requirements in 1.40.07 and before. You can see the exact versions in the 1.40.8 pull request:

  • With numpy==1.26.4, triangle count is 2,340,408
  • With numpy==2.3.4, triangle count is 2,942,980

I then installed Python 3.13 with the numpy in version 1.40.07 and before (version 1.26.4) and as much of the original dependencies as I could (some were too old for Python 3.13 so I had to use a newer version):

  • With numpy==1.26.4, triangle count is 2,942,980
  • With numpy==2.3.4, triangle count is 2,942,980

So what I'm seeing is the increased triangle count is caused by either having Python 3.12 (or older I'm assuming) with numpy 2.x or Python 3.13 (or newer), regardless of the numpy version.

Edit: I even tried some more variations:

  • Python 3.12 with latest requirements except numpy==1.26.4, triangle count is 2,340,408

Doing some research, the only thing I can gather is there were changes in numpy or some of these newer dependencies required by Python 3.13, such as "preserving higher precision in elevation data or coordinates compared to NumPy 1.x’s potential downcasting" that ultimately result in a higher resolution mesh with the same settings. So it's not necessarily an "issue", just that Ortho4XP is likely producing a higher quality mesh given the same Ortho4XP settings as before. The weird part is, it seems specific to macOS (I'm on an M4 so maybe specific to M-Series). The actual issue though is if the .mesh file size is too large, Ortho4XP will get stuck on step 3 which is a known issue... but for the tiles that don't get stuck, you're likely just ending up with a higher quality mesh.

Still would like to know why it's specifically happening on macOS. I suspect the only good option will be to revert the next build for macOS to Python 3.12.

Originally posted by @shred86 in #69

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions