GORBS 3D
A gravity sandbox where you can change the underlying parameters of the universe and learn how weak gravity really is as everything falls apart.
NOTE: I'm still adding features to this every few days. Latest addition: collisions! Mass controls and runtime color changing!
Parameters
There is a (very tiny) black hole at the center, that starts with a mass of our sun. RIGHT CLICK moves the black hole around. (When it's there - it's not used in the binary setup)
It doesn't have a fancy black hole shader because with that mass its entire event horizon is only a fraction of a pixel on screen. Just like real astronomy, you'll only be able to see it by the effect it has on things around it. (UPDATE: I added a faint outline since you can make it bigger now)
The attractors start with a mass of 1,000 Earths, you can change that and the size at the start.
The orbit radius setting changes how far the attractors are arranged around the black hole (randomized slightly). The gorbs are set up orbiting the attractors at roughly 1/2 their Hill radius, so they can stay in orbit for a bit before other attractors and lack of precision mess them up.
The gorbs are currently just massless particles that are huge so you can see them. You can change their size with the gorb radius slider, which only affects how they look and collisions if you're using them. I'm going to add a lot more and give them mass and all that, but that's a fun project I'm saving to reward myself for finishing the other more boring features.
Background
I had an old programming test sitting around that I wanted to post. I realized there aren't many n-body simulations here in 3D so I decided to add a dimension, some UI and one (1) interaction.
It's a fun project to use for little programming and interface experiments so I'll keep adding to it here and there. DustSim reminded me how much fun little physics sandboxes are, but the best ways to interact with a 3D version are much less obvious so I plan to keep adding different things as I try them.
Leave a comment if you have any suggestions!
Currently it runs all on single thread CPU with 2048 4096 particles gorbs, just because the original test wasn't about quantity. Eventually I want to experiment with some p3m-like algorithms, compute shaders and other fun tricks, but only after I've made it a bit more fun to play with. The gravity calculation is actually only around 8% of the frame time (and only 3-4% with collisions off!), most of the time is taken up by rendering meshes (~60%), so at some point when I have time I'll write a shader to draw them and crank up the number of gorbs before experimenting with more algorithms, adding mass to the gorbs, etc.
Updated | 7 days ago |
Status | Prototype |
Platforms | HTML5 |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | loosegrid |
Genre | Simulation |
Made with | Unity |
Tags | 3D, Abstract, Colorful, Experimental, Gravity, Mouse only, particles, Physics, Relaxing, Singleplayer |
Development log
- Collisions + more gorbs26 days ago
Leave a comment
Log in with itch.io to leave a comment.