Click or drag to resize
DigitalRuneBuilding Content

DigitalRune Graphics provides new content importers and processors, which can be used in an XNA content project. This topic explains how to build assets using the new content importers and processors.

This topic contains the following sections:

Content importers

DigitalRune Graphics provides the following content importers:

Name

Type

Description

"Material - DigitalRune Graphics"

DRMaterialImporter

Imports materials. See Materials (*.drmat).

"Model - DigitalRune Graphics"

DRModelImporter

Imports models from model description files. See Model Description (*.drmdl File).

"Texture - DigitalRune Graphics"

DRTextureImporter

Imports textures. Extends and replaces the XNA Texture Importer.

Content processors

DigitalRune Graphics provides the following content processors:

Name

Type

Output Type

Description

"Material - DigitalRune Graphics"

DRMaterialProcessor

Material

Processes materials. See Materials (*.drmat).

"Model - DigitalRune Graphics"

DRModelProcessor

ModelNode

Processes models. Extends and replaces the XNA Model Processor.

"Texture - DigitalRune Graphics"

DRTextureProcessor

Texture2D, Texture3D, TextureCube

Processes textures. Extends and replaces the XNA Texture Processor.

XNA content project

The following steps are necessary to build assets using an XNA content project.

Preparing a content project

The XNA content project needs to reference the DigitalRune content pipeline extensions.

  1. Create a new or load an existing content project in Visual Studio.
  2. Right-click the content project in Visual Studio and select Add Reference...
  3. Select the Browse tab and browse to the folder containing the DigitalRune assemblies for XNA (Windows x86 builds). See Files, Folders and Dependencies.
  4. Select the following files
    • DigitalRune.Animation.Content.Pipeline.dll
    • DigitalRune.Geometry.Content.Pipeline.dll
    • DigitalRune.Graphics.Content.Pipeline.dll
    • DigitalRune.Mathematics.Content.Pipeline.dll
    and click OK.

The DigitalRune content importers and processors are now available in the content project.

Adding assets to the content project

You can add new assets (models, textures, etc.) to the content project as usual:

  1. Right-click the content project and select Add | Existing Item...
  2. Browse for the asset file and click Add.

For most assets the XNA content importers and processors are pre-selected in the Properties window. Do the following to change the content importers or processors:

  1. Select the asset in the content project.
  2. Right-click the asset and select Properties to open the Properties window.
  3. In the Properties window search for the properties Content Importer and Content Processor and select the appropriate DigitalRune importers and processors.
MonoGame content project

The following steps are necessary to build assets using MonoGame.

Preparing a content project

The MonoGame content project needs to reference the DigitalRune content pipeline extensions.

  1. Start the MonoGame Content Pipeline Tool: <DIGITALRUNE_FOLDER>\Tools\Pipeline.cmd
  2. Create a new or open an existing MonoGame content project.
  3. Select the content project (root node) in the tree view.
  4. In the Properties pane select References and click the ... button.
  5. Add references to the following DigitalRune assemblies:
    • DigitalRune.Animation.Content.Pipeline.dll
    • DigitalRune.Geometry.Content.Pipeline.dll
    • DigitalRune.Graphics.Content.Pipeline.dll
    • DigitalRune.Mathematics.Content.Pipeline.dll
    You need to select the DigitalRune assemblies for MonoGame (Windows). See Files, Folders and Dependencies.

The additional content importers and processors of DigitalRune Graphics are now available in the content project.

Adding assets to the content project

You can add new assets (models, textures, etc.) to the content project as usual:

  1. Select Edit | Add | Existing Item....
  2. Browse for the asset file and click Open.

For most assets the MonoGame content importers and processors are pre-selected in the Properties pane. Do the following to change the content importers or processors:

  1. Select the asset in the tree view.
  2. In the Properties pane search for the properties Importer and Processor and select the appropriate DigitalRune importers and processors.