[pythian] CODE - Lightmap effeciency

  • From: "kk" <krauspe@xxxxxxx>
  • To: <pythian@xxxxxxxxxxxxx>
  • Date: Tue, 2 Jul 2002 17:47:49 +0200

This is my export map log. As you can see - new lightmap system is a lot
more effective - size and speed.
Exact cluster surface is the size (surface) the panels "occupy" in a
lightmap. It is something like width*height, where width can be any integer
number.
Real cluster surface is the same, but the nearest powers of two of width and
height are calculated and used instead of them. This number is how big would
have to be the lightmaps in ogl texture memory - as just lightmaps with
power of 2 size can be used.

You see - if I would render lightmaps for the old engine I would have to
store more than 20% more data. And that's not precise, because current
lightmap clusters (buckets) are size optimized. It would do maybe something
like 250% effeciency - thus about 130% less memory is used now.

99 Total Triangles
46 Tris in 23 Strips
4,304 avg. strip length
53 Tris in 7 Lists
7,571 avg. list size
0 Tris in 0 Fans
0 Tris in 0 Patches

**Lightmap info**
No. lightmaps: 7
Total lightmap surface: 458752,000 pixels
Cluster surface:
    exact = 356407,000 pix
    real  = 567296,000 pix
Lightmaps effeciency:
    exact = 77,691 %
    real  = 123,661 %

Darryl, I have done the dividing into more single-planar panel list by
myself. So please don't do it.

Have I mentioned that I have implemented second version textures using JPG
data. The engine and editor now save and load original textures as well as
new pythian textures with JPG 100% quality compression. The code is
originally from you Darryl. The map size went down a lot. 270kb lightmap
saves like 15kb. 270kb texture takes about 70kb now in the file.

-kk


Other related posts: