Rope Physics Demo
GameVerlet rope and cloth sim, plus mesh distance field generator
Instructions
Press ESC to exit any scene.
Use WASD to move freecam, and hold RMB to look around.
All windows with a blue title bar are draggable.
Use WASD to move freecam, and hold RMB to look around.
All windows with a blue title bar are draggable.
Features
- High performance Verlet rope physics
- Runs entirely on the GPU
- Simulate hundreds of ropes at once
- Fresh AABBs for each rope are available on the CPU every frame
- Updates to specific rope points may be sent to GPU every frame
- Collision resolution
- Supports SphereCollider, CapsuleCollider, and BoxCollider with no extra effort
- Supports mesh collisions by baking a mesh distance field
- In scenes where this occurs, you may notice hitching
- Cloth Simulation
- Also runs on GPU, sharing much the same code as the rope
- Every collider type that rope supports is also supported by cloth
- Each point is constrained with its eight (four cardinal, four shear) neighbors
- Supports 32x32 (max thread group size) resolution
- Higher resolutions produce artifacts, for now
- Updates a vertex and index buffer every frame, keeping the cloth mesh up to date
- Also runs on GPU, sharing much the same code as the rope
Test Scenes
Pachinko
- Move your mouse to wrap the rope around pins.
Cloth
- Freely modify the position and simulation parameters of cloth.
- Watch cloth collide with various shapes.
Performance Benchmark
- No actual benchmark yet - just spawn a bunch of GPU simulated ropes.
- To see collisions, click the < and > arrows to change from "None" to "Sphere" or "Terry"
Mesh Distance Fields
- This is very buggy and slow right now - I need to do a few fixes and some cleanup.
- Generate mesh distance fields from a curated selection of models, and see how they collide with ropes.
- Click on a voxel to open a window that will allow you to view each slice and texel of its volume texture.
- Each octree leaf contains a volume texture that includes a gradient to the nearest triangle in the RGB channels, and a signed distance (after conversion) in the A channel.
Known Issues
- There is a crash to desktop bug that seems somewhat random.
- It's difficult to reproduce, and might not actually be happening anymore.
- Collision resolution performance vs. meshes is poor
- Too many unlikely colliders are being tested.
- Mesh distance field build issues:
- Performance tanks with high vertex counts
- Build jobs are blocking the main thread more than is necessary
- There are still large seams and cavities in many models
Post-Contest Plans
- Library
- Easy to use VerletRope and VerletCloth components
- Allow different segments of rope to connect with each other
- Run rope simulation in the editor window
- Bake initial rope positions
- Rope Physics
- Rope points may have mass
- Allow some points to be flagged as accessible on CPU
- Mesh Distance Fields
- Allow volume textures to represent an arbitrary size in worldspace.
- Currently each volume texture is just 16^3 world units.
- Optimize in-game bake process
- The current solution scales very poorly with triangle count.
- Cache large mesh distance fields to disk
- Allow baking in editor, shipping prebaked mesh distance fields
- Raymarched debug visualization
- Allow volume textures to represent an arbitrary size in worldspace.
366
Total Users
441
Total Sessions
1.4 days
Total Playtime
0 recorded entries
| Rank | Player | Score | Recorded |
|---|---|---|---|
|
refresh
Discovering package leaderboards...
|
|||
Package ID:
duccsoft.rope_sim
Created:
2025-01-14 03:15 UTC
Updated:
2025-03-03 23:35 UTC
Type:
game
Public:
No
Version:
90681
files:
241
Size:
219.9 MB
Engine Version:
17
Asset Version ID:
90681
Version Created:
2025-03-03 23:35 UTC
Hash:
201882810478140437
Manifest: Open manifest
sports_esports Input & Control Support
Keyboard & Mouse
cancel Unsupported
Controller / Gamepad
cancel Unsupported
Virtual Reality (VR)
cancel Unsupported
settings Engine & Multiplayer Configuration
Player Count:
1 - 64 Players
Tick Rate:
50 Hz
Network Type:
Multiplayer
Launch Mode:
Normal
Startup Scene:
scenes/main_menu.scene
Map Select:
Unrestricted
90681
Mar 3, 2025
Add workaround for issue # 7548
85719
Jan 25, 2025
Changes on 2025-01-25
85713
Jan 25, 2025
Changes on 2025-01-25
85710
Jan 25, 2025
Changes on 2025-01-25
85707
Jan 25, 2025
Changes on 2025-01-25
85641
Jan 24, 2025
Changes on 2025-01-24
85552
Jan 23, 2025
Changes on 2025-01-23
85208
Jan 20, 2025
Changes on 2025-01-20
85142
Jan 20, 2025
Changes on 2025-01-20
85129
Jan 20, 2025
Changes on 2025-01-20
Live API Passthrough & Removal Notice
This file manifest and asset metadata are retrieved live directly from the official Facepunch s&box public API. s&box Explorer does not host, store, or redistribute any package files. All download links route directly to Facepunch CDN servers.