Skybox distorsion

hello everybody.

The problem i have here is not related directly to the jme, but it could be a nice thing to have a “fix” for it.

Ok, i am using spacescape from Alex Peterson, and when i generate a simple sky with stars, i get images like this :

It’s nice, i have even a “Ursa Minor”-like in the center of the image ^^.

The problem is … well, if you look at this picture, you can see that you have more stars in the middle of it. This is the “down” picture, but you have the same thing on all sides and for all “random” sky i can generate.
Actually, you don’t have only “more stars”, they are also bigger.

and, here is the problem : in jme, i can see when i am looking at a corner of the box or not, because stars that are not in a corner are bigger, more numerous, and “blink” less when i move my camera.
I think that the distorsion (the magnifing effect) i have with spacescape is not “strange”, as a lot of pictures for skybox out there have this kind of distorsion too. But i think that it’s something “standard” and it could be a good idea to add a boolean in the skyfactory to indicate if the picture is distorded.

Ok, i hope my explanations was clear enough.

Thanks for reading.

What would you want JME to do differently based on the boolean?

Ok, what i mean is : right now, jme made an assertion about the skybox which is more or less “the picture has no ‘zoom’”. When this assertion happen to be right (i didn’t test, i only guess) the skybox is just fine. When it’s not the case, the ‘zoom’ is likely applied twice, so we can see what i describe.

I know that when you want to make a box pretend that it’s a sphere, you have to distored the texture to create the illusion. However, if you do that on a texture with already the distortion, you just break the illusion.

While writing this text, i made some test with a “dumb” skybox (took a box, disabled the backface culling, applied the “down” image on all face - after all, it’s a pretty regular sky), and it appears that even with a “dumb” skybox i have the problem.
So, i think that these images are not supposed to be used in a box. Strange.


ok, i worked a bit on it, and i tried to create myself a “space sky” creator. It’s not THAT hard, at least i didn’t see anything that i can’t go through, even if it would take some time to find the right method with the right class etc.
But, i also thought about this question : “how would i transform a scene into 6 image ?”. The answer is obvious : take 6 screen shot with the correct fov. However, this “fov” part is maybe the problem : i think that with a fov of 90°, we do have this distorsion effect on pictures. If it’s the case, we will have do the first step to the solution i.e. find the root of the problem, with a “mathematical” form.

That said, i think that a plugin to take such “cubemap” screenshot would be awesome, especially as it would allow people to pre-create environnement with a lot of details. We have a nice planet plugin, it would be even more awesome with a lot of planet and shader effects. With a “baking” on a cubemap, it will remove the performance problem (with the drawback that this environnement will no longer be animated … sad, i know ^^).