PDA

View Full Version : [FS2004] Texture Bitmask


kleinjakob
14 Jul 2009, 06:15
Hello, again I have a rather difficult question, maybe someone can help me. I wasn't sure if the modeling or development tools section fits better, so I just post here and please move if I was wrong!

I've written a small tool, which modifies specific material definitions inside a mdl, to achieve effects not normally available via gmax or even .x modification. So I'm pretty much familiar with the anatomy of a material definition in a MDL (BGL Opcode &hB6), and it works out so far... and I've noticed that somehow the Chanel to which a map is applied has some distinctive modifications to the respective RGB numbers (float32), I recognize a pattern but I do not know what they mean (eg. Use RGB or alpha of map...) or how they are applied. So this is my question: Does anybody know about this "texture bitmask"?

Maybe someone can help me. Thanks, Jakob

PS I'll release this tool to the public with a complete documentation and feature preview later over at Project Opensky.

PPS For the ones following my progress on my Model Render tool: I've made some progress but nothing substantial... As I work now over at POSKY, the pace is somewhat slower, due to the amount of other projects I'm involved in now...

arno
14 Jul 2009, 14:21
Hi,

Did you see the BGLC_9 documentation? In there you will find the following specificiation of the texture type (am I right that that is what you mean with the bitmask)?

TEXTURE_VARIATIONS EQU 000000001h
TEXTURE_AIRCRAFT EQU 1t
TEXTURE_MAP EQU 2t
TEXTURE_WATER EQU 3t
TEXTURE_SKY EQU 4t
TEXTURE_GROUND EQU 5t
TEXTURE_BUILDING EQU 6t
TEXTURE_EFFECT EQU 7t
TEXTURE_DAMAGE EQU 8t
TEXTURE_NIGHTMAP EQU 000000080h
TEXTURE_SPRING TEXTEQU <(BIT3)>
TEXTURE_FALL TEXTEQU <(BIT4)>
TEXTURE_WINTER TEXTEQU <(BIT5)>
TEXTURE_HARDWINTER TEXTEQU <(BIT6)>
TEXTURE_SEASON TEXTEQU <(BIT5 | BIT4 | BIT3)>

TEXTURE2_MASK EQU 00000ff00h
TEXTURE2_NONE EQU 00000ff00h
TEXTURE2_NIGHT EQU 000000100h
TEXTURE2_REFLECT EQU 000000200h
TEXTURE2_LIGHTMAP EQU 000000300h
TEXTURE2_LIGHTMAP_A EQU 000000400h
TEXTURE2_DETAIL EQU 000000500h
TEXTURE2_SHADER EQU 000000f00h

kleinjakob
15 Jul 2009, 15:55
Thank you very, very much!

I'm very ashamed, that I haven't found it myself, as I do use the BGLC9 source html a lot for reference, but I must admit that I haven't found this section... I'm affraid the file is too large and unstructered for me to feel "home" with her...

Thanks again, and sorry for that silly question. I'll keep you updated once I can tell you more about my project...

Thanks again, Jakob