Space, the final frontier... Add another tutorial for virtual solar system

Can we add another chapter to the online JME Tutorial for Beginners?
It seems that half the people on this site are making a virtual solar system. I was doing it in Java 3D but stopped when I realized that I couldn’t attach/detach on the fly, so my Saturn V couldn’t separate stages. Also, I was also told that the math needed was at a Masters or above level which I and most people don’t have.

That said, there is a great space-flight simulator already. Here are some links. The first is a video tutorial that takes you from takeoff to docking with the International Space Station (ISS). After that are the home page and forums page, the tutorials and another beginners tutorial.
(Oh boy, I got some kind of warning when I tried to launch the video tutorial on another computer. It may have been a virus warning. You can search ‘orbiter dg4 to ISS’ or youtube and find the parts spread over smaller videos.)

https://vimeo.com/4718661
http://orbit.medphys.ucl.ac.uk/
http://www.orbiter-forum.com/
http://www.orbiter-forum.com/tutorials.php
http://www.orbiterwiki.org/wiki/Go_Play_In_Space

What is everyone doing in their virtual solar systems?
It was really great to find that the ‘forward’ direction vector is held in myQuaternion.getRotationColumn(2); Someday, I’ll experiment and find the up/down, left/right vectors but I don’t need them right now.
In my virtual solar system in java 3D, I was able to get the radius of the solar system in meters/yards in a double but, I think, JME uses floats. What are people doing for long distances?

I remember watching a great video about how KSP was made, but I can’t seem to find it right now. One great trick they pulled was having 4 cameras stacked on each other so they could avoid z-fighting and make planets seem larger.
IIRC it went something like this:

  • GUI
  • near view (rocket and close terrain)
  • far view (far terrain)
  • background(planets which are actually (relatively!) small, but move with reduced speed so it looks like they’re far away)

Now I know that Jme3 has full support for this kind of thing and I’m thinking of experimenting with the background view.

It’s really simple and depends on the number you pass to the method.
0 - X-Axis (left/right)
1 - Y-Axis (up/down)
2 - Z-Axis (foreward/backward)
Then you can .negate() or mult(-1f) the vector you get to invert it, thus getting the backward from foreward, etc.

Here’s what I got:


Mine might look like solar systems, but in reality no bodies orbit, no gravity (except black holes) and everything is rather small. But that’s all fine since it’s not meant to be realistic but arcade. Not the thing you’re looking for.

Well. Well- hm, I guess the most common workarounds are always rendering by putting the camera at/close to origin to reduce z-fighting and using a logarithmic z-buffer for the same thing.

Anyway you should talk to @Apollo, he’s done some really nice stuff in this area.

Thanks for the details on the movement directions. I figured it was like that. This recap will keep someone from searching around for that info.
That sounds like some fancy camera work. I had never thought of that. Like Lord of the Rings Online that I play, you jump to other spaces to go indoors for caves and buildings and such. I guess it would be like changing appStates and re-scaling everything. I might have one space for the whole system and another appState/world space for each planet. I don’t know what they do in Orbiter.

Here is what I did in Java 3D. Many cameras/views (from the View object). You can click on the feeds on the right and put them as the main view or one of the four mid-sized views. You can see the location, velocity, rotation, rotation velocity. It has 3D radar that rotates as the ship rotates. Front/back view and above/below views. Over all map on the lower left. In the middle, is the program that is runs. It will/would have keyframes that you can jump to with the VCR controls. You can turn on/off gravity. You have two move modes - hold down the keys to move or you can set float mode for and have the ship drift. I stopped because you can’t separate stages while it runs - and I can’t find a way to pause it and then separate stages.