1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

VISL Unveiled

Discussion in 'Tools programming' started by CGuima, 20/2/09.

  1. CGuima

    CGuima

    Joined:
    16/4/07
    Messages:
    3
    Country:
    brazil
    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
  2. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,579
    Country:
    netherlands
    Thanks for the addition.
  3. CGuima

    CGuima

    Joined:
    16/4/07
    Messages:
    3
    Country:
    brazil
    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
  4. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,579
    Country:
    netherlands
    Hi,

    So you are saying:

    Code:
    float  precipitation_offset
    float  specular_bloom_floor
    float  ambient_light_scale
    float  (?)
    Should become:

    Code:
    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.
  5. CGuima

    CGuima

    Joined:
    16/4/07
    Messages:
    3
    Country:
    brazil
    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
  6. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    20,579
    Country:
    netherlands
    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 :).

Share This Page