The 3D game model object is made up of different meshes. In a real 3D game development, sometimes you want to locate the moving mesh and see the bounding wireframe. This will help you to control the designated mesh more accurately. In this recipe, you will learn how to draw and highlight the mesh of the model individually.
The following steps will help you understand how to highlight different parts of a model for better comprehension of model vertex structure:
1. Create a Windows Phone Game project named
HighlightModelMesh
and changeGame1.cs
toHighlightModelMeshGame.cs
. Then, add a newMeshInfo.cs
file to the project. Next, add the model filetank.fbx
and font filegameFont.spritefont
to the content project. After that, create a Content Pipeline Extension Library namedMeshVerticesProcessor
and replaceContentProcessor1.cs
withMeshVerticesProcessor.cs
.2. Define the
MeshVerticesProcessor
inMeshVerticesProcessor.cs
ofMeshVerticesProcessor...