[Search]  Search   [Groups]  Back to EA Forum Index  
New building format in upcoming patch  XML
SimCity  > Community-Generated Content
Author Message


Developer
[Avatar]
Joined: 09/30/2013 13:38:03
Messages: 8
Offline

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:. (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.




Joined: 07/19/2013 15:41:45
Messages: 627
Offline

Thank you for sharing.. I made sure oppie and proc will see this as soon as they get online again in the morning .. Thanks for all your help Ryan

Jeff




Joined: 05/01/2013 21:16:39
Messages: 7
Offline

And here I am, trying to replicate this workflow in 3DS max.
You guys went wacko with this workflow.
I'd love to spend a day in the office!




Joined: 07/19/2013 15:41:45
Messages: 627
Offline

crimsondesigns wrote:And here I am, trying to replicate this workflow in 3DS max.
You guys went wacko with this workflow.
I'd love to spend a day in the office!


We are trying to plan a devtest community gathering actually hahah




Joined: 03/18/2013 11:53:36
Messages: 1
Offline

It doesn't matter how often you patch, sim city 2013 is a failure




Joined: 05/01/2013 21:16:39
Messages: 7
Offline

XoXiDe124 wrote:
crimsondesigns wrote:And here I am, trying to replicate this workflow in 3DS max.
You guys went wacko with this workflow.
I'd love to spend a day in the office!


We are trying to plan a devtest community gathering actually hahah


I'm sure that would mean being in a city that I cannot currently afford to be in




Joined: 03/15/2013 17:56:03
Messages: 29
Offline

I do a little modeling....I'd like to mess around with some buildings for this game. I use Cinema4D, is there anything I can do to participate?




Joined: 07/19/2013 15:41:45
Messages: 627
Offline

crimsondesigns wrote:
XoXiDe124 wrote:
crimsondesigns wrote:And here I am, trying to replicate this workflow in 3DS max.
You guys went wacko with this workflow.
I'd love to spend a day in the office!


We are trying to plan a devtest community gathering actually hahah


I'm sure that would mean being in a city that I cannot currently afford to be in


I'm just being honest. For key members of the community whom wish to be of value and help the engine and game become something more and greater than it is takes a personal loyalty and dedication to improvement and a lot of selfless mentality honestly.

Its something that a few of us are actually looking into as the invite had been made if we can arrange it and we are looking into options and ideas on that subject that's just a fact.





Joined: 07/19/2013 15:41:45
Messages: 627
Offline

benjinewell wrote:I do a little modeling....I'd like to mess around with some buildings for this game. I use Cinema4D, is there anything I can do to participate?


Oppie is the best one to gather information from at this point and procskalone however he has not published many of his information in tutorial format to help the community yet and Oppie is planning on doing just that.

We have about 4 modders whom are going to be community active soon that people are familiar with and one whom has worked with all the modders but more in the background that we are trying to get back into the game to work on UI / UX data mods for users.

Tools used are Maya and 3Ds along with Oppie's simcitypak.

I think that the current direction everyone is taking is helping Simcitypak become a more useful tool for such endeavors however again like all aspects this just takes time and cooperation as you are starting to now see publically and not just behind the scenes.




Joined: 05/01/2013 21:16:39
Messages: 7
Offline

I appreciate the honesty. I'd love to go. But we'll see what becomes of this anyways.

I'm currently working with Oppie to develop tools for 3DS max to aide the authoring of 3D models.
It is still early for the tool development though.




Joined: 03/15/2013 17:56:03
Messages: 29
Offline

Just to emphasize, I know at least few people aside from myself in the motion graphics industry who would love to develop buildings for the game but they only use C4D.




Joined: 05/01/2013 21:16:39
Messages: 7
Offline

benjinewell wrote:Just to emphasize, I know at least few people aside from myself in the motion graphics industry who would love to develop buildings for the game but they only use C4D.

Understood.
Many of my industry compatriots use everything but 3DS. My strengths lie there at the moment, so I help in 3DS.
Unless someone else steps up to help develop for other software, that support will have to wait.




Joined: 09/30/2013 13:57:08
Messages: 8
Offline

Thanks, Ryan! So you're saying that just now that I understand the basics of how the building models work, you're changing it all? Just kidding; I knew this was coming.

I guess I'm going to have to drastically alter my importer to handle the new way of storing material data (very clever to put it in a bitmap). Can you give any indication on which row contains which data? (I'm assuming that the actual data is stored in the RGBA channels). I'm guessing the following data will be stored in the materials texture;


  • Cropping data for bottom layer (X,Y,height, width)

  • Cropping data for top layer (X,Y,height, width)

  • Color data for top/bottom layer

  • Size/Offset data for interiors (which I don't really understand anyway)



Will the update allow backwards compatibility or will I have to modify the train station for it to work?




Joined: 05/01/2013 21:16:39
Messages: 7
Offline

Also, can you clarify the wording.
You say "in the Cities of Tomorrow update".
Will this affect non-expansion users, or is this a core update that will affect all?




Joined: 07/19/2013 15:41:45
Messages: 627
Offline

crimsondesigns wrote:I appreciate the honesty. I'd love to go. But we'll see what becomes of this anyways.

I'm currently working with Oppie to develop tools for 3DS max to aide the authoring of 3D models.
It is still early for the tool development though.


3Ds is Oppies tools of choice .. he wants me to get back into it and I think I will have to at some point. Maxis uses Maya as their primary tool however most of the interchanging parts end up working in both environments.

I remember talking to lucas ages ago and he said he used both 3DS and Maya but leaned more towards Maya.

Not sure what other tools are used

But Oppie is the father of SimCity 2013 modding so he's the one to talk to on all aspects. I admire him greatly for his efforts.
SimCity  > Community-Generated Content
Go to: