Jump to content
  • Dirktator
    Dirktator

    New building format in upcoming patch XML

    Hi everyone, just wanted to give you a heads up on an upcoming change in the data format for building assets in the Cities of Tomorrow update.

    A primer on the source assets

    This isn't directly relevant to the change but I think the background will be useful. I'll be using this building http://i.imgur.com/3ztFfH6.png for the sample assets.

    • Building facades (color masks, specular, heightmap, etc.) are processed from art source and create the facade textures used by the game.

      Example assets: 0x00000000!0x544bceb8.0x2f4e681c 0x00000000!0xb970e986.0x2f4e681c 0x00000000!0x984c19d8.0x2f4e681c

    • Interior map atlases.

      Example asset: 0x00000000!0x7d155619.0x2f4e681b

    • Palettes.

      Example asset: 0x00000000!0xdd762f1f.0x2f4e681b

    • Buildings.

      Example asset: 0x00000000!0xf2c144d4.0x2f4e681b

      * Each building is split into many materials in Maya; each material refers to a section of the facade, interior map, and palette.

      * Each material also has tuning parameters for all of the above, such as how big the interior rooms are, and some seeding data for the RNG that controls how the lights turn on and off.

    The old way:

    • Artist clicks to export the building--at this point my tools take over.

    • We grab the parameters from each material, munge & compress them, and put them into per-vertex data.

    • We glue all the materials together, and make a single material that just references the relevant textures.

    • Animated buildings have traditional skinning data, which we convert at runtime to a simpler format

    Vertex format: Positon (float3), normal (ubyte4), tangent (ubyte4), texture coordinates 1 and 2 (texcoord0 float4), material data in the rest of the channels (color ubyte4, texcoord1 short4N, texcoord2 short4N, texcoord3 float4), and optionally skinning data (indices, weights)

    The new way:

    • Artist clicks to export the building--at this point my tools take over.

    • We grab the parameters from each material, munge them, and create a new uncompressed floating point texture with one column per material in the source, and 4 rows to hold this data.

    • We glue all the materials together, and make a single material that just references the relevant textures.

    • The material index and the RNG seed for the interiors are stored in the color channels of the new building

    • In case of animated buildings, we process the animation here and strip the skinning data from the vertices.

    Vertex format: Position (float3), normal (ubyte4), tangent (ubyte4), texture coordinates 1 and 2 (texcoord0 float4), material index & interior RNG (color ubyte4, 2 unused channels), optional animation data (texcoord1 ubyte4, texcoord2 short4).

    And the material data that used to be in the vertices is stored in a texture that looks kind of like this:JYhonXy.png. (lossy img since it doesn't have float values <0 or >1)

    Happy modding! I'm hopeful you'll all be able to come up with some amazing tools for creating new building models.


    Sign in to follow this  
    Sign in to follow this  

    User Feedback


     

    I'm hopeful you'll all be able to come up with some amazing tools for creating new building models.

    I was really hoping Maxis would provide the tools :(

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In  

    Already have an account? Sign in here.

    Sign In Now


×

volume5_md.pngPlease help us reach our September Goal!

Your contribution helps keep Simtropolis up and running!

Please consider a donation today.

We need to continue to raise enough money each month to pay for expenses which includes hardware, bandwidth, software licenses, support licenses and other necessary 3rd party costs.

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation goes to help us keep the site running free.

Enjoy the site!

OK - See STEX Collections