Michael Quandt

UTS MSP

Dark Omen Games Website Re-Opens

clock January 4, 2009 00:21 by author

Just wanted to announce that Dark Omen Games, a collaborative little game studio that now has about 5 members including myself, has a new website/blog.

Here we will post any games we are developing under the DOG banner, as well as anything else appropriate. You can find the site at http://www.mquandt.com/dog, and hopefully soon that will become a proper domain. (Once we get our old one back)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Scalars & Vectors

clock December 24, 2008 21:45 by author

Please note that I will first explain what each concept is, and then I will write up how to calculate/get each concept afterwards.

A scalar is simply another name for a number, however it uses that name to indicate a difference between a Vector and a single number. (Or other mathematical structures)

In the field of game programming, Vectors play a key role in almost every aspect. In its simplest form, a Vector is a collection of 2 or more scalars that indicate a point in space, relative to the Origin [3D=(0,0,0) | 2D=(0,0)]. Each scalar in a Vector is called a component, and indicates the distance along the corresponding axis from the origin. For example, the Vector (9,5) is 9 units along the X axis, and 5 units along the Y axis. Vectors can be used to indicate positions, directions, and many other things. It all depends on the context, and what the Vector is relative to. (World/Local space)

Vectors in pure maths generally refer to a direction rather than a point, however in computer graphics we use Vector structures to represent a point. We can view a point as the end of a direction from the origin, however when written, points usually are written with parenthesis (0,0) and Vectors are usually written either using angle brackets <0,0> or in component form, where each part (component) of the Vector exists as the coefficient of a unit vector pointing along the corresponding axis. [More on Unit Vectors later]

For example, the Vector <9,5> can also be written as 9x + 5y.

The accepted way of indicating something is a Vector in digital form (as opposed to written on paper) is to bold the vector, for example i.

So now that you are most likely confused, let us move on to Unit Vectors. A Unit Vector is a vector with a distance of 1. This is the way you represent an axis in Vector form. For example, the unit vector for the X axis in 3D space is <1,0,0>. You can see that in our component form, the scalar co-efficient of x is 9, which is the distance along the X axis.

Key to getting the Unit Vector, is a concept called Magnitude. This is represented by two bars on each side of the vector. The magnitude of the vector is a scalar representation of the distance from the origin, so if  you need to find the distance of a Vector from the origin, you are simply calculating the Magnitude.

The magnitude is found by applying the distance equation between the Vector and the Origin. The distance between two vectors is found by taking the square root of the squares of the difference between the corresponding components. Quite a mouthful, isn’t it?

To find this in code, we use the following:

public double Distance(Vector3 i, Vector3 j)
{
    double x, y, z;
    
    x = Math.Pow((i.X - j.X), 2);
    y = Math.Pow((i.Y - j.Y), 2);
    z = Math.Pow((i.Z - j.Z), 2);
    
    return result = Math.Sqrt(x + y + z);
}

In Mathematical notation, this is just:

Distance Function

So for magnitude, where we are getting the distance between the Vector and the origin, we are subtracting 0 from each component, which simplifies the equation down to:

clip_image002[13]

So now how do we use the result of this to find the unit vector? Well the equation for a unit vector is clip_image002[15]. This pretty much means that we divide each component of our vector by the magnitude of the vector. This is what we do to “normalise” a vector, and this allows us to multiply the vector by a number and not change its direction.

Remember that Vectors are a way of representing many things, although the common definition is that they represent a direction combined with a magnitude, which we can use to get a point, as if we moved the point from the origin along the direction using the magnitude. It is all about context, and that determines how you use the vector and its components. For example, a normal is a vector which indicates the direction perpendicular to the object’s tangent. (A tangent is a vector parallel to the line/object)

Another calculation common in computer graphics that uses Vectors is the Dot Product. This is a multiplication of two vectors which gives a scalar value that can indicate many things, usually though it can be used to get the angle between two vectors. The dot product is rather simple, you multiply each component of a vector with the corresponding component in the 2nd vector, and then add the result of each of these multiplications together to get a scalar value.

Dot Product

We can use this and:

Angle to Dot

to find the angle between the two vectors. After rearranging we use

Dot To Angle

(Note that the cos is simply ArcCos)

I hope this has explained what a Vector is and some key aspects about it, if you have any further questions leave a comment. Comments and criticism welcome. I plan to write another post on Matrices, with a focus on their application in computer graphics.

If I have missed anything, just tell me in a comment and I will add it in a later post, this was written after a nice lunch on Christmas day, and I am a bit tired now.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Dreamspark out in AU

clock September 7, 2008 04:33 by author

So TechED Sydney is over and I now have the time to post about the big announcement for students that came out of the event. On Tuesday Microsoft held TechEd Student Day, a free day for students to come along and sit in on a series of presentations geared towards students, TechEd style.

Aside from that, every University student who attended the University half of the day received 4 DVDs full of free software, ready for use. Now if you could not attend this event, do not fret, this is all available for you as well (if you are a student), however you need to download it for yourself.

Head to https://downloads.channel8.msdn.com/ and Sign In with your Windows Live ID, and then verify your student status and you can get your keys and downloads for all the software listed. This includes:

  • Visual Studio 2008 Pro
  • Visual Studio 2005 Pro
  • Windows Server 2003 Standard
  • SQL Server 2005 Developer Edition
  • Microsoft Expression Studio
  • 12 Month XNA Creators Club Trial
  • XNA Game Studio 2.0
  • Virtual PC 2007 (Great for use with Windows Server 2003)

Grab the downloads, grab the keys, and start making cool things with this free software. Anything you make can be distributed with a non-commercial license, so get to it!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Havok Physics and Animation Now Free!

clock June 1, 2008 13:49 by author

havok_logo_CMYK For those doing native application development that need a Physics or Animation product, Havok, partnered with Intel have released the world famous Havok Physics & Animation package for free.

This gives you the complete binary for use in your personal, educational or even commercial game as long as it is below US$10.

Currently there does not seem to be anything for XNA (despite an apparent job ad a while back), but I am sure this will be wrapped soon enough, and then the power of Havok will be available for use on the PC platform in XNA as well.

You can get Havok from http://tryhavok.intel.com. Just fill out the form and download the Programmer binaries and Artist tools.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Digital Tutors: Maya + XNA

clock May 16, 2008 01:21 by author

The professional video tutorial scene has started to adopt XNA from the looks of it, with Digital Tutors releasing a DVD training package named Pipeline Development with Maya and XNA.

Popular highlights:

  • XNA Development Overview
  • Interfacing with Keyboard and Gamepad
  • Building Controller Systems
  • Controller Vibration
  • Exporting and Loading Static Meshes from Maya
  • Exporting Animated Characters from Maya
  • Moving and Turning a Character
  • Object-oriented Programming with Bullets and Targets
  • Baking Textures in Maya
  • Deriving Bounding Boxes from Maya
  • Collision Detection with Bounding boxes
  • Collision Detection with Rays
  • Building a Custom Animation Player
  • Switching and Blending Between Animations
  • Chase Cameras
  • Camera Shakes
  • Drawing Text
  •  

    CGSociety has this to say about the product:

    'Pipeline Development with Maya and XNA' contains nearly five hours of project-based training for technical artists learning the methods of creating game content using XNA and Maya. 'Pipeline Development with Maya and XNA' offers artists an essential workflow and innovative techniques for easily integrating Maya and XNA for game creation.

    Since this costs money, I cannot get this at the moment and so I cannot give my own review. However it looks like a good product, and considering Digital Tutor's track record, it should be a good investment for the artistic programmers out there.

    Edit [17/5/2008]: I noticed that Digital Tutors also has an interesting looking Training Package titled Real-Time Shaders with XNA.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    XNA 3.0 CTP Available

    clock May 7, 2008 06:34 by author

    As of now the XNA 3.0 Community Technology Preview is available for download.

    XNA 3.0 CTP

    This requires a version of Visual Studio 2008 and will co-exist with Visual Studio 2005 and XNA GS 2.0.

    Note there is no Xbox360 support in the CTP release, however there will be with the final release, currently only PC and Zune.

    Now I am off to see what else they added. :) Enjoy.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    GPU Gems Free and Legal online

    clock March 26, 2008 14:17 by author

    gpug_cover1 Nvidia has released the first of their acclaimed GPU Gems series for free reading online in its entirety.

    These are full HTML forms of the articles, all revolving around techniques for rendering. Completely free.

    You can go and read the book here and even take advantage of 30% off the print copy. (See the top of the page, available at time of writing)

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    University Stage:1-1 Start!

    clock February 23, 2008 18:40 by author

    So tomorrow begins my first year of university at UTS studying for a Bachelor of Engineering in ICTE Software. (Pretty much Software Engineering)

    Should be enjoyable, and should also provide some inspiration so I can get started programming again. Been relaxing too much these holidays.

    Big news out of GDC, as most already know. XNA Community Games is finally here, and a general timeframe for XNA 3.0 :) Sad that Australia doesn't get the game preview that is currently running. :(

    I am in the process of working on a small game, but still in the tech planning stages, I want this engine to be useful for later projects and maybe even samples or demos.

    Dreamspark is also something big that occured which is good for me. Being a student, I can get access to this once it is prepared for Australia. Some great resources in there for students, all for FREE! XD

    I need to update more... :S

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    Post Processor 2.0 sample released

    clock December 24, 2007 21:06 by author

    I just finished up my sample for the 2.0 version of the Post Processor (see first post on this blog) for XNA2.

    The sample was built in XNA Game Studio 2.0 on Visual Studio 2005 Pro, and should compile fine in that. To use it just follow the instructions in Usage.txt, which explains how to use the program and also that there are more than enough comments in the code to understand its workings.

    If you have any questions, you can use the contact link at the top right, and get me via that, or you can contact me via the forums at www.thehazymind.com/smf, probably best via PM there though, since its not my board. Of course you can also leave comments here. :)

    Link:

    PostProc2Sample.zip [28kb] (Requires XNA 2.0 and either VS2005 or C# Express Edition 2005 installed, with XNA GSE 2.0 installed over that. - The archive only contains source code to minimize filesize, if you need a binary I will upload that.)

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    BlogEngine.net 1.3 Released

    clock December 22, 2007 22:01 by author

    The software I use for this blog got a minor version update today, from 1.2 to 1.3, pretty fast for about 2 1/2 months of work, and a good list of new features and changes. I have taken the time to upgraded to 1.3, must have done something wrong since there were issues with roles and users not transferring right, but that is stuff you don't need to worry about.

    This software is a great piece of blogging software written in asp.net 2.0, and with plenty of features being added all the time, as well as a reasonably stable codebase that can be pulled from the CodePlex repository for it.

     

    I am almost done with a basic sample for my Post Processing class, I just need to finish the shader and add some more comments, then pack it up. It should be up here shortly, then I will drop it into my HMEngine branch and work on implementing it in that project as well. So far it is pretty powerful, I just need a nice little usage guide to explain how to put it to use properly, that will come with the sample.

    Be the first to rate this post

    • Currently 0/5 Stars.
    • 1
    • 2
    • 3
    • 4
    • 5


    Gamercard

    About the author

    Michael Quandt is a Student at the University of Technology Sydney. He is also a Microsoft Student Partner. Passions include DirectX, Managed Code, C#, XNA, and gaming.

    Page List

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

    © Copyright 2008

    Sign in