Galaxy Browser

I made this to experiment with ways to navigate through space.  It ended up being something like a really bad java implementation of a small part of Celestia (http://www.shatters.net/celestia/).  For one thing, Celestia uses Octrees not OBB trees to find stuff, but they have a whole universe, not a single galaxy like this thing.  This could probably be converted to use an Octree if I get around to it.



For the galaxy data, I used a database generated by a text-based space trading game.  I have since converted the MySQL table into generated java code.  There are 5000 stars, where the color indicates the port type.



Double-clicking on or near a star will move the camera half the distance to that star using a Catmull-Rom Curve.

The mouse wheel zooms in.

AWSD and mouse motion do what you might expect.



These images don’t really show off what this “galaxy browser” does, but I don’t have a place to host this and there is too much to post inline.  If you are interested in seeing the code I’d be happy to share it via email.



Never done this with my flickr account before, but hopefully these image links will work.





[edit]zoomed out so the entire galaxy is visible[/edit]





[edit]This is the debug mode which shows the OBBs the ray passed through to pick a star.  Once the valid OBBs are found, it searches them looking using a cone (angle) to see what stars are near the picking ray.[/edit]

Sounds interesting.  To you plan to add nebula and other stellar objects?

My intention was to use it as a navigational chart.  Sort of the nav computer on your starship.  I hadn't thought of adding other object types.



I'm thinking the way I've built it isn't very well-suited to adding other object types.  It's a point batch I adapted from triangle batch.  I wanted to be able to handle a galaxy with 50000 stars eventually, so just focusing on drawing the points was a start.



What sort of approach could I use to hold 50000 of any sort of object?  Just a plain Octree?

probably octree + LOD where you'd maybe use a quad+texture for far away star clusters, and then progress from there in bits until you have actual objects.

Sounds like somewhere to start!  At the rate I'm going on this, in about a year, there'll be something to show.