Graphics Reference
In-Depth Information
Getting ready
This recipe assumes that a right-handed coordinate system is being used; see the previous
recipe, Using a right-handed coordinate system .
Before we get started, there are a few files we need from the downloaded package and
a class within the Common project we will review.
1.
The Common.Mesh class is a C# implementation for deserializing the compiled
mesh object ( .CMO ) that is generated by the Visual Studio graphics content pipeline.
Most notably, this class includes the following static method: Common.Mesh.
LoadFromFile . This class is partly based on a C# port of the ModelLoadCMO class
in DirectXTK ( https://directxtk.codeplex.com ).
2.
The MeshContentTask.targets and MeshContentTask.props files must be
copied to the same directory as your solution file.
3.
The Ch03_02LoadMesh\Male_base_mesh.fbx file is the example mesh we will be
loading for this recipe.
4.
Alternatively, you can export any selected objects within Blender to Autodesk FBX by
navigating to File | Export | Autodesk FBX (.fbx) within Blender.
5.
On the resulting export configuration panel, tick Selected Objects and select -Z
Forward (for right-handed coordinates) as shown in the following screenshot:
Blender Export FBX configuration for use with Visual Studio graphics content pipeline
6. Enter a filename and click on Export FBX.
The completed project for this recipe can be found in the code bundle of this chapter,
Ch03_03LoadMesh , downloadable from Packt's website.
 
Search WWH ::




Custom Search