MaxTextureLayers [message #52253] |
Mon, 22 June 2009 12:02 |
|
JohnDoe
Messages: 3007 Registered: October 2007
|
Retired
|
|
|
*** Moderator's Note ***
This is for intermediate modding reference and is not recommended for new modders.
Any broad/vague/stupid questions will get deleted on sight. - JohnDoe
This is in regards to the MaxTextureLayers value in the Materials tab of the mesh entries in the graphics.big. I've figured this damned thing out finally.
It is bitwise, 1|2|4|8|n (like the body slots bit in the CAppearanceModifierDef), each with a specific meaning. Adding them gives the desired result.
1 - Standard.
2 - Bump map.
4 - Spec map.
8 - Alpha map.
So, this means:
1 - Standard (all will have this one).
3 - Standard + Bump map.
5 - Standard + Spec map.
7 - Standard + Bump map + Spec map.
9 - Standard + Alpha map.
Examples:
1 - MESH_BEGGAR_HAT_01
3 - MESH_THUNDER_SHIELD
5 - MESH_SISTERS_ARTEFACT
7 - MESH_TROPHY_PUNCH_CLUB_01
9 - MESH_GHOST_SWORD_01
This leads me to believe that:
11 - Standard + Bump map + Alpha map
13 - Standard + Spec map + Alpha map
15 - Standard + Bump map + Spec map + Alpha map
Let me clear up what the rest of this stuff means.
Material Name - - - - - [Name of the submesh]
Material ID - - - - - - [Numeric ID of the submesh]
Base Texture ID - - - - [textures.big numeric ID for base texture]
Bump Map ID - - - - - - [textures.big numeric ID for bump texture; 0 = none]
Specular Map ID - - - - [textures.big numeric ID for reflective texture; 0 = none]
Max Texture Layers- - - [Bitwise code explained above]
Material Alpha Enabled- [Boolean; 0 = Solid, 1 = Transparent/Translucent texture is used]
Glow Strength - - - - - [Self-illumination; 0 = none]
Unknown1- - - - - - - - [textures.big numeric ID for alpha mask texture; 0 = none]
Cloth Enable- - - - - - [Boolean; 0 = Non-dynamic mesh, 1 = dynamic mesh is used]
Unknown3- - - - - - - - [Unknown boolean; something to do with dynamic interactions]
Unknown4- - - - - - - - [Boolean; 0 = Standard, 1 = DegenerateTriangle]
Stuff that still needs explaining:
Custom bump maps.
Specular maps are what the mesh will reflect in-game. Most use black with a few white lines, and in-game it just shows those white lines. There are others though, like the fresco dome crystal, that has a panoramic shot of the fresco dome, so it reflects that.
Material Alpha Enabled - Simple stuff. If the submesh is using any level of transparency (alpha), this value needs to be set to 1 or it will not read the alpha channel. Also note that the texture itself needs to be DXT3/Alpha:1 or it won't work anyway.
Glow Strength - The bigger the number, the brighter it gets.
Unknown1/Alpha mask/map - This acts as a mask layer over the base texture, setting alpha levels. Look at the ghost sword for an example.
Cloth Enable/Unknown3/Unknown4 - Anything you import into the graphics.big is going to have all of these set to 0. Period.
[Updated on: Mon, 22 June 2009 23:05] Report message to a moderator
|
|
|
|
Re: MaxTextureLayers [message #52260 is a reply to message #52255] |
Mon, 22 June 2009 20:33 |
|
JohnDoe
Messages: 3007 Registered: October 2007
|
Retired
|
|
|
OldBoy wrote on Mon, 22 June 2009 16:12 | Nice John. Guess this should be stickied and added to the wiki (or at least that).
| I'll settle for in your thread next to other things about model information. OldBoy wrote on Mon, 22 June 2009 16:12 | On the topic itself; the name MaxTextureLayers isn't correct, so it seems. Can't think of a correct name right now though.
Also, as we discussed some time back; it seems that some graphic cards have trouble with spec maps (at least mine does).
| I can't think of a good name for it either. But it can't be fixed with an xml edit like Marcopolo thought, so this will kind of give people a better idea about it.OldBoy wrote on Mon, 22 June 2009 16:12 | Did you come across anything higher then 9, or is it pure speculation?
| It's just speculation, but it's "educated" speculation, would make perfect sense if that's the way it worked. Then again... it is LionHead... I should correct my first post, I said bitwise because I remember Kesh saying something of the sort, but I didn't write this information correctly.
[Updated on: Mon, 22 June 2009 22:05] Report message to a moderator
|
|
|
|
Re: MaxTextureLayers [message #52263 is a reply to message #52261] |
Tue, 23 June 2009 05:40 |
|
I may in fact have some time to do a little testing later on today. I'll tell you the results
"All of the work, and none of the play, will surely provide for a speedy decay"
|
|
|