POV-Ray : Newsgroups : povray.advanced-users : Polygon planarity tolerance : Re: Polygon planarity tolerance Server Time
29 Jul 2024 10:17:35 EDT (-0400)
  Re: Polygon planarity tolerance  
From: Warp
Date: 28 Dec 2002 18:20:35
Message: <3e0e31c3@news.povray.org>
Johannes Dahlstrom <sad### [at] tkukoulufi> wrote:
> Oh well, so I misinterpreted the drawings. Anyway, IMHO that particular 
> kind of transformation does imply a perspective; it provides an important 
> visual cue, as is seen in various illusions, such as here:

  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?

  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.

> And, although it is of course possible to map a texture like that, I'm not 
> sure how common or useful it is. 

  You seem to misunderstand the problem completely.
  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).

> Well, a triangle texture mapper without perspective correction interpolates 
> linearly both in screen space and in texture space, and produces the 
> artifact.

  What is "the artifact"?
  Yes, it produces *an* artifact, which is completely different from what
is depicted in my illustration.
  In fact, even if that polygon was _rectangular_ and drawn in perspective
and even if it was made _without_ perspective correction, there would be
no visible artifact due to the texture in question. There would be a visible
artifact if the texture had horizontal lines (in which case they would be
mapped at equal distances throughout the polygon instead of decreasing
distance due to perspective).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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