Drawing an off-center object with Matrix.CreateLookAt with Pi / 4 without the skewed appearance

Started by
12 comments, last by L. Spiro 5 years, 10 months ago

If you render it into a render target you aren't really solving the problem.  You are spending a lot of time simply reducing the problem.  The distortion gets worse as you move to the side of the screen.  That means the only place on the entire screen that would not have this error would be the single center pixel, if it existed.  Since it doesn't, literally every single one of your pixels has this problem to some degree.

This means your center circle too.

And rendering them to a separate target can't correctly handle large objects that take up the whole screen.  It won't play well with your current Z buffer.  I heard in '89 it got arrested for possession.

 

Only a pixel-perfect solution will work and it must be post-processing since triangles are always drawn with straight edges (a correct rendering of a long straight edge should curve around your view), so simply adjusting points in the vertex shader will not work.

A pixel-perfect solution will usually have tons of artifacts, and in order to pull in the edges and corners of the screen correctly you must over-draw the scene onto a larger texture.  A lot of work and a performance hit just to get a result that you will likely discard and then return to the standard way of rendering.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement

 

On 6/7/2018 at 2:21 PM, L. Spiro said:

In reality, you see the world this way:

I certainly don't. I perceive straight lines as straight lines, not curves.

On 6/7/2018 at 2:21 PM, L. Spiro said:

Your eyes do not distort images that are off-to-the-side this way. 

Mine do. I just held up a sphere in the center of my field of vision, and then at the bottom left of my vision, and traced the outline. The second trace is distorted as you'd expect due to perspective:

fv4CH8Y.png 5Zkl58m.png

This effect is highly pronounced in video games because we typically render content with a very high field of view (e.g. 90º) and then view it on a small rectangle that only takes up maybe 20º of our field of view. This causes perspective to be extremely exaggerated.

3 hours ago, Hodgman said:

This causes perspective to be extremely exaggerated.

Yes.  Like I said.  An effect that gets gradually more pronounced as you step away from the center of your vision, or the screen.  And as I said you don’t notice it as much nearer to the center.  But, of course, it is there.  Waiting for you to manually override your vision and see it for what it is.

If you do your absolute best to swivel your head around one of your eyeballs, does not a doorway straight edge still change perceived directions as you look up and down?  If you look down, the bottom of the door edge goes away from you straight into the distance.  It does not go away from you into your forward distance as you rotated your head around your eyeball to maintain the exact same projection of your surroundings as you look up.

The angle the door goes away from you remains the same as long as you keep your eyeball positioned.  Rotating around your eyeball is like putting each individual pixel in the center of your screen, hopefully keeping in mind that just because something may have been lower on your screen when you were looking ahead, it’s still the same image that would be projected on the bottom of your screen vs. in front of your screen when looking directly at it.

3 hours ago, Hodgman said:

I certainly don't. I perceive straight lines as straight lines, not curves.

You will start to see the curves if you override the “correction” your brain makes.  You can override it because your visual system does not transform it into a straight line—you see a curved line that your brain simply says, “What curve?  It’s straight.”  It’s literally the same as the mechanism behind the blue/black dress vs gold.

 

3 hours ago, Hodgman said:

I just held up a sphere in the center of my field of vision, and then at the bottom left of my vision, and traced the outline. The second trace is distorted as you'd expect due to perspective

So your perspective is not based on gathering light from a roughly singular point in space?  So, glasses?  Because what you describe is literally physically impossible, although light does not gather in a literally singular location within your eye, and these imperfections can cause a slight distortion, though once again your brain corrects for these, and it isn’t as bad as presented by digital media.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

This topic is closed to new replies.

Advertisement