POV-Ray : Newsgroups : povray.off-topic : The most common 3D mesh file format? : Re: The most common 3D mesh file format? Server Time
6 Sep 2024 15:21:08 EDT (-0400)
  Re: The most common 3D mesh file format?  
From: Warp
Date: 27 Jan 2009 05:20:26
Message: <497edfea@news.povray.org>
scott <sco### [at] scottcom> wrote:
> More specifically, when trying to map a rectangular section of a texture 
> onto a non-rectangular quad in model-space.  In practise this rarely happens 
> because you usually match your texture coordinates to the mesh (so that the 
> texture does not get distorted) - ie your 2 and 3 in texture space would be 
> moved to match how they look in model space.

  That's not always possible. Simple example: A torus composed of quads,
and a rectangular texture image wrapped onto its surface. The texture will
be distorted at the places where the quads are non-rectangular.

  I suppose you could tansform the texture image so that it matches the
shape of the quads at each point. It would make the texture irregular and
larger, but I suppose it might work. OTOH, if you ever decide to change
the resolution of your torus (ie. change the number of quads it's composed
of), you'll have to re-calculate the texture as well, which might not be
practical.

> In screen-space, when quads pretty much always become distorted and 
> non-rectangular due to perspective, the GPU accounts for this by 
> interpolating the texture coordinates divided by w (the homogenous 
> coordinate) to ensure the problem you illustrated in the other reply is 
> avoided.

  Perspective has nothing to do with what I'm talking about.

-- 
                                                          - Warp


Post a reply to this message

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