dev in the making

game development, maya and code by brainzizi

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


Written by brainzizizi

07.16.2010 at 13:45

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: