RE: SV: Big textured triangles twist and skew

Expand Messages
• ... A **QUAD**.... oh! Oh! OH! One possibility is that your quad has non-uniform texture coordinates: eg The numbers here
Message 1 of 10 , Dec 1, 1998
On Mon, 30 Nov 1998, Johan Anderzon wrote:

> Yes your right. I'm drawing a large quad with only one repeat. And you
> can see the triangles that the quad is simplified to, which is strange
> since i'm using GL_QUAD :)

oh! Oh! OH! <Sunlight breaking through clouds>

eg

The numbers here are the (s,t) coordinates of the texture at the corners of
a square:

(0,0) (1,0)
_________
| |
| |
| |
| |
|_________|
(0,1) (1,10)

The texture you'd get in the middle of the square would depend
on how OpenGL decided to split the Quad into two triangles (as
it surely must). If it cuts it top-left to bottom-right then
the coordinate at the center of the square will be (0.5,5),
but if it cuts it top-right to bottom-left, it'll be (0.5,0.5).

Thus the texture will jump around depending on the polygon's
orientation and on how it gets clipped.

Try splitting it into a triangle fan (same number of vertices - so
probably no less efficient) - does that change the behaviour?

> I've uploaded some screenshots of the effect to http://www.repsworld.com/uglytex. Enjoy!

Oh. Well, maybe not non-uniform coordinates then. These images look more
like some kind of truncation in the clipping code - I **REALLY** think you
should get the more recent Mesa (3.0).

Steve Baker (817)619-2657 (Vox/Vox-Mail)
Raytheon Systems Inc. (817)619-2466 (Fax)
Work: SBaker@... http://www.hti.com
Home: SJBaker1@... http://web2.airmail.net/sjbaker1

--
Author: Steve Baker
INET: sbaker@...

Fat City Network Services -- (619) 538-5051 FAX: (619) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
• ... I tried to upgrade to Mesa 3.0 before. And it just kept crashing on wglCreateContext. But I didn t tried so hard to get it to work. Thanks for the help -
Message 2 of 10 , Dec 1, 1998
>On Mon, 30 Nov 1998, Johan Anderzon wrote:
>
>> Yes your right. I'm drawing a large quad with only one repeat. And you
>> can see the triangles that the quad is simplified to, which is strange
>> since i'm using GL_QUAD :)
>
>
>oh! Oh! OH! <Sunlight breaking through clouds>
>
>
>eg
>
>The numbers here are the (s,t) coordinates of the texture at the corners of
>a square:
>
>
> (0,0) (1,0)
> _________
> | |
> | |
> | |
> | |
> |_________|
> (0,1) (1,10)
>
>The texture you'd get in the middle of the square would depend
>on how OpenGL decided to split the Quad into two triangles (as
>it surely must). If it cuts it top-left to bottom-right then
>the coordinate at the center of the square will be (0.5,5),
>but if it cuts it top-right to bottom-left, it'll be (0.5,0.5).
>
>Thus the texture will jump around depending on the polygon's
>orientation and on how it gets clipped.
>
>
>Try splitting it into a triangle fan (same number of vertices - so
>probably no less efficient) - does that change the behaviour?
>
>> I've uploaded some screenshots of the effect to http://www.repsworld.com/uglytex. Enjoy!
>
>Oh. Well, maybe not non-uniform coordinates then. These images look more
>like some kind of truncation in the clipping code - I **REALLY** think you
>should get the more recent Mesa (3.0).
>
>Steve Baker (817)619-2657 (Vox/Vox-Mail)

I tried to upgrade to Mesa 3.0 before. And it just kept crashing on wglCreateContext. But I didn't tried so hard to get it to work. Thanks for the help

- Johan Anderzon

--
Author:
INET: rep@...

