Welcome to MSDN Blogs Sign in | Join | Help

November 2006 - Posts

Customizing how models build their textures

When the content pipeline builds a model, by default it will use the ModelTextureProcessor to convert all the textures used on that model. There are many reasons why you might want to override this behavior: You might want to change the output texture

Flattening unwanted bones

Sometimes it is useful to have multiple bones and meshes inside a single model (see my previous post), but other times this just causes needless complexity. All that messing around with Model.CopyAbsoluteBoneTransformsTo and setting the effect World matrix

Models, meshes, parts, and bones

If you look inside the XNA framework Model class, you will see that it contains a Meshes property holding a collection of ModelMesh instances. If you look inside the ModelMesh class, you will see that each one contains a MeshParts property holding a collection

SpriteBatch and renderstates

If you are mixing 3D rendering with 2D objects using SpriteBatch, you may notice that your 3D graphics no longer draw correctly after you have rendered sprites. This is because the SpriteBatch changes several device renderstates to values that may not

Debugging the content pipeline

Content pipeline importers and processors run inside Visual Studio as part of building your game. This means you can't just debug into them like you would for normal game code. Fortunately, the CLR provides a handy way of hooking a debugger up to any

Build it ahead of time

One of the biggest differences between the XNA content pipeline and the way many people are used to loading their game assets is that with the content pipeline, games no longer read directly from standard asset formats like .X, .BMP, and .FX. Instead,

Add the mesh, not the textures

Here's a common mistake for people new to the Content Pipeline... If you have a mesh file that references a bunch of texture files, and you want to use this with XNA, you only need to add the mesh to your C# Express project. When we build the mesh we

XNA Beta 2

Finally! Beta 2 is available for download from http://msdn.microsoft.com/directx/XNA/ This includes the Content Pipeline, so now you have that in your hands, I'll be posting and answering questions about how the whole thing works. Let me know if there
 
Page view tracker