Models |
DigitalRune Graphics extends the XNA content pipeline and provides special content processors for models. This section explains how to load a model.
This topic contains the following sections:
You can add a model to the content project as usual:
By default, a model in XNA is processed using the content processor "Model - XNA Framework". But DigitalRune Graphics uses a more advanced runtime representation and therefore requires a different content processor:
At this point the model can already be loaded and rendered. However, it will not use any special materials and can only be rendered using the XNA BasicEffect or SkinnedEffect. If the game uses an advanced render pipeline, such as a deferred renderer, additional data needs to be specified.
DigitalRune Graphics uses XML files to define additional data for models:
Take a look at the samples included in the download package.
At runtime the model can be loaded just like any other asset in XNA.
// Load a model. ModelNode myModel = game.Content.Load<ModelNode>("MyModel");