![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Johannes Dahlstrom <sad### [at] tkukoulu fi> wrote:
> 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.
I see.
Do you have any idea how that drawing should be done so that it doesn't
cause confusion?
> 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.
But the artifact which I'm talking about has nothing to do with perspective
correction, and using perspective correction does not affect the artifact
in question: It will still be there regardless of PC.
There actually exists an algorithm to handle this problem, but I have never
heard that any 3D hardware supports this algorithm. The principle of the
algorithm is to perform a more complicated texture mapping.
--
#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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
>
> Johannes Dahlstrom <sad### [at] tkukoulu fi> wrote:
> > 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.
>
> I see.
>
> Do you have any idea how that drawing should be done so that it doesn't
> cause confusion?
I can think of at least three -
1. Title it as a trapezoid.
2. Make the top length a bit shorter.
3. Draw a thick lined rectangle around the illustration.
--
Ken Tyler
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Shouldn't the distance between the coordinates of the texture be in
proportion to the coordinates in the polygon?
"Warp" <war### [at] tag povray org> wrote in message
news:3e0f4330@news.povray.org...
> Johannes Dahlstrom <sad### [at] tkukoulu fi> wrote:
> > 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.
>
> I see.
>
> Do you have any idea how that drawing should be done so that it doesn't
> cause confusion?
>
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mike White <mik### [at] mindspring com> wrote:
> Shouldn't the distance between the coordinates of the texture be in
> proportion to the coordinates in the polygon?
Why should it?
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Warp" <war### [at] tag povray org> wrote in message
news:3e104469@news.povray.org...
> Mike White <mik### [at] mindspring com> wrote:
> > Shouldn't the distance between the coordinates of the texture be in
> > proportion to the coordinates in the polygon?
>
> Why should it?
>
Isn't the idea to just lay a bitmap across a face?
What you're asking OpenGL to do is reshape the bitmap, something I doubt it
was designed for.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Mike White <mik### [at] mindspring com> wrote:
> What you're asking OpenGL to do is reshape the bitmap, something I doubt it
> was designed for.
Well, if you do it with a triangle, it works flawlessly. The texture
will be stretched correctly.
--
#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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> Do you have any idea how that drawing should be done so that it doesn't
> cause confusion?
You could put some evenly-spaced horizontal lines to the texture - they
would make a difference between the two cases: In the case B the mapping
wouldn't change their mutual distances, whereas in the case A it obviously
would (the lines "farther away" would be closer to each other).
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Johannes Dahlstrom <sad### [at] tkukoulu fi> wrote:
> You could put some evenly-spaced horizontal lines to the texture - they
> would make a difference between the two cases: In the case B the mapping
> wouldn't change their mutual distances, whereas in the case A it obviously
> would (the lines "farther away" would be closer to each other).
What are the cases A and B you are talking about?
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Warp wrote:
> What are the cases A and B you are talking about?
>
I was referring (a bit unclearly) to my previous message - case B is what
you want, ie. the trapezoidal, non-tilted quad, and case A is the one with
perspective.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |