I think Klauss and I have a conditional agreement on the following packing:
Many explanations are due. Starting from the top...
- Some of you might notice ALPHA, back together with the main color, in an alpha channel, and
without a sad face. Had a change of heart on Alpha: It's a meaningless term, from a point of view
of optics and physics; but NOT having it would preclude rapid, automatic conversions of existing
models to CineMut-compatible format; and would interfere with uses of alpha as per putting holes
into things, via alpha-testing, which is a common technique. So alpha is back without regrets. - Mix-in color and Age Alpha... We were talking in some PU forum about whether it makes sense
for a brand new ship you buy to show rust. Well, it doesn't; but if you see a ship of the same type
that's been around a while, it makes more sense. Rust and scratches and to some extent dirt, are
connected to a ship's age. Combat may result in "rapid aging" to some extent; but it won't put thick
rust on your engines. I think that age should be a parameter passed to the shader, just like damage
is. So, the idea here is to have the rust or scratch or dirt color in the mix-in color channels, and a
sort of logarithmic encoding of rust clouds and scratch lines in the Age Alpha channel. The shader
would apply age-dependent gamma to the alpha channel, then blend the RGBA with diffuse; and
lower specularity and dielectric purity inversely with the gamma-ed Age Alpha. - Iridescence is something new in this packing. I'm not entirely sure what it IS, yet, but I know we
need it for titanium rusts Probably a normalized dielectric thickness. I have to read up on it.
Iridescence is what makes some materials show rainbow-like reflections that change with angle. - There's now a whopping 5 channels for detail control. This might seem excessive, but I believe
it isn't. Thing is, we need to control,- the intensity of detail texture application
- whether it puts bumps on the normal map and/or
- whether it puts clouds in the shininess map and/or
- whether it puts noise in the diffuse color, and if so,
- whether it should look like sparse white dots or
- black dots or
- some perlin noise in-between
- frequency of the detail map (big or small tiling)
map for representing evenly tiled surfaces.
So... I'm not even sure how to control all that from 5 texture channels. - The bent normal is no longer in a separate, un-compressed texture; but that means we need to use
special tricks to get some precision out of dxt5 compression. So, I'm repeating the U and V in 3 rgb
channels each, and will encode it with offsets so that the steppings in the encoding are staggered,
for a rough total precision of 7 bits. The Z is the most critical and so it goes in an alpha channel, which
is 8-bit. - The UAO, CAO and bump height are in alpha channels also, for maximum precision.
- Radiosity took a big hit, and only gets 6 RGB channels; but that's okay: self-radiosity is a subtle
effect and doesn't need a lot of precision. - As explained before, for a fighter, all sub-textures are 512x512 except the normalmap is 1024.
- So, each atlas is 1024x1024. Three atlases plus the 1024 normalmap = 4 million texels. And 4M
texels is equivalent to having a single 2048 texture. I don't think this is bandwidth-excessive at all.
per texture might have on performance. His concern is with texture cache: Four reads around the
same place are probably okay because of locality; but 4 reads spread around the texture might be
problematic. His contention is that this requires testing and that we shouldn't set the texture packing
in stone before we have more data. I, on the other hand, wanted to have a packing we can start
with, and modify later if necessary; just to push the project forward.
But so, what this all means is that instead of three 2x2 atlases we might have six 2x1 atlases (what
are currently labeled sub-atlases would become atlases); or that we might end up with a whopping
13 textures.
However, if any of that happens, the internal structures will probably stay as they are.
Crossing fingers...
On other news, I wrote a wiki "home" page for CineMut:
What is "CineMut"?
And another for LaGrande:
What is "LaGrande"?