Home Articles Tutorials Resources About

Welcome to XNA info!

XNA info is a website created by some enthusiasts to provide information on Microsoft's XNA platform, branded yet again as the game programming evolution. XNA already has quite some momentum, but we figured to contribute a bit to this anyway by providing these resources for working with it.

Our aim for XNA info would still be to make it a one-stop place for all things XNA, but we'll settle for the occasionally useful resource

Recent site updates and news   Last update: 2011-11-28 12:35:11 by Rim van Wersch

ClearType for images
I've put together little snippet showing how Cleartype rendering can be applied to images, as per this blog post. This rendering effectively tripples your horizontal resolution (on LCDs) at the cost of correct color details.

»
Foucault's Pendulum

It's getting close to another year since my last blog post, so for anyone still out there I thought I'd put up this little video of a pet project I've been tinkering on. It simulates how Foucault's Pendulum behaves at various latitudes. In case you're wondering what on earth Foucault's Pendulum is -and if you'd actually want to know- you can find more information over here and this here book provides a well-written history on the subject. The short and sweet is that this Pendulum device demonstrates that the earth rotates, which is a pretty neat feat. To get on with the imagery, here's that video:

»
Updated tangent space calculation demo
I've added a demo to the tangent space page, showing how to calculate the tangent frame on the fly in a shader while rendering a mesh. For meshes that have their vertex positions changed a lot, this may be useful so you don't need to burden the CPU with recalculating the tangents.

»
Updated GPGPU Framework
The GPGPU framework has recently undergone some changes and moved up from version 0.2 to version 0.3 (easy does it :) Interesting new features include generics support for other data formats than Vector4s and more control over how data is tranferred to and from the GPU.

»
Stuff abound

There seem to be a lot of exciting things happening at the moment. XNA 4.0 has been announced which adds Windows Mobile 7 phones to the list of supported platforms, but you already knew that of course. While Shawn is busy at GDC, I took the liberty of stealing his Fractals code. It doesn't improve anything upon his release in 2006, but I happened upon it and I thought I'd be nice to have this available as a ready-to-run sample. On that page you'll also find my take at handling input (inspired by this discussion) which seems to be all the rage these days.

Other than that, I've started tinkering on a little animation pipeline for XNA together with a 3D artist as a learning experience. I have no idea if this will be anywhere near finished any time soon, or if it'd even be useful for the community since there seem to be a lot of libraries out there already. Like any good software project I settled on an acronym for the name anyway before its anywhere near done, so I lay claim to Uxmal. It's a good fit since the artist is working in Maya and I'm on my third rewrite of the codebase already. Xna Model Animation Library also fits, but my development efforts are currently stumped by trying to come up with what the U should mean. Useful would be ideal, but it might also be Unnecessary or Useless.

Time will tell :)

»
Sample time - Distance field based decal rendering
I just put up a little sample dealing with distance field rendering, which is a technique by Valve to render glyphs, like decalls and text. The major benefits are that these distance fields are very efficient to store and they look great even at huge magnifications. Many thanks to OrangyTang for his original Java implementation.

»
Simple GPGPU framework
I just put up a beta of a little GPGPU framework for XNA I've been tinkering on. This is a simple framework to perform general purpose calculations on the GPU. If that sounds useful, take it for a spin and let me know how it works out. I could use some feedback on performance & usability. I decided to throw in my black hole demo for added pretty, get it while it's hot.

»
Logarithmic Depth Buffer

I came across an excellent discussion of setting up a logarithmic depth buffer in Cameni's Journal. I heard of those before, but I was surprised to find implementing them is as easy as adding only one simple line of code to your vertex shader:

output.Position.z = log(C*output.Position.z + 1) / log(C*Far + 1) * output.Position.w;

The C constant allows you to define the resolution you want at the near plane and Far is the value you use for the far plane. More details can be found in the journal linked above. I happened to be tinkering on a model of our solar system with a bunch of stars surrounding us (from Hipparcos data) to scale. The lightyear distances for the stars and the AU distances within the system were a source of woes with the depth buffer, but using this simple line made my z-fighting stars play nice.

»
Added a tool to convert heightmaps to normal maps
I needed to convert some heightmaps to normal maps, but found that the tools I used for that before were gone. The NVidia one seems to be converted to a Photoshop plugin and the ATI one only supports TGA images and didn't work properly for me.

So here's the little tool I created to do this. It works pretty neat I think, but if you come across something odd or something you like to see improved, let me know.

»
Updated XNABitmap utility class
I touched up my trusty XNABitmap class a bit so it integrates better as a GameComponent. For anyone wondering what this is, it's a utility class to use GDI (System.Drawing) in XNA for Windows games. If that sounds useful, take it for a spin and let me know how it works for you.

»
Snippet - simple linear texture filtering
Just added a snippet on how to manually do simple linear interpolation over your texels in HLSL as an alternative to setting your sampler to linear filtering. This may be useful if your sampled texels need to be processed before they can be interpolated correctly, in which case you can't rely on the sampler.

»
Sample time - tangent space
It's finally time for a new sample again. This question asking to explain tangent space in a nutshell made me realize we just take this stuff for granted when using normal mapping. This sample shows how to go about calculating the tangent space for an arbitrary mesh and what it actually looks like on a simple sphere.

»
Pet Project - StickFight

I haven't gotten around to writing interesting samples or uncovering any deep XNA truths lately. Instead I've been tinkering on a little beat-em-up game with stylized stick men to do the fighting. These little actors are entirely procedural, so the game itself generates the geometry and animations rather than using models created by artists. Obviously nothing can replace a good artist and this proved painfully true when it came to the animations.

»
Sign of life
Just put up a little utility class making it easier to use System.Drawing in XNA on Windows. If anyone's interested in that, just take it for a spin and let me know what you think!

I also managed to finally put up a terrain sample that has been lying around for months now. It has the mandatory water effects and some nice tricks to show, so it might be worth checking out. The reason I didn't put it up earlier was that I had some flickering/present issues with it on my PC which I couldn't trace. I'd like to blame that on my buggy drivers, but if it pops up for anyone else, do let me know.

»
Free online book about shaders, lighting, shadows, everything!


Foregoing lamenting my own slacking, I want to point everyone who cares to read this to a great online resource I stumbled upon today:

A free online book called "Programming Vertex, Geometry, and Pixel shaders"

It is geared towards D3D10, but it contains an incredible wealth of information about nearly every graphics topic you'd want to implement. The concise and thorough theory certainly holds for XNA and most shaders should give you a good idea how stuff gets implemented, if they don't work out of the box. It's written by these guys, who deserve a truckload of cookies in my opinion!

Oh and Jack, if you ever should find your way here, we have to discuss your definition of 'not very active' :)

»
New sample: HDR Rendering
Matt (MJP) came up with another great sample which shows how to go about rendering HDR imagery on both Windows and the 360. Following Matt's research, it's also a nice showcase of using LogLuv for storing the HDR information.

»
Drawing a 2D circle
I finally managed to wrap up a little sample showing how to draw circles/ellipses in a pixel shader using the good old implicit formula for a unit circle. For all its simplicity, I found it's actually a practical way to draw a nice smooth circle. You can find it over here or download it directly from the link below.

»
Realtime fur and a request
Here's a little tutorial I've been wanting to do for ages, showing how to render some simple fur on arbitrary meshes (looks like I've been pretty much upstaged by Catalin though). As for my request, I'd be much oblidged if anyone could take a shot at the bug in the webbrowser on an XNA texture project. I've tinkered on it to no end, but I just can't seem to get that bug fixed.

»
Game of Life on the GPU
This sample demonstrates how Conway's Game of Life can be implemented on the GPU. It also comes with a couple of custom rules to solve mazes as demonstrated here. Update: the fat maze solver has been fixed, so that works out nicely now too.

»
Snippet time - LogLuv and quaternions
Here are a few snippets that might prove useful. We've got a nice HLSL LogLuv implementation for storing floating point values in a 32 bpp format and a basic sample showing how to use quaternions for rotation.

»
An update! Integrating your XNA engine with XSI ModTool
Incredibly, we're slowly making progress. We've got a few nice new samples in the works and got a most excellent contribution from MJP to walk you through an implementation of a 3D content authoring system, which can allow you to seamlessly integrate XSI ModTool with your gaming engine.

You can find this guide in our articles section under Game Programming, or download it directly through this posts permalink. Enjoy!

»
Slowly getting there
Woo, finally we've got some progress to report over here. We're slowly porting over the tutorials and samples from MDXInfo and are working to get the site into some semblance of order.

»
XNA info is sponsored by vector4. All content is copyright © 2005-2014 by its respective authors | About XNA info | Terms of Use | RSS feed