Deformed Sphere

hi all,

im creating spheres to use them as suns, planets and moons in a space game. when those spheres reach the border of my display they become more and more elliptic. why would such a thing happen and even more important: how can avouid it?

i figured out how this works. so if i choose a smaller angle for the camera and move it further away from my objects i can basically see the same things with less deformation. but i cant achieve a perfect result.



the problem is that my hyperplane where the images are projected to is linear. since a projection of a circle is almost always an ellipses there it not much i can do about it. → unless i transform my projection hyperplane into a sphere …



is there any way how i can change do that?

You maybee set the wrong format ? (Fullscreen and 4:3 but monitor is 16:9) ? or similar.

not using full screen …

If you want parallel projection, look at the TestParallelProjection. Also the camera frustum settings have an influence on this effect for normal projection mode.

im not sure how parallel projection can offer what i am looking for:

the documentation (jme2!) says that using parallel projection, “[…] distance will not affect the size of a rendered object.”



this is pretty much what i am experiancing. but thats not what i want to achieve.

also: since i use a static camera perspective the 3d effect will get completely lost and if i change the camera angle some pretty strange projections are created as well…



using normal projection mode and a fov around 20 will kind of solve my problem, but that cant be the best method. everyone creating a game using jme should run into this right?



i have to point out again that if you transform the projection plane into a sphere (half sphere) then these deformations would not occur … is there no way to do that?

That’s perspective.

close objects looks bigger that far objects. And it’s the same a the objects scale, the close side of the object looks bigger than the far side, that’s why your sphere looks distorted.

It’s less noticeable when the object is at the center, because it’s aligned with the view direction axis.



Start blender, and experience it with the default cube scene, press 1 to choose the face view pan the scene so the cube is at one side of the scene then hit 5 to switch from perspective to ortho mode.



Ortho mode (or parallel projection) is useful for modeling or cao, but games usually use perspective mode, because that’s how real life works :stuck_out_tongue:



the deformation is more important if you get very close to the objects.

you are not really saying that in real life a sphere looks like an ellipsis?



actually what seems to happen is that a 2D picture of the 3d object is taken and projected onto a plane. in real life its projected to a sphere.



the effect you see up there has nothing to do with perspective!!

with a wrong perspective maybe!

Please check out

Perspective doesn’t affect a sphere. A sphere will always look circular.

thanks for the responses.



i tried out something:

im using parallel projection, but before projecting the objects i calculate the distance and needed rotation angle to scale the objects, reposition them and rotate them so the camera gets a 3d impression. basically everything looks like if a perspective camera is looking directly at the objects.



the downside obviously is that the light effects arent displayed properly any more.



are there any ways to fix this?



btw.: the thing i wrote about a sphere as a projection plane … that would really solve this problem.