Fat City Network Services -- (619) 538-5051 FAX: (619) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
• I ve seen this exact problem with my code rendering on a Riva 128. In my case, the quads aren t really that big, though. IIRC, something like 20 by 80 (with
Message 3 of 10 , Dec 1, 1998
I've seen this exact problem with my code rendering on a Riva 128. In my case, the quads aren't really that big, though. IIRC, something like 20 by 80 (with the texture repeating 10 times or so). As these long quads are rotated, the textures shear and warp -- but ONLY when clipped by the view frustum; the planes along which the shearing occurs always line up with the corners of the view frustum. If the quad is completely enclosed by the frustum, everything works great: no shearing or warping at all.

It works flawlessly under Microsoft's software implementation...

Kevin Rogers
<shred@...>

>snip<
>
> Yes your right. I'm drawing a large quad with only one repeat. And you =
> can see the triangles that the quad is simplified to, which is strange =
> since i'm using GL_QUAD :)
> I've uploaded some screenshots of the effect to =
> http://www.repsworld.com/uglytex. Enjoy!
>
> - Johan
>

-----
See the original message at http://www.egroups.com/list/opengl-gamedev-l/?start=9221
--
Author:
INET: shred@...

Fat City Network Services -- (619) 538-5051 FAX: (619) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
• I ve fixed the problem now. The problem was the Mesa 2.6 driver. When I changed to the latest 3dfx mini gl it worked perfectly. But now the mouse feels
Message 4 of 10 , Dec 1, 1998
I've fixed the problem now. The problem was the Mesa 2.6 driver. When I changed to the latest 3dfx mini gl it worked perfectly. But now the mouse feels sluggish :) Shit happends..

- Johan

>I've seen this exact problem with my code rendering on a Riva 128. In my case, the quads aren't really that big, though. IIRC, something like 20 by 80 (with the texture repeating 10 times or so). As these long quads are rotated, the textures shear and warp -- but ONLY when clipped by the view frustum; the planes along which the shearing occurs always line up with the corners of the view frustum. If the quad is completely enclosed by the frustum, everything works great: no shearing or warping at all.
>
>It works flawlessly under Microsoft's software implementation...
>
>Kevin Rogers
><shred@...>
>
>>snip<
>>
>> Yes your right. I'm drawing a large quad with only one repeat. And you =
>> can see the triangles that the quad is simplified to, which is strange =
>> since i'm using GL_QUAD :)
>> I've uploaded some screenshots of the effect to =
>> http://www.repsworld.com/uglytex. Enjoy!
>>
>> - Johan
>>
>
>
>
>-----
>See the original message at http://www.egroups.com/list/opengl-gamedev-l/?start=9221
>--
>Author:
> INET: shred@...
>
>Fat City Network Services -- (619) 538-5051 FAX: (619) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
>

--
Author:
INET: rep@...

Fat City Network Services -- (619) 538-5051 FAX: (619) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
• ... changed to the latest 3dfx mini gl it worked perfectly. But now the mouse feels sluggish :) Shit happends.. *PING* *PING* *PING* I *JUST* saw this problem
Message 5 of 10 , Dec 2, 1998
At 10:07 PM 12/1/98 -0800, you wrote:
>I've fixed the problem now. The problem was the Mesa 2.6 driver. When I
changed to the latest 3dfx mini gl it worked perfectly. But now the mouse
feels sluggish :) Shit happends..

*PING* *PING* *PING*

I *JUST* saw this problem over last weekend. In every case I've seen,
sluggish mouse response is a result of your application running somewhere
between 30 and 60 fps with vsync wait on. That way, your application
flickers between 60 fps and 30, which causes choppiness, but also seems to
cause serious, serious perceived mouse lag. Try turning vsync off (I
always have it off; makes many applications faster with very few side
effects), or clamping your FPS to 60 fps, 30 fps, 20 fps, etc -- floor what
you're getting to the nearest fraction of the refresh rate (1/n) and use
that. I don't understand exactly why the effects of vsynched games running
at in-between rates are magnified quite so much, but they sure do seem to be.

Hope that helps,
Brian
------
CogniToy Games
Graphics Guru and Pianist-At-Large
I speak for myself, not my company.
http://www.cs.dartmouth.edu/~bsharp/
http://www.cognitoy.com/

- Toni Morrison
--
Author:
INET: brian_sharp@...

Fat City Network Services -- (619) 538-5051 FAX: (619) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@... (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB OPENGL-GAMEDEV-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Your message has been successfully submitted and would be delivered to recipients shortly.