arkavo-org / arkavo-org/VRMMetalKit
Future: Advanced gravity features (per-joint magnitude, time-varying, zones)
- Dominant language
- Swift
- Stars
- 6
- Forks
- 2
- Avg merge
- 18h 51m
- Merged PRs (30d)
- 26
Description
## Description
Potential future enhancements to the SpringBone gravity physics system. These are post-MVP features for advanced use cases.
## 1. Per-Joint Gravity Magnitude
Allow each joint to have independent gravity magnitude, not just scaled from global gravity.
**Current:**
```metal
float3 effectiveGravity = globalParams.gravity * boneParams[id].gravityPower * boneParams[id].gravityDir;
```
**Proposed:**
```swift
struct BoneParams {
// ...
float gravityPower; // Magnitude multiplier
float3 gravityDir; // Direction (normalized)
float gravityMagnitude; // Optional: override global magnitude
}
```
**Use Case:** Hair on the moon (low gravity) while character is on Earth
## 2. Time-Varying Gravity
Support animated/keyframed gravity for special effects.
**API Concept:**
```swift
// Gravity changes over time
renderer.setGravity(
SIMD3(0, -9.8, 0),
animationCurve: .sine,
duration: 2.0
)
```
**Use Cases:**
- Antigravity effects
- Underwater simulation
- Zero-G sequences
- Magic spells
## 3. Gravity Zones
Define spatial regions with different gravity properties.
**Concept:**
```swift
struct GravityZone {
var bounds: BoundingBox
var gravity: SIMD3
var falloff: Float // Blend distance
}
```
**Use Cases:**
- Wind zones (horizontal gravity)
- Water bodies (buoyancy)
- Magical areas (custom physics)
- Multi-floor buildings (gravity direction changes)
## Implementation Complexity
- **Per-Joint Magnitude**: Low (shader + struct change)
- **Time-Varying**: Medium (animation system integration)
- **Gravity Zones**: High (spatial partitioning, zone detection)
## Priority
Low - These are advanced features beyond VRM 1.0 specification
## Related
PR #51 - Implement per-joint gravity for cloth and hair physics
Issue #52 - Enhance gravity formula
Contributor guide
Research direction
Start by reviewing PR #51 and issue #52, which are the related work identified in the issue. The proposal covers three separate features with different implementation complexity, so a contributor would first need a maintainer decision on which feature to scope; done would mean implementing and validating that selected feature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100