Reputation: 15
This image is using perspective camera but sphere shape is distorted when it is moving away from the center.
this image is using Orthographic camera but spheres and cuboid are not in 3D...
can any one suggest possible solution for this to get 3D effect without sphere distorting its shape...
Upvotes: 0
Views: 1903
Reputation: 7437
This is exactly correct. Spheres distortion and cuboid perspective effect are both caused by the same perspective projection properties.
One possible solution would be to split your scene in two parts:
Another solution would be to draw everything with orthographic and modify your cuboid to be a trapezoid, so that it only looks like to be in perspective.
Having perspective and no distortions sounds mutually exclusive if you think about it. Imagine a sphere consists of 2 parts - front and rear. Now you say you need objects farther from camera to be smaller, but at the same time you say you want front and rear of sphere to be the same size - not possible. You can achieve desired effect with orthographic projection if you manually specify spheres size to be smaller when they are farther. Or alternatively you can use perspective projection and scale your spheres to be flat by depth axis (but keep the normals to preserve proper lighting)
Upvotes: 1