Skip to content

Simulation silently no-ops on macOS — platform.system() returns "Darwin", not "OSX" #60

Description

@Tessenderman

File: pygarment/meshgen/simulation.py, function _run_frame_with_timeout

Bug

elif platform.system() in ["Linux", "OSX"]:

platform.system() returns "Darwin" on macOS, never "OSX". Since the
if platform.system() == "Windows" branch above it also doesn't match,
neither branch executes on macOSgarment.run_frame() is never
called, for any frame, for the entire simulation.

Impact

This fails silently. sim_frame_sequence's loop still runs its full
max_sim_steps, prints progress normally, and exits with no error — but
the cloth mesh is never actually updated. The "simulated" output is
pixel-for-pixel (vertex-for-vertex) identical to the pre-simulation box
mesh.

Confirmed by diffing *_sim.obj against *_boxmesh.obj for the same
element: mean per-vertex displacement ~2.4e-6 (floating-point noise, not
physics), max ~7.6e-6. Reproduces identically on your own shipped example
patterns (e.g. assets/Patterns/hoody_mean_specification.json,
shirt_mean_specification.json) using the default sim config — not
specific to any custom pattern.

Fix

elif platform.system() in ["Linux", "OSX", "Darwin"]:

One-line change, confirmed working after patching: re-running the same
example patterns afterward gives real physics results (Static with 0 non-static vertices, proper collision counts, correctly-draped meshes)
instead of the silent no-op.

Environment

  • macOS (Apple Silicon), Python 3.11
  • Reproduced against both GarmentCode and the NvidiaWarp-GarmentCode fork
    built from source (CPU-only, no CUDA — which builds and runs fine on
    macOS, that part isn't the issue)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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