Re: Some question about "Lighting and Material of Halo3" and "Lightmap compression in Halo 3"

Francis Boivin <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <E7F3301F6AF1F341AB107794F4F80A6F20A9DF8F@MDC-MAIL-CMS01.ubisoft.org>
FWIW there here is a new compression scheme to be presented @ I3D 2010
http://www.cg.tuwien.ac.at/research/publications/2010/Habel-2010-EIN/

@inproceedings\{Habel-2010-EIN,
  title =      "Efficient Irradiance Normal Mapping",
  author =     "Ralf Habel and Michael Wimmer",
  year =       "2010",
  abstract =   "Irradiance normal mapping is a method to combine two popular
               techniques, light mapping and normal mapping, and is used in
               games such as Half-Life 2 or Halo 3. This combination allows
               using low-resolution light caching on surfaces with only a
               few coefficients which are evaluated by normal maps to
               render spatial high-frequency changes in the lighting.
               Though there are dedicated bases for this purpose such as
               the Half-Life 2 basis, higher order basis functions such as
               quadratic Spherical Harmonics are needed for an accurate
               representation. However, a full spherical basis is not
               needed since the irradiance is stored on the surface of a
               scene.  In order to represent the irradiance signals
               efficiently, we propose a novel polynomial, hemispherically
               orthonormal basis function set that is specifically designed
               to carry a directional irradiance signal on the hemisphere
               and which makes optimal use of the number of coefficients.
               To compare our results with previous work, we analyze the
               relations and attributes of previously proposed basis
               systems and show that 6 coefficients are sufficient to
               accurately represent an irradiance signal on the hemisphere.
               To create the necessary irradiance signals, we use Spherical
               Harmonics as an intermediate basis due to their fast
               filtering capabilities.",
  pages =      "%pages_from%--%pages_to%",
  month =      feb,
  location =   "Washington D.C.",
  booktitle =  "Proceedings of I3D 2010",
  keywords =   "real-time rendering, irradiance, lightmap, normal mapping",
  URL =        "http://www.cg.tuwien.ac.at/research/publications/2010/Habel-2010-EIN/",
}


From: Sébastien Lagarde [mailto:[email protected]]
Sent: Friday, January 29, 2010 10:29 AM
To: [email protected]
Subject: [Algorithms] Some question about "Lighting and Material of Halo3" and "Lightmap compression in Halo 3"

Hello all,

I tried to contact the author of this two (now old) paper, without success,:
"Lighting and Material of Halo 3" published at siggraph 2008 (http://ati.amd.com/developer/SIGGRAPH08/Chapter01-Chen-Lighting_and_Material_of_Halo3.pdf)
and GDC 2008 conference "Lightmap compression in Halo 3" (http://toomuchlogic.com/Lightmap_Compression_2008_02_22.pdf)
so I will ask some question to the list, if anyone is interested by the subject and has better understanding of math than me :)

1. "Lighting and Material of Halo 3"  About equation (5) the diffuse reflectance using SH basis
the diffuse reflectance using SH basis is : k_d R_d Sum Lambda_i A_i
A_i is the projection of the cosine lobe in SH, and as it is radially symetric.
all coefficient with m != 0 are 0.
After that the author give the first three term of A_i.
I wondering how many band are use for this calculation  ? (order 3, 4 or more ?)

I read from "Stupid spherical harmonics tricks" from Perter Pike sloan (http://www.ppsloan.org/publications/StupidSH36.pdf)
that order 3 SH is sufficient for approximate light source
but for HDR light sources he recommand order 5.
As order 4 is 0 (From paper http://www.eecs.berkeley.edu/~ravir/lighting.pdf I get the formula for A_i)
This mean 4 coefficient to store by color channel.
As I am pretty sure the author store  HDR data, can someone lighten me ?

2. About texture storage (which are deduced from above statement)

I try to figure out how are encoded the incident radiance in their SHLightmap.
>From GDC 2008 conference "Lightmap compression in Halo 3" I can read that the author need to
store for each texel a vector of 5 * 3 float values.
I don't figure what are the values exactly.

My assumption is that "3" is for each channel color RGB,
But I can't figure what's the 5 is ?
Are they 5 first band of SH order like I suppose above (but as I said, we only need 4 coefficient in this case)
or maybe order 6 ?

In this same paper later I found:
A. Two DXT5 texture for each SH coefficient channel (HDR, positive/negative)
And
B. Each band of the SH coefficients (RGB) are converted to Luvw space

I suppose that Luvw space is what is describe in this paper "Rendering from Compressed High Dynamic Range Textures on
Programmable Graphics Hardware" by Peter Pike sloan and al.(ftp://ftp.research.microsoft.com/pub/tr/TR-2006-152.pdf)

What I don't understand is that A and B seem different. I can't understand what is store.
Are they storing for each band the triplet RGB of SH coeeficient, mean 3 float value for two DXT5 x order
or do they store store 5 SH coefficient for channel color R in two DXT5 ?

So what are the total storage cost of all the 5 * 3 float value in term of DXT5 texture ?
Cause It looks like to be pretty big.

Thanks for anyone interested by this post

Best regards

Lagarde Sébastien

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.