Tutorials

This page contains links to tutorials or instructions.

How Do I Get 3D Models From Blender In To XNA?
Start here: http://blog.diabolicalgame.co.uk/2011/07/before-animating-with-blender.html
Then read: http://blog.diabolicalgame.co.uk/2011/07/exporting-animated-models-from-blender.html
Ask here: http://forums.create.msdn.com/forums/p/83172/503163.aspx#503163
or here: http://forums.create.msdn.com/forums/p/68149/416081.aspx#416081



How Do I Start Using Blender To Create 3D Models?
http://xna-uk.net/blogs/randomchaos/archive/2011/05/23/blender-2-57b-amp-xna-4-0-part-i.aspx
http://xna-uk.net/blogs/randomchaos/archive/2011/05/26/blender-2-57b-amp-xna-4-0-part-ii.aspx
http://xna-uk.net/blogs/randomchaos/archive/2011/05/26/blender-2-57b-amp-xna-4-0-part-iii.aspx



How Do I Weight Paint A Model In Blender?
http://blenderartists.org/forum/showthread.php?205812-Skinning-Weight-Painting-with-Blender-2.5
or
http://eklq.net/skinning-weight-painting-in-blender-2-5/?utm_source=twitterfeed&utm_medium=facebook&utm_campaign=Feed%3A+Eklectique+%28Eklectique%29


What Is Weight Painting And Why Do I Need It?
When you animate a model with bones you need some way to tell the model which vertices to deform depending on which bones you move.  That is known as adding a weight to a bone.  Many 3D modelling programmes allow you to paint those weights on to the vertices as an alternative to manually adding each vertex and the weight to a bone group.

How Do I Animate In Blender?
For XNA it is likely that all you need is to edit Actions and add keyframes however you need a brief understanding of the workflow to avoid some confusion.  See Non-Linear Animation (NLA): http://aligorith.blogspot.com/2010/10/clarifying-animation-workflow-in.html
There are also some things you must do before animating to ensure that your animations can be exported:  http://blog.diabolicalgame.co.uk/2011/07/before-animating-with-blender.html

Tip To Find An Orphan Edge In Blender:
That's an edge that does not form part of any face:
http://blog.diabolicalgame.co.uk/2011/07/vertex-information-missing.html


How Do You UV Unwrap In Blender?
My choice of settings to create the UV map for my models:
http://blog.diabolicalgame.co.uk/2012/03/3d-modelling-reminders-uv-unwrap.html


How Do I Bake In Ambient Occlusion Using Blender?
This is the 3D shadow effect to make corners look darker.  It is used by artists to make drawings and models look nicer:
http://blog.diabolicalgame.co.uk/2011/10/ambient-occlusion-baked-in.html




How Do I Create Artistic Textures For Models?
These are tutorials for various techniques that help to make the textures on 3D models:
Collection: http://beeex.net/photoshop/tutorials-photoshop/77-essential-photoshop-techniques-for-photo-realistic-textures
Adding scratches: http://www.game-artist.net/forums/vbarticles.php?do=article&articleid=22
Some scratch brushes for GIMP: http://chrisdesign.deviantart.com/art/32-Big-GIMP-Scratch-Brushes-261993270 or http://www.texturemate.com/content/scratches-1-brush-pack-photoshop-or-gimp or http://www.texturemate.com/content/scratches-2-brush-pack-photoshop-or-gimp


What File Format Do I use For Textures?
TGA or PNG.
I have found it difficult to confirm why TGA is still the most commonly used texture file type for modelling.  Many years ago it was the only choice with an alpha channel but that is not true now (2012.)
I like PNG which creates smaller files on disk.  As far as I can tell it's only limitation is that it is always a 32 bit colour format (R8 G8 B8 A8).  I have not had any problems using it and it includes an alpha channel.
The only disadvantages I can find are many years old and probably meaningless today:
All other formats have significant disadvatages: http://www.conitec.net/beta/fileformats.htm


What Is An Alpha Channel?
This is extra information in an image file.  It can be used for anything by the rendering applications but almost invariably now days it is used for transparency in drawing packages.
The alpha channel is exactly the same as the Red (R), Green (G) and Blue (B) information.  In a 32bit colour image it is 8bit.  A value from 0 to 255 the same as the colour channels.  For transparency 255 is solid and 0 is completely see through.
You often see it written as RGBA or ARGB where A is the position of the alpha channel in the groups of 8 bits making up the 32 bit colour field.


How Can I Create 2D Backgrounds?
Some great tutorials for using GIMP: http://mygimptutorial.com/


What Do The Parameters Of DrawIndexedPrimitives Mean?
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.graphicsdevice.drawindexedprimitives.aspx
Now please explain the meanings?
http://tomsdxfaq.blogspot.com/2002_05_01_tomsdxfaq_archive.html#77028718
http://www.gamedev.net/topic/428516-solveddrawindexedprimitives-parameters/
And what happens if the vertex index is outside the range of the vertex buffer?
I struggled to find an official answer but the following are the closest I found:
http://www.opengl.org/registry/specs/ARB/draw_elements_base_vertex.txt
http://msdn.microsoft.com/en-us/library/bb174369.aspx
The response to my question on this was that it is 'Undefined' in DX9 but defined in DX10:
http://xboxforums.create.msdn.com/forums/p/83842/505405.aspx


How Do I Blend Between Animations With The XNA Skinning Sample?
You have to write some more code but here is a fourm post with some: http://xboxforums.create.msdn.com/forums/p/81435/491878.aspx#491878



How Can I Prevent Windows From Using the Sticky and Filter Keys During My XNA Game?
I slightly modified some code converted from C++ to C# and I posted it back to the same forum I got it from.  See here:  http://stackoverflow.com/questions/734618/disabling-accessibility-shortcuts-in-net-application/11283551#11283551


How Do I Learn to Programme Windows Phone 7?
See this free e-Book: http://charlespetzold.com/phone/index.html


What do the Xbox Code 3, 4 and 7 errors mean?
These only happen on the Xbox.
See these posts:
http://xboxforums.create.msdn.com/forums/p/62991/386641.aspx
http://stackoverflow.com/questions/8514993/code-4-and-code-7-errors-in-xna
http://xboxforums.create.msdn.com/forums/t/21988.aspx
http://xboxforums.create.msdn.com/forums/p/107756/643402.aspx
This is the little I know:
Code 3 errors are anything that XNA does not know how to catch.  These are hard to find.  Letting a guest profile select and change storage is one thing that can cause this.
Code 4 errors are usually disk drive storage or guide related. Add better error trapping, usually a try/catch wrapper round any guide code.
Code 7 tend to only come up during testing. If my memory serves me correctly it happens when you log out of the developer profile that you started the game with.


What other sites have XNA tutorials?
There are several but here is a good start:
http://rbwhitaker.wikidot.com/start


What's a Markdown (.md)  file and how do I write them?
This is a text markup style that is readable in plain text or formatted and easily converted to simple HTML to view in a web page.  Commonly used for README files.  All you need to know is on wikipedia:
http://en.wikipedia.org/wiki/Markdown