Welcome to Game Rendering!

Uncategorized | Wednesday 24 September 2008 2:03 am

While developing games I’ve been collecting lots of links to useful pages and as they increased in amount I needed some way to organize them. I realized that they might be useful for others too so I decided to create a simple website with the links and other information I’ve collected. I’m currently studying for a Master degree in Software engineering and is especially interested in computer graphics and game rendering. This site is therefore also created as a learning project for me and can therefore contain information that is incorrect somewhere. If you ever find something that’s wrong I would be happy if you informed me by commenting the site.

New articles will be posted as often I can.

I’m currently working on adding online demos for the articles so one can view the result immediately.

/ Robert

Basic Triangle

Rendering Methods | Tuesday 2 June 2009 7:30 pm

The triangle is the basic geometry that is used when rendering. All other shapes of geometry you want to draw must be divided into triangles.

Basic Triangle

The triangle parts:

  1. Face, the triangle itself, the area is what is gonna be rasterized (with normal fill mode at least).
  2. Face normal, the normal to the plane which the triangle is parallell too. It is mostly used for calculating the vertex normal.
  3. Vertex, a triangle has three vertices with x,y,z coordinates, they are located in the triangle corners. All transformations apply to these ones.
  4. Edge, the line between vertices are called edges, a triangle has three edges. Are used for example shadow volumes.
  5. Vertex normal, each vertex has a normal which decides the smoothness of the geometry.

Other data often used per vertex:

  • Tangent and Binormal for per pixel lighting
  • Texture coordinates (uvw-coords), sometimes more than one per vertex

Tutorial to render a triangle in DirectX10
http://msdn.microsoft.com/en-gb/library/bb172486(VS.85).aspx

Tutorial to render a triangle in OpenGL
 http://60hz.csse.uwa.edu.au/workshop/workshop0/workshop1.html

Tutorial to render a triangle in XNA
http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series1/The_first_triangle.php

Tutorial to render a triangle in OpenGL ES 2.0
http://www.webreference.com/programming/opengl_es/

Wavelet Turbulence for Fluid Simulation

Special Effects | Thursday 26 March 2009 2:03 am

This is a new and interesting way to add more detail to simulated fluids like smoke. Even if it’s far from realtime, some idea´s might be useful in games too.

Smoke Simulation

 The link to the paper:

http://www.cs.cornell.edu/~tedkim/WTURB/wavelet_turbulence.pdf

Random point in circle

Math | Thursday 26 March 2009 1:52 am

The best algorithm to generate a point in a circle is to generate a point in a square with the same width as the circle diameter and then rerun the algorithm until this random point is inside the circle. This algorithm might need to run a couple of times before finding a suitable point but will be faster than a more algorithmic solutions.

Pseudo code:

  1. Randomize a point in the square
  2. If this point is outside the circle then jump to 1
  3. Done
Next Page »