Category: XNA Samples


I am working to extend AnimationPlayer. Here a list of what i wanna add.

  1. blending two animation clip (track/AnimationSet)
  2. blending betweens two consecutive keyframe transform (so they can be less numerous)
  3. store bone name to quick search for these uses:
    1. add some vertex to selected bone: I use these to find, for example, where a line of a blade sword is, for collision test
    2. add a transform to a bone: I use it, for example, to calculate transform of sword mesh to put it in hand of animated model
    3. set for each bones (and its soons) to use a specific clip animation (AnimationSet)
  4. inverse cinematic, for example, to rotate model head so it look at a specific direction
  5. using only one instance of the same FX file
  6. add shadow map (and post filter) and better light calculation in FX file (4 light max)

Here some pictures:



Go to site download area to see some movies: click here.

The source code will be downloadable from my blog pages when it will be completed.
At this time is not completed, I am working on other features, but not very fast, just in free time.
Source code has many dirty parts inside, because I am doing many experiments, I also will clean it before share it.
I will write here (in this post) code progressions, and also when it will be ready for download.

This sample show how to render a 3d object (textured cube) to picturebox.
You can use some keys to move camera and click to button to reset view to starting point.
If you resize form the projection matrix it is updated automatically.
It work with XNA GSE Beta 2.
Tutorial 2 – from XNA help and forum community contributes – by Toni Greco

This sample show how to load/draw 3D models and move the camera to all directions using keyboard.

It uses three kind of 3D objects:
FBX file (ship),
X file (asteroid),
low level with vertex buffer (cube).
All three cases can be rendered using standard basic effect, or HLSL fx file:
see the first rows of Game1.cs to choice which rendering type to use.
Link to download the project:
I converted the code to use in my first tutorials for my students (I teach computer science in a secondary school) to Beta 2.
 
Please feel free to write suggestions and/or use it if you like.

/// <summary>
///
Tutorial 1 – from XNA help and forum community contributes – by Toni Greco
///
_Interactive 2D graphic application_
///
_ XNA Beta 2 _
///
Features:
///
resizable window
///
toggle fullscreen/window mode (type Home-Enter)
///
control player ball with arrow keys
///
background fixed (bitmap from Beta 1 Spacewar demo)
///
XACT sounds
///
press Esc to exit
///
it shows fps using XNAExtras (the same from Beta 1)
///
it don’t try to maximize fps (vertical sync. = true) to avoid flicker in fullscreen
///
simple collision test/response circle to circle
///
sprite with transparent and semi-transparent pixels (alpha channel in dds)
///

///
Special thanks to Gary Kacmarcik sharing his
///
"Creating Bitmap Fonts using bmfontgen".
///
I used here the same version that Gary Kacmarcik wrote
///
for XNA Beta 1, but it work without changes, but remeber
///
to make its resource (PNG and XML files) not buildable from Visual Studio.
///
In XNA Beta 2 we can load (and then use) textures at run time
///
like in beta 1 without build it to xnb files, but is not recommended.
///

///
If I don’t call audioEngine.Update() sounds work without problems for me,
///
but it is better to call it to be sure it work in all cases.
/// </summary>

The link to download the project:
http://www.tonigreco.it/_xna_/download.asp?name=WindowsGame2D.zip

One more time I used help from Microsoft XNA forum and Internet to build this application.

You can download the complete project from this link:
http://www.tonigreco.it/_xna_/download.asp?name=RenderToPictureBoxScripted.zip

Press F1 to read help.

Make me know the bugs you will find so I will can fix its.
Thank you.

Using this post
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=728525&SiteID=1
and other help from the same forum I have build this sample.

To download the project use this link:
http://www.tonigreco.it/_xna_/download.asp?name=RenderToPictureBox.zip.

Fill free to use it, I hope this can help.
If you have any comments or suggestions please post it here, thank you.

This code start from examples that you can find here:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=694235&SiteID=1
by "pRtkL xLr8r" and "i made this".

It show a textured cube rendered with BasicEffect (on left, with light) and
with Effect shader (on right, not light).
Not all faces are right textured.

Press keys:
Insert-Enter to toggle Full Screen/window mode;
arrows, PagUp, PagDown, Home, Fine to move;
Esc to exit.

To dowload the project:
http://www.tonigreco.it/_xna_/download.asp?name=Basic_and_EffectCube.zip

I hope it can help.

I am working for a tutorials for my students (I teach computer science in a secondary school), here the first test.

Please feel free to write suggestions and/or use it if you like.

/// <summary>
/// Tutorial 1 – from XNA help and forum community contributes – by Toni Greco
/// _Interactive 2D graphic application_
///
/// In project folders "tmpWorkingArea" you find some middle steps to build media.
///
/// Features:
///     resizable window (but then it go behind all others: bug?)
///     toggle fullscreen/window mode (Home-Enter)
///     control player ball with arrow keys
///     background fixed (bitmap from Spacewar demo)
///     XACT sounds
///     press Esc to exit
///     it shows fps using XNAExtras
///     it tray to maximize fps (no vertical sync.)
///     simple collision test/response
///     sprite with transparent and semi-transparent pixels (alpha channel in dds)
///
/// Special thanks for Gary Kacmarcik sharing his
/// "Creating Bitmap Fonts using bmfontgen".
/// </summary>

The link to download the project:
http://www.tonigreco.it/_xna_/download.asp?name=Tutorial_1.zip