Advertisement

Mystirious Quads!

Started by March 22, 2001 09:30 AM
1 comment, last by Crash_Kid 23 years, 8 months ago
Hi, now it is time for a new problem, and i have a problem. I would try to explain it. We take a simple Quad: (x,y,z) 0.0f,0.0f,0.0f 0.0f,0.0f,1.0f 1.0f,0.0f,1.0f 1.0f,0.0f,0.0f Ok I think this quad is clear. 0.0f,0.0f,0.0f 0.0f,0.0f,1.0f 1.0f,0.0f,1.0f 1.0f,1.0f,0.0f So now here is the problem, in the last line, one corner is higher than the others and when i texturemap the quad, all is ok, but when i rotate the quad or go near/farer the quad appears into two different ways. To understand better what i mean, you can write your own little program, use these Quadcoords and move around i hope you will see what i mean.
a quad only has one plane (ie its flat)
this

A=0.0f,0.0f,0.0f
B=0.0f,0.0f,1.0f
C=1.0f,0.0f,1.0f
D=1.0f,1.0f,0.0f

has more than one (ie its 2 triangles)
A,B,C + C,D,A
or
A,B,D + B,C,D
Advertisement
I had this problem in the first version of my terrain engine!
what''s happening is that the hardware is splitting the quad into two triangles. There''s no way to prevent that eather! The quad is split in whatever way will optimize performance in that frame. If the quad is on a flat plane then you''ll never notice it. However, as the vertecies diverge from the plane the probmlem will appear. The only solution is to split the quad into triangles yourself then render them. Or make sure all the verts are on the same plane.
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]

This topic is closed to new replies.

Advertisement