Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

Standard Importers and Processors

XNA Game Studio ships with standard Content Pipeline importers and content processors that support various common art-asset file formats.

Importers and content processors are implemented as assemblies. In addition to the standard ones provided by XNA Game Studio and listed below, you can also use custom importers and processors that you or other third parties develop. Use the Properties window to assign an appropriate importer and processor for each game asset you add to your game project (see Game Asset Properties for more information).

Standard Importers

The following table describes the standard importers shipped with XNA Game Studio and the type of game asset each supports.

NameType NameOutput TypeDescription
Autodesk FBX - XNA FrameworkFbxImporterNodeContent

Imports game assets specified with the Autodesk FBX format (.fbx).

This importer is designed to work with assets exported with the 2006.11 version of the FBX exporter.

Effect - XNA FrameworkEffectImporterEffectContentImports a game asset specified with the DirectX Effect file format (.fx).
Sprite Font Description - XNA FrameworkFontDescriptionImporter FontDescription Imports a font description specified in a .spritefont file.
Texture - XNA FrameworkTextureImporterTextureContent Imports a texture. The following types are supported: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga.
X File - XNA FrameworkXImporterNodeContentImports game assets specified with the DirectX X file format (.x). This importer expects the coordinate system to be left-handed.
XACT Project - XNA FrameworkN/AN/A

Imports game audio specified in the Microsoft Cross-Platform Audio Creation Tool (XACT) format (.xap).

Bb447762.note(en-US,XNAGameStudio.20).gifTip
Associating an .xap file with XACT allows you to automatically open XACT when editing any .xap file. Associate the file in XNA Game Studio by right-clicking the .xap file in Solution Explorer and clicking Open With. Once the dialog box has opened, select the XACT-specific string and then click Set As Default.If the XACT-specific option is not available, XACT must be run before this option appears. The application is available from the Microsoft XNA Game Studio group. From the Start Menu (click Tools, and then click Microsoft Cross-Platform Audio Creation Tool (XACT)).
XML Content - XNA FrameworkXmlImporterobject

Imports XML content used for editing the values of a custom object at runtime. For instance, you could pass XML code to this importer that looks for the specified property of a custom type and changes it to the specified value. You could then process the custom object with a processor or pass it to your game untouched using the No Processing Required processor.

This importer is designed for scenarios like importing an XML file that describes game data at runtime (similar to the Sprite Font Description importer) or importing terrain data in an XML file that is then passed to a processor that generates a random terrain grid using that data.

Standard Content Processors

XNA Game Studio ships with a variety of processors that support several common game asset types. Many of the standard processors, such as the TextureProcessor, support parameters for modifying the default behavior of the processor. For more information, see Parameterized Processors.

The following table describes the standard processors and the type of game asset each supports.

NameType NameInput TypeOutput TypeDescription
Effect - XNA Framework EffectProcessor EffectContent CompiledEffect Compiles the string in EffectContent to the appropriate platform.
Model - XNA Framework ModelProcessor NodeContent Class ModelContent Class

A parameterized processor that outputs models as a ModelContent Class object.

Available parameters:

  • Color Key Color - Any valid Color. Magenta is the default value.
  • Color Key Enabled - A Boolean value indicating if color keying is enabled. The default value is true.
  • Generate Mipmaps - A Boolean value indicating if mipmaps are generated. The default value is false.
  • Generate Tangent Frames - A Boolean value indicating if tangent frames are generated. The default value is false.
  • Resize Textures to Power of Two - A Boolean value indicating if a texture is resized to the next largest power of 2. The default value is false.
  • Scale - Any valid float value. The default value is 1.0.
  • Swap Winding Order - A Boolean value indicating if the winding order is swapped. This is useful for models that appear to be drawn inside out. The default value is false.
  • Texture Format - Any valid SurfaceFormat value. Textures are either unchanged, converted to the Color format, or DXT Compressed. For more information, see TextureProcessorOutputFormat.
  • X Axis Rotation - Amount, in degrees of rotation. The default value is 0.
  • Y Axis Rotation - Amount, in degrees of rotation. The default value is 0.
  • Z Axis Rotation - Amount, in degrees of rotation. The default value is 0.
No Processing Required PassThroughProcessorObjectObject

Performs no processing on the file.

Select this processor if your content is already in a game-ready format (for example, an externally prepared DDS file) or a specialized XML format (.xml) designed for use with XNA Game Studio.

Sprite Font Description - XNA Framework FontDescriptionProcessor FontDescription SpriteFontContent Converts a .spritefont file specifying a font description into a font.
Sprite Font Texture - XNA Framework FontTextureProcessor TextureContent SpriteFontContent

A parameterized processor that outputs a sprite font texture as a SpriteFontContent object.

Available parameters:

  • First Character - Any valid character. The space character is the default value.
Sprite Font Texture - XNA Framework FontTextureProcessor Texture2DContent SpriteFontContent Converts a specially marked 2D bitmap file (.bmp) into a font. Pixels of Color.Magenta are converted to Color.TransparentBlack.
Texture - XNA Framework TextureProcessor TextureContent Class TextureContent Class

A parameterized processor that outputs textures as a TextureContent Class object.

Available parameters:

  • Color Key Color - Any valid Color. Magenta is the default value.
  • Color Key Enabled - A Boolean value indicating if color keying is enabled. The default value is true.
  • Generate Mipmaps - A Boolean value indicating if mipmaps are generated. The default value is false.
  • Resize to Power of Two - A Boolean value indicating if a texture is resized to the next largest power of 2. The default value is false.
  • Texture Format - Any valid SurfaceFormat value. Textures are either unchanged, converted to the Color format, or DXT Compressed. For more information, see TextureProcessorOutputFormat.
XACT Project - XNA FrameworkN/AN/AN/AGenerates audio assets from an XACT project.

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.