Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fossilization Simulator with MLS-MPM Deformation

This repository provides a simulator for fossilization and deformation of 3D models and fragments, built on a PyTorch implementation of the Moving Least Squares Material Point Method (MLS-MPM). It enables physically-based deformation of single objects and fragmented products, supporting research in paleontology, computer graphics, and physics-based modeling.

Features

  • Deform single 3D models or fragmented products using MLS-MPM
  • GPU-accelerated simulation via PyTorch and CUDA
  • Support for mesh downsampling, grid resolution control, and animation output
  • Tools for fragment jiggling and random rotation
  • Example configs and datasets for quick start

Installation

  1. Install Conda environment using the provided environment.yml:

    conda env create -f environment.yml
    conda activate mpmpytorch_deform
  2. Install CUDA according to your device. The simulator is tested with CUDA 12.9.

    • Use PyTorch wheels built with CUDA 12.9 (please help yourself if your driver supports a different CUDA level):
      pip install torch torchvision open3d --extra-index-url=https://download.pytorch.org/whl/cu129
  3. Download example datasets:

Usage

  • Deform a single product:
    python main.py --json examples/deform_example_individual/deform.json
  • Deform fragmented products:
    python main.py --json examples/deform_example_fragments/deform_fragments.json --fragment_model
  • The output path is specified by save_folder in the JSON config.

Important JSON Config Parameters

  • model_path: Path to the model (folder for fragments, mesh OBJ for single product)
  • save_folder: Output directory for results
  • face_limitation: Number of faces to downsample mesh to
  • grid_res: Grid resolution for MPM points (e.g., 100)
  • animate_info.gif_save_dir: Path to save animation GIF
  • sample_rate: Frame sampling rate for GIF output
  • force_info.major_force.region_proj_direction: Specifies the direction of the major force vector. By default, force direction is randomized. To align with a specific direction (e.g., from fractureBEM), configure as follows: json "major_force" : { "radius" : 0.2, "force_magnitude" : 0.8, "disk_shift" : 0.1, "region_proj_direction" : [2, 3, 2] } Important: When aligning with fossilization_simulator_frBEM force direction, use the opposite direction vector. For example, if fractureBEM uses 0 0 1, set this parameter to [0, 0, -1].

Most other parameters relate to MPM simulation and typically do not need modification.

Note: The fragments in deform_example_fragments are generated by fossilization_simulator_frBEM. The required fragments are in the _view folder; please ignore other verbose documents.

Tools

  • tools/jiggling.py: Randomly rotate and jiggle fragments (useful for frBEM fragment results before deformation).

Citation

If you use this simulator, please cite this. MPM-pytorch package is developed by them:

@inproceedings{
  lin2025omniphysgs,
  title={OmniPhys{GS}: 3D Constitutive Gaussians for General Physics-Based Dynamics Generation},
  author={Yuchen Lin and Chenguo Lin and Jianjin Xu and Yadong MU},
  booktitle={The Thirteenth International Conference on Learning Representations},
  year={2025},
}

And related works on MLS-MPM.

License

MIT License. See libs/MPM-PyTorch/LICENSE for details.

Contact

For questions or issues, please contact: cx2219@nyu.edu

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages