PDA

View Full Version : VISL Unveiled


CGuima
20 Feb 2009, 14:24
After a long and dark age, I could build a VISL section on a MDL file. It is a list Riff section that can contain four section types: VISS, VINS, VISC and VINC. I put the stuff at the Wiki FSX MDL Format page.

Greetings,

CGuima

arno
20 Feb 2009, 15:33
Thanks for the addition.

CGuima
26 Feb 2009, 14:24
You are welcome.

By the way, I think that are a mistake on the MATE section description at the Wiki. I found this stuff:

typedef struct _MDLMaterial
{G2DMATERIAL flagG2DMaterial;
G2DMATERIAL2 flagG2Dmaterial2;
INT32 iDiffuseTextureIndex;
INT32 iDetailTextureIndex;
INT32 iBumpTextureIndex;
INT32 iSpecularTextureIndex;
INT32 iEmissiveTextureIndex;
INT32 iEnvironmentTextureIndex;
INT32 iFresnelTextureIndex;
D3DCOLORVALUE stDiffuseColor;
D3DCOLORVALUE stSpecularColor;
float fSpecularPower;
float fDetailScaleFactor;
float fBumpScaleFactor;
float fEnvironmentLevelScaleFactor;
float fPrecipitationOffsetValue;
float fSpecularMapPowerScaleFactor;
float fSpecularBloomFloor;
float fAmbientLightScale;
G2DBLEND iSourceBlend;
G2DBLEND iDestinationBlend;
G2DCOMPARE iAlphaTestCompareFunction;
float fAlphaTestCompareThreshold;
float fFinalAlphaBlendFactor;
} MMCKMATERIAL, *PMMCKMATERIAL, *LPMMCKMATERIAL;

As there are another stuff at Wiki, will you please ask the first contributor to confirm my discovery?

Thanks in advance.

CGuima

arno
26 Feb 2009, 16:22
Hi,

So you are saying:

float precipitation_offset
float specular_bloom_floor
float ambient_light_scale
float (?)

Should become:

float precipitation_offset
float specular_scale_factor
float specular_bloom_floor
float ambient_light_scale

I must say that I did not try to read those parameters yet. So I guess we should make a test object where we know the value of those parameters and then it should be quite easy to verify which source is right.

CGuima
01 Mar 2009, 03:43
Hello Arno,

Yes, this is the difference I find through tests and comparisons between X files, Xml files and MDL files.

However, as a diferent result was found, I imagined that an analysis by the team would be more cautious.

Anyway, I hope to have contributed, despite minimaly, with the great work that already was made.

Greetings,

CGuima

arno
17 Mar 2009, 16:37
Hi,

While we are talking about the material data, does anybody know the complete enumeration for the emmisive mode setting?

On the Wiki we now have:

0x00000010: Emissive Mode: AdditiveNightOnlyUserControlled
0x00000040: Emissive Mode: MultiplyBlend
0x00000080: Emissive Mode: MultiplyBlendUserControlled
0x00000100: Emissive Mode: Additive
0x00000200: Emissive Mode: AdditiveUserControlled

But the complete list you can choose from is:

AdditiveUserControlled
MultiplyBlendUserControlled
BlendedUserControlled
AdditiveNightOnlyUserControlled
AdditiveUser
MultiplyBlendUser
BlendedUser
AdditiveNightOnlyUser

I think it was with one of the SDK updates that this list got extended. So I expect that more flags have been added to the MaterialFlags2. Does anybody have information on this already, else I have to figure it out by trial and error :).