Is there some solution to this visualization issue?

Do visualizing 3D objects near or far w.r.t perspective camera can affect a sphere’s shape ?

I have created few spheres of radius 1 and 0.5 at the beginning and as per requirement I am controlling the size of spheres from user input. What I have observed is the sizes that are seen are not proportionate! Let me explain this with few examples.

From the image and the explanation given below is very clear by what I meant that spheres are not proportionate. You can also play around with this on this URL: Three.js Geometry Browser

Is it a visual illusion? If yes, any solution on this? If not, then am I missing something? I just want everything to look proportionate.

@mrdoob @Mugen87

For proportional sized spheres of different sizes arranged one behind the other like yours with the 3 small ones in the foreground and the large one in the background, you need an orthographic camera.
What you see is perspective depth perception as it also corresponds to reality. The perception of distance is non-linear and that is exactly what the perspective camera takes into account.
In your case you need an orthographic camera.

I hope this helps to better understand the cause

8 Likes

Cant we do something with perspective camera to get the propertionate things ? There should be something that can help with.

In addition to computed radius, note that the closer a sphere is to you, the less of the sphere you are seeing. So, even though you might have a 5 unit sphere, you are not seeing all 5 units across. Since the 10 unit sphere is more distant, you are seeing more of the radius.

That could help explain why, in the middle example, the larger sphere appears larger than it should be - because you are seeing more of it.

In the example to the right, the distance factor mentioned by Attila is coming more into play since I assume that you either moved the small spheres forward or the large sphere backwards (so that they aren’t swallowed up by the large sphere). That is why the apparent combined radius of the small spheres is larger than the combined radius of the large sphere.

ALSO
The effects above are more pronounced if you are using small objects only a short distance away. I believe the standard method for computing XY size is to divide by Z (distance). The result is not linear but vastly increases XY size as Z approaches zero. Thus you can reduce the relative impact of small differences in distance between the large and small objects by making the objects and distances much larger - say by a factor of 100.

ADD
Now that I look at the images again, I see that I may have misunderstood your question. I assumed that the smaller spheres were physically in front of the larger spheres. However, I now wonder if you just created all of the spheres using the program in the link you provided. If so, did you simply take a screenshot of the smaller spheres, which you then and cut and pasted over a screenshot of the larger spheres? And then you shrunk the images down for purposes of presentation?

There is nothing wrong with that. It just changes my understanding of the question since I assumed that the smaller spheres were physically in front of the larger spheres.

2 Likes

For those interested in experimenting, here is a somewhat imperfect celestial visual aid for dual camera.

It is a standalone HTML file so you should be able to run it directly from most devices.
Don’t hesitate to improve it if you can.

Celestial Bodies - Dual Camera.zip (2.6 KB)