Creating a Sun and lighting the system

Hello All,

I am new to JME but not Java, and just to play around with the engine a bit I wanted to make a little solar system. The system obviously will have a sun and planets and satellites. The question I have is how would one make a sun that looks realistic but also provides light to all planets.

I was thinking a normal sphere that has a glow effect while emitting light.

Any suggestions?

You will no doubt have to customize a fragment shader for a close-up realistic sun effect. Glow and some refraction in it would look nice. Sins of a Solar Empire has wonderful looking suns as a reference. If you are looking at it from far away, then you can probably use the existing Lighting.j3md material and crank up the glow. You can also just put a point light where the sun is located to emit the actual light on other planets.

Do you have any link or suggested methods to create a fragment shader, and is there a way to switch between the two choice, so it’ll be more realistic the closer you get?

I don’t have a link to a sun shader. But for switching between a close-up one and a far away one, you will want to do this in the same shader and keep track of the camera distance. Apply more glow the farther away you get, etc.

The design of a large scale space sim might be a good place to start. It seems several jME developers are working with similar ambitions as yours. @madjack and @EmpirePhoenix are some names that come to mind; I’m sure they’ve encountered some similar problems already.