[3.0] (not so) IMPORTANT : vtk performance drop ? : solved (clipping range)

Sebastien Barre barre at sic.sp2mi.univ-poitiers.fr
Fri Nov 5 09:38:47 EST 1999


At 08:35 05/11/99 -0500, Miller, James V (CRD) wrote:

>A Z-buffer operation is essentially an "if-check" followed by a write.
When the clipping planes are
>far apart, all of sphere geometry mapped to a few bins in Z.  

Well, seems to me that our bench was not exactly fine-tuned :) We should
have guessed that a long time ago... a bit late now. Let's say that it
benchs something, but it's not exactly the "right" thing :)

>As a consequence, the "if-check" failed
>frequently and the write operation was avoided.  When the clipping planes
were brought in tighter,
>the sphere spans more of the Z-buffer, the "if-check" fails less
frequently, causing more write
>operations into the Z-buffer, slowing down performance.

>Intuitively, I am happy with this explanation. 

Me too, that looks more appropriate.

>That is until I think about the fact that we are
>rendering a single sphere in the benchmark. When rendering a sphere, I
would expect only two
>"if-checks" per pixel over the vast majority of the sphere with the
potential of more Z-buffer
>operations near the boundary of the sphere. I wouldn't expect this
degradation in performance.
>However, I think the sphere benchmark uses a very high resolution sphere,
perhaps with more triangles
>than pixels.  In this case, multiple triangles map to the same pixel,
requiring more than two
>"if-checks" per pixel across the sphere.

That looks perfectly right. 

Let's see :

  - intel running Windows NT 4.0
  - Visual is 1280x1024, truecolor/truecolor/32
  - Tcl/Tk 8.0.5
  - window was 400 x 400


***| 32 x 32 |***********************

  - VTK 3.0.0 (rev: 1.322, 1999/11/02 01:06:27)

   1)  32x32  :  144.0 kpolys/s : [small_sphere]
   2)  32x32  :  144.0 kpolys/s : []
   3)  32x32  :  144.0 kpolys/s : [transparency]
   4)  32x32  :  144.0 kpolys/s : [wireframe]
   5)  32x32  :  144.0 kpolys/s : [texture]
   6)  32x32  :  144.0 kpolys/s : [texture, transparency]
   7)  32x32  :  140.5 kpolys/s : [stripper]

  - VTK 2.4.0 (rev: 1.211, 1999/06/30 17:48:40)

   1)  32x32  :  144.0 kpolys/s : [stripper]
   2)  32x32  :  144.0 kpolys/s : [small_sphere]
   3)  32x32  :  144.0 kpolys/s : []
   4)  32x32  :  144.0 kpolys/s : [transparency]
   5)  32x32  :  144.0 kpolys/s : [wireframe]
   6)  32x32  :  144.0 kpolys/s : [texture]
   7)  32x32  :  144.0 kpolys/s : [texture, transparency]

=> No differences (but it was really fast)


***| 64 x 64 |***********************

  - VTK 3.0.0 (rev: 1.322, 1999/11/02 01:06:27)

   1)  64x64  :  595.2 kpolys/s : [stripper]
   2)  64x64  :  595.2 kpolys/s : [small_sphere]
   3)  64x64  :  595.2 kpolys/s : []
   4)  64x64  :  595.2 kpolys/s : [transparency]
   5)  64x64  :  595.2 kpolys/s : [texture]
   6)  64x64  :  595.2 kpolys/s : [texture, transparency]
   7)  64x64  :  283.4 kpolys/s : [wireframe]

  - VTK 2.4.0 (rev: 1.211, 1999/06/30 17:48:40)

   1)  64x64  :  595.2 kpolys/s : [stripper]
   2)  64x64  :  595.2 kpolys/s : [small_sphere]
   3)  64x64  :  595.2 kpolys/s : []
   4)  64x64  :  595.2 kpolys/s : [transparency]
   5)  64x64  :  595.2 kpolys/s : [texture]
   6)  64x64  :  595.2 kpolys/s : [texture, transparency]
   7)  64x64  :  580.7 kpolys/s : [wireframe]

=> No differences, except for wireframe, but I guess it's an isolated pb.


***| 128 x 128 |***********************

  - VTK 3.0.0 (rev: 1.322, 1999/11/02 01:06:27)

   1) 128x128 : 1209.6 kpolys/s : [stripper]
   2) 128x128 : 1209.6 kpolys/s : [small_sphere]
   3) 128x128 :  896.0 kpolys/s : [texture]
   4) 128x128 :  896.0 kpolys/s : [texture, transparency]
   5) 128x128 :  864.0 kpolys/s : []
   6) 128x128 :  864.0 kpolys/s : [transparency]
   7) 128x128 :  632.5 kpolys/s : [wireframe]

  - VTK 2.4.0 (rev: 1.211, 1999/06/30 17:48:40)

   1) 128x128 : 1344.0 kpolys/s : [stripper]
   2) 128x128 : 1209.6 kpolys/s : [small_sphere]
   3) 128x128 : 1209.6 kpolys/s : []
   4) 128x128 : 1209.6 kpolys/s : [transparency]
   5) 128x128 : 1209.6 kpolys/s : [texture, transparency]
   6) 128x128 : 1194.7 kpolys/s : [texture]
   7) 128x128 :  806.4 kpolys/s : [wireframe]

=> Now we are starting to see the problem : 3.0.0 is slower in many of the
cases.


***| 256 x 256 |***********************

  - VTK 3.0.0 (rev: 1.322, 1999/11/02 01:06:27)

   1) 256x256 : 2438.4 kpolys/s : [stripper]
   2) 256x256 : 1950.7 kpolys/s : [small_sphere]
   3) 256x256 : 1266.7 kpolys/s : []
   4) 256x256 : 1266.7 kpolys/s : [transparency]
   5) 256x256 : 1226.9 kpolys/s : [texture, transparency]
   6) 256x256 : 1223.0 kpolys/s : [texture]
   7) 256x256 :  663.5 kpolys/s : [wireframe]

- VTK 2.4.0 (rev: 1.211, 1999/06/30 17:48:40) 

   1) 256x256 : 3224.3 kpolys/s : [stripper]
   2) 256x256 : 1950.7 kpolys/s : [small_sphere]
   3) 256x256 : 1950.7 kpolys/s : []
   4) 256x256 : 1950.7 kpolys/s : [transparency]
   5) 256x256 : 1393.4 kpolys/s : [texture]
   6) 256x256 : 1393.4 kpolys/s : [texture, transparency]
   7) 256x256 :  896.9 kpolys/s : [wireframe]

=> And that is the case we know (256x256).
=> Indeed, the wireframe test is more or less useful, we do not much see
any "wire", the sphere is almost "full".

And now let's expand the window from 400x400 to 700x700, same resolution.


***| 256 x 256 |***********************

  - window was 700 x 700

  - VTK 2.4.0 (rev: 1.211, 1999/06/30 17:48:40)

   1) 256x256 : 2438.4 kpolys/s : [stripper]
   2) 256x256 : 1921.9 kpolys/s : [small_sphere]
   3) 256x256 : 1840.3 kpolys/s : [transparency]
   4) 256x256 : 1773.4 kpolys/s : []
   5) 256x256 : 1393.4 kpolys/s : [texture]
   6) 256x256 : 1393.4 kpolys/s : [texture, transparency]
   7) 256x256 :  886.7 kpolys/s : [wireframe]

  - VTK 3.0.0 (rev: 1.322, 1999/11/02 01:06:27)

   1) 256x256 : 2021.5 kpolys/s : [stripper]
   2) 256x256 : 1857.8 kpolys/s : [small_sphere]
   3) 256x256 : 1250.5 kpolys/s : [transparency]
   4) 256x256 : 1238.6 kpolys/s : []
   5) 256x256 : 1234.6 kpolys/s : [texture, transparency]
   6) 256x256 : 1207.9 kpolys/s : [texture]
   7) 256x256 :  639.6 kpolys/s : [wireframe]

=> You were right, the difference is not so high.

Obviously, it seems stupid to use 512x512 in a 400x400 window, . I guess
I'm gonna remove this very high resolution :)

I'd also add, one again, that I was UNABLE to see any differences between
2.4 and 3.0 on my personal box, a 3Dlabs GMX2000 + Pentium II at 300.

Thanks for the tip.



-- 
Sebastien BARRE
IRCOM-SIC, UMR-CNRS 6615 - Université de Poitiers 
Bât. SP2MI, Bvd 3 - Téléport 2, BP 179 F-86960 Futuroscope Cedex 
Tel. : +33 (0)5 49 49 65 95 / 65 83, Fax : +33 (0)5 49 49 65 70 
http://www-sic.univ-poitiers.fr/ 


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list