dev in the making

game development, maya and code by brainzizi

Posts Tagged ‘content pipeline

Export Maya’s custom attributes to XNA

leave a comment »

If I only knew it was this easy…

I’m doing a spaceship shooter game, and I encountered a situation where the only solution was to write a custom xml file next to every one of my models. So I started a content pipeline extension project and began twiddling. I inherited the ModelProcessor to load info from my custom xml file, and I saw a OpaqueData dictionary in the NodeContents so I decided to google it.

With some help from http://blogs.msdn.com/b/etayrien/archive/2007/03/22/opaque-data-from-max-and-maya.aspx I got exactly what I wanted without the xml info file – getting extra information from Maya to XNA.

As the link says, soo

  • 1. Add a custom attribute to a mesh in Maya
  • 2. Read it in the OpaqueData
  • 3. ???
  • 4. Profit!

Simple as that! What you actually want to do in step 3 is pass on that extra information in a Model.Tag, or Mesh.Tag from the content pipeline to your game.

Advertisements

Written by brainzizizi

07.16.2010 at 13:45