st-tech / st-tech/ppf-contact-solver

[Feature] Sand (granular) simulation: loose grains that roll and pile

Open
#82 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deployed enhancement worked
Dominant language
Python
Stars
4.5k
Forks
334
PR merge metrics
No merged PRs in 30d

Description

Motivation

The solver currently handles shells, solids, and rods, but not granular media. Sand, gravel, and similar piling/pouring effects are common in animation and product visualization, and there is no way to produce them today. Adding a granular body type would let users simulate grains falling, rolling, and piling under gravity with frictional contact, while still interacting with the existing shell/solid/rod objects in the same scene.

Proposal

Add a sand body type: a collection of loose spherical grains (a faceless point cloud) that the solver advances under gravity with grain-grain, grain-wall, and grain-object frictional contact. Grains should roll, not just slide, so piles form at realistic angles of repose.

Suggested user-facing surface:

  • A SAND group / object type.
  • A way to turn a closed mesh into a particle cloud (volume seeding), or to feed a point cloud directly.
  • Tunable parameters: grain radius, particle mass, and friction.
  • Grains collide with existing shells, solids, and rods in the same scene.
Alternatives Considered
  • Approximating grains with many small solid/shell bodies. Impractical at grain counts and does not capture rolling/piling cleanly.
  • Doing granular effects in a separate package and compositing. Loses the two-way contact with the cloth/solid objects already in the scene.
Additional Context

Requested as a granular capability to complement the existing shell/solid/rod support, with two-way coupling to those object types.

Contribution Agreement
  • I confirm that any code, patches, scripts, attachments, or other copyrightable material I include in this issue may be used, reproduced, modified, and distributed by this project under the Apache License 2.0 or as otherwise described in CONTRIBUTING.md.
  • This is a feature request from the community (please provide a reference below).
Community Reference

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files, tests, or entry points are identified. Begin by locating the existing shell, solid, and rod object types and solver contact handling; done would require a sand object type with volume or point-cloud input, tunable grain parameters, rolling and piling behavior, and interaction with those existing objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.