Post Fri Aug 03, 2007 8:44 pm

Tutorial - Animated Materials and Flag Reference for all FL

These are my notes on Freelancers materials, they may be of interest to you. Please feel free to contribute your own notes so we can improve this reference.

Freelancer Compatible Formats:
Uncompressed Targa TGA, 1 alpha channel
DXT 1-5 confirmed
RGB 888 (another name for targa? - see no_invulnerability.3db for more info)
Mystery formats(context suggests they are more format types):
DAOP
DAOT
DAAA
DAAL
DAA1 = ?
DAA4 = RGB 4444?
DAA8 = RGB 8888?

note:
"Bad Material ID" as a material name will take the place of bad materials if present

Texture
'Fade 1D' Texture Wrap Mode - Dt_flags
Diffuse Texture Name - Dt_name
Emissive Texture Wrap Mode - Et_flags
Emissive Texture Name - Et_name
Detail Texture Wrap Mode - Bt_flags
Detail Texture Name - Bt_name
Nomad Texture Wrap Mode - nt_flags
Nomad Texture Name - nt_name

Texture Wrap Mode Flags(for dt_flags,bt_flags,nt_flags etc):
80 (Detailmap)
74 (planetary "Dm0/1" detailmap)
64 (normal UV)

Odd:
AtmosphereMaterial
BtDetailMapMaterial (requires Dm, Tilerate
BtDetailMapTwoMaterial
IllumDetailMapMaterial
Lightmap
Masked2DetailMapMaterial (requires two Dm0/Dm01, tilerate 0, tilerate 1)
Nebula
NebulaTwo
NullMaterial
Detail2Map2DmlMsk2PassMaterial (requires Dm1, Tilerate)
BtDetailMapMaterial (difference between DcDtBt and this unclear)
BtDetailMapTwoMaterial (?) could these be primitive 'bump' maps?


Single Pass Material types: (supports features)
EcEt - Emissive Color, Emissive Texture
DcDt - Color, Texture, Animation:yes
DcDtBt - Color, Texture, Detail Mape, Animation:no
DcDtEc - Color, Texture, Emissive Colore, Animation:yes
DcDtEt - Color, Texture, Emissive Texture, Animation:no
DcDtEcEt - Color, Texture, Emissive Color, Emissive Texture, Animation:no
DcDtOcOt - Color, Texture, Opacity, Opacity Texture, Animation:yes
DcDtEcOcOt - Color, Texture, Emissive Color, Opacity, Opacity Texture, Animation:yes

Single Pass Two Material types: (supports features)
DcDtTwo - Color, Texture
DcDtBtTwo - Color, Texture, Detailmap
DcDtEtTwo - Color, Texture, Emissive Texture
DcDtEcEtTwo - Color, Texture, Emissive Color, Emissive Texture
DcDtEcOcOtTwo - Color, Texture, Emissive Color, Opacity, Opacity Texture
DcDtOcOtTwo - Color, Texture, Opacity, Opacity Texture
DcDtBtOcOtTwo - Color, Texture, Detailmap, Opacity, Opacity Texture

Properties:
Scale
Alpha
Fade Off
Fade

feature definitions:
emissive textures project or 'emit' light onto the target texture, and support color and alpha
opacity textures are opaque/transparent based on pixel brightness, dark = opaque and light = transparent, and support alphas?
diffuse textures are normal textures, they support color and interpolated(blended) alphas in DDS
detailmap textures are tiled over the edges of target textures and support masking and illumination (emissive)

Colorize types:
Diffuse Color - Dc
Specular Color - Sc
Specular Power - Sp
Ambient Color - Ac
Emissive Color - Ec
Opacity - Oc


Material Animation values are just guesses, delta's are probably accurate

MaterialAnim
Shared Material name (one will be normal, the other an animation)
MACount:
(integer)

# of UV animations in integer format

MAFlags:
unknown purpose, typical values are:
(integer)
0
1
2
6
MADeltas:
VU animation, Deltas are composed of five float values in UV map form, the MACount determines how many will play:
(float array)
Length in Seconds
X-movement U
Y-movement U

X-movement V
Y-movement V

examples:
(scale X up 1) -1, 0, 1, 0
(scale X down 1) 1, 0, -1, 0
(move X 1 length) 1, 0, 0, 0

its important to keep the way textures will move in mind when mapping them.
MAKeys:
(float array)
1. skip forward and begin animation at % of the specified length in seconds
2. end animation at time %
3. unknown
4. unknown




...we are as a people inherently and historically opposed to secret societies, to secret oaths, and to secret proceedings- John F. Kennedy

Edited by - Cold_Void on 8/3/2007 9:45:23 PM