arkavo-org / arkavo-org/VRMMetalKit
Add integration tests for gravity physics simulation
- Dominant language
- Swift
- Stars
- 6
- Forks
- 2
- Avg merge
- 18h 51m
- Merged PRs (30d)
- 26
Description
## Description
Add comprehensive integration tests to validate the per-joint gravity physics feature works correctly in real-world scenarios.
## Test Coverage Needed
### 1. Different Gravity Values
- Test physics simulation with various `gravityPower` values (0.0, 0.3, 1.0, 1.5, 2.0)
- Verify bones respond correctly to gravity changes
- Test edge cases (zero gravity, negative gravity)
### 2. Hair vs. Cloth Behavior
- **Light hair physics**: `gravityPower = 0.3-0.5` (floaty, bouncy)
- **Heavy clothing**: `gravityPower = 1.0-1.5` (natural fall, heavy drape)
- **Ribbons/capes**: Custom `gravityDir` for artistic effects
- Verify visual/physical differences between use cases
### 3. Custom Gravity Directions
- Test non-standard gravity directions (horizontal, diagonal)
- Verify normalization works correctly
- Test rotation and transformation handling
### 4. Performance Benchmarks
- Measure GPU compute time with different bone counts
- Benchmark gravity calculation overhead
- Compare performance vs. global gravity only
- Target: <10% overhead for 100+ bones
## Current Test Coverage
- ✅ Unit tests for struct layout (BoneParamsLayoutTests)
- ✅ SpringBone basic simulation tests
- ❌ Missing: Real-world gravity behavior tests
- ❌ Missing: Performance benchmarks
## Acceptance Criteria
- [ ] Tests with 3+ different `gravityPower` values
- [ ] Visual/behavioral verification (hair vs. cloth)
- [ ] Custom direction tests (at least 3 directions)
- [ ] Performance benchmark suite
- [ ] Test with real VRM models (if available)
## Related
PR #51 - Implement per-joint gravity for cloth and hair physics
Issue #52 - Enhance gravity formula
Contributor guide
Research direction
Start by reading the existing BoneParamsLayoutTests and SpringBone basic simulation tests to understand the current test setup. Add integration coverage for the listed gravityPower values, custom directions, hair and cloth behavior, performance overhead, and real VRM models when available. Done means all acceptance criteria are covered by repeatable tests and benchmarks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- computer-graphics, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100