bmt2xml

A while ago someone asked about reading bml and bmt files, some form of binary XML files used by Need for Speed: Shift for material information and probably other things as well.

File Format

bmt2xml tool

Building bmt2xml

            # git clone http://git.pappkartong.se/bmt2xml.git
            # cd bmt2xml
            # make
        

Using bmt2xml

# ./bmt2xml file.bmt

Example:

# ./bmt2xml autograss_laguna.bmt 
<material name="Autograss" shader="Render\Shaders\grass_billboard.fx" technique="Grass" cull="EBFCT_NONE" fog="false" antialias="1" numparams="10">
  <shaderparam name="fadeDistances" type="EPT_VEC2">
    <value v="0 100" />
  </shaderparam>
  <shaderparam name="cornerHeights" type="EPT_VEC4">
    <value v="0 0 0 0" />
  </shaderparam>
  <shaderparam name="subPageWidths" type="EPT_VEC4">
    <value v="1 0.9 0.9 0.9" />
  </shaderparam>
  <shaderparam name="subPageHeights" type="EPT_VEC4">
    <value v="0.28 0.25 0.23 0.23" />
  </shaderparam>
  <shaderparam name="boxWorldCoordsSize" type="EPT_F32">
    <value v="16" />
  </shaderparam>
  <shaderparam name="diffuseTexture" type="EPT_TEXTURE">
    <type t="ET_STANDARD" />
    <value v="Effects\Particles\Textures\Autograss_Laguna.dds" />
  </shaderparam>
  <shaderparam name="maxAnimatedVertDisplacement" type="EPT_F32">
    <value v="0.25" />
  </shaderparam>
  <shaderparam name="transmissiveMult" type="EPT_VEC4">
    <value v="0.8 1 0.2 1" />
  </shaderparam>
  <depthparams>
    <enabled e="true" />
    <writeenabled w="true" />
  </depthparams>
  <alphatestparams>
    <enabled e="true" />
    <value v="128" />
    <function f="ETF_GREATER_THAN_OR_EQUAL" />
  </alphatestparams>
  <alphablendparams>
    <enabled e="false" />
  </alphablendparams>
  <define name="AUTOGRASS" />
</material>
        

TODO

Download

The source code for bmt2xml.

Clone the git repository

git: # git clone http://git.pappkartong.se/bmt2xml.git

Note: This is a git repository, you need git to use it.

Download using gitweb

Or download the current head bmt2xml-master-*.tar.gz using gitweb.

Uptime: 23 days, 21 hours, 9 minutes