POV-Ray : Newsgroups : povray.advanced-users : Polygon planarity tolerance : Re: Polygon planarity tolerance Server Time
29 Jul 2024 10:24:26 EDT (-0400)
  Re: Polygon planarity tolerance  
From: Johannes Dahlstrom
Date: 29 Dec 2002 11:54:07
Message: <3e0f28ae@news.povray.org>
Warp wrote:

>   I don't follow you. Which transformation are you talking about? Why
> do you keep talking about perspective when there's no perspective involved
> anywhere in the drawings?

Sorry, bad choice of word from my part, "mapping" would have been more 
adequate. What I meant was that there are two ways to interpret your 
drawing: Either

A) there is a tilted rectangular quad, or

B) there is a non-tilted trapezoidal quad. 

It is simply impossible to know which is the correct way to interpret it 
from the drawing only, without some depth information. The converging 
lines, however, give a visual cue which would suggest the case A. Human 
brains simply are wired that way, and this phenomenom is utilized in the 
illusion I posted a link to in my previous message.


>   The problem is simple: Take a four-sided polygon which is not
> rectangular (but eg. trapezoidal as in the illustration), apply
> UV-coordinates to the vertices of this polygon so that they map a
> rectangle on the texture, and feed this to the OpenGL API.
>   What OpenGL does is to divide the polygon into two triangles. Then the
> 3D hardware draws these two triangles independently, causing the
> deformation of the texture depicted in the illustration.
> 
>   There's no perspective anywhere. There are no transformations anywhere.

But my point was that it is impossible to see it from the drawing. I did 
some experiments with OpenGL, and the results are here:

http://koti.mbnet.fi/~sharlin/with_pc.png 
http://koti.mbnet.fi/~sharlin/without_pc.png

Without perspective correction (the second image) and without resorting to 
the texts, can you tell case A from case B? I don't think so. The texture 
mapper doesn't make a difference between them, because it isn't conserned 
about depth information if it doesn't do perspective correction.


>   Of course it's very common to build a surface using quadrilaterals
> (ie. polygons of four sides). For example if you build a torus with
> quadrilaterals, you'll get the depicted problem with the texturing
> (at the top and bottom of the torus).

OK, I see that with such round shapes it can be a problem. My bad.


>   What is "the artifact"?
>   Yes, it produces *an* artifact, which is completely different from what
> is depicted in my illustration.

Erm, no. As you can see from the aforementioned images, without perspective 
correction the two cases have the exactly same artifact, caused by exactly 
same thing: linear interpolation in texture space. Perspective correction 
does what it's meant to do: renders the perspective correctly. If it 
wouldn't, most 3D games would look very very ugly.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.