Path: chuka.playstation.co.uk!news From: Andreas Schrattenecker Newsgroups: scea.yaroze.programming.3d_graphics Subject: Re: Solved flashing polygon problem! Date: Tue, 11 Nov 1997 00:31:37 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 190 Message-ID: <34679958.925F7F79@jk.uni-linz.ac.at> References: <3465580B.4D4A@san.rr.com> NNTP-Posting-Host: k13b.jkh.uni-linz.ac.at Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------0893B4CD92694D339898F109" X-Mailer: Mozilla 4.03 [en] (WinNT; I) --------------0893B4CD92694D339898F109 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit (SONY please also read this) Great job David !!! Ive taken an old version of my landscape-routine built up with quads ( with the missing-polygon-problem), and it does work !! There are still a few polygons disappearing, but this is for sure due to my less precise fixedpoint math-routines (codewarrior) area calulation. Although it works, im not sure if your theory behind this problem is right. In my case it has nothing to do with narrow triangles, and incorrect normals. I have a quad-mesh with equal x anz z length for the quads, and y values are (at this time) funktion values of sin(x*y) -> no narrow triangles. Setting the normals to ONE,ONE,ONE gives the same problem (with false gouraud-shading of course) -> normals dont matter. It has for sure to do with frontfaced, and backfaced polygons. While front-backface-definition for triangles is clear -> set up vertices anticlock- and clockwise, it is in case of quads a bit confusing. If i define vertices in following order: 3 2 +---+ | | +---+ 0 1 and indices to vertices with : 2 1 3 0 i get a clockwise triangle 2 1 3, and a anticlockwise 1 3 0 ?? Can you make anything of this ? Or is it 2 1 3, and 0 3 1 -> its a definition thing -> SONY, please tell us !! What i have tested is: 2 1 3 0 -> frontfaced - with some missing triangles on top-behind of my sinus-funktion (2. derivation negativ). * <- * * * * * * 0 3 1 2 -> also frontfaced - with some missing triangles on bottom-front of my sinus ( 2. derivation positiv). * * * * * <- * * Your area calculation does also calculate the 2. derivation i think. first triangle-area smaller than second (from left to right) -> 2. derive. neg. first triangle-area bigger than second (from left to right) -> 2. derive. pos. SONY pleas tell us, how is backfaced-frontfaced calculation done for the two triangles in quads !!! However, your code does also work for my case, and gives me a speed boost of 40% - and more memory -> great !!! Andreas Schrattenecker --------------0893B4CD92694D339898F109 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit (SONY please also read this)

Great job David !!!
Ive taken an old version of my landscape-routine built up with
quads ( with the missing-polygon-problem), and it does work !!
There are still a few polygons disappearing, but this is for sure
due to my less precise fixedpoint math-routines (codewarrior)
area calulation.

Although it works, im not sure if your theory behind this problem
is right. In my case it has nothing to do with narrow triangles,
and incorrect normals.

I have a quad-mesh with equal x anz z length for the quads, and
y values are (at this time) funktion values of sin(x*y) -> no narrow
triangles.

Setting the normals to ONE,ONE,ONE gives the same problem
(with false gouraud-shading of course) -> normals dont matter.

It has for sure to do with frontfaced, and backfaced polygons.
While front-backface-definition for triangles is clear -> set up
vertices anticlock- and clockwise, it is in case of quads a bit
confusing.

If i define vertices in following order:
 3   2
 +---+
 |   |
 +---+
 0   1

and indices to vertices with : 2 1 3 0
i get a clockwise triangle 2 1 3, and a anticlockwise 1 3 0 ??
Can you make anything of this ?
Or is it 2 1 3, and 0 3 1 -> its a definition thing ->
SONY, please tell us !!

What i have tested is:
2 1 3 0 -> frontfaced - with some missing triangles on top-behind of
my sinus-funktion (2. derivation negativ).
  * <-
 * *
 * *
*   *

0 3 1 2 -> also frontfaced - with some missing triangles on bottom-front
of my sinus ( 2. derivation positiv).
  *
 * *
 * * <-
*   *

Your area calculation does also calculate the 2. derivation i think.
first triangle-area smaller than second (from left to right) -> 2. derive. neg.
first triangle-area bigger than second (from left to right) -> 2. derive. pos.

SONY pleas tell us, how is backfaced-frontfaced calculation done
for the two triangles in quads !!!

However, your code does also work for my case, and gives me
a speed boost of 40% - and more memory -> great !!!

Andreas Schrattenecker
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  --------------0893B4CD92694D339898F109--