3D Fundamentals Tutorial 1

From Chilipedia
Jump to: navigation, search

This video gives a quick tour of the framework we're going to be using to explore the concepts of realtime 3D graphics. The intended audience is mainly people coming to the 3D Fundamentals series without experience in my other tutorials.

Disclaimer

This video is not meant to explain all of the inner mechanisms of framework or the APIs used. I know a lot of people are literally shitting themselves with impatience over that, but trust me, the time is not yet ripe and nubile. You won't be able to properly understand the Direct3D API without first understanding 3D theory, and while I could explain the WinAPI stuff at this point, it would just detract from the focus of this series.

Now if you are curious, you can check out a video from the old Intermediate series that explains the WinAPI and Direct3D initialization (albeit, D3D9, not D3D11). But trust me, if you think that learning this one thing is going to change everything, you will be sorely disappointed. There is no one key that will unlock all the doors of awesome. You gotta build it up, one block at a time. And right now, the most important thing is to understand the theory of 3D graphics.

Framework

The reference for the framework can be found here. Note that this reference is for the framework as it is in the Beginner series, and thus it lacks information on certain classes like the vector and matrix classes and the surface class.

Video

The tutorial video is on YouTube here


  • Getting the framework code (clone from GitHub) 0:43
  • Graphics class 2:00
  • Surface class 4:54
  • Color class 7:16
  • MainWindow class 8:14
  • Keyboard and Mouse classes 9:57
  • Two ways of accessing inputs:
- Queue of events (you can pull events off the queue in the order in which they occured
- Check current state of input devices
  • Main.cpp entry point 11:30
  • This is where the core game loop runs:
try
{
    Game theGame( wnd );
    while( wnd.ProcessMessage() )
    {
        theGame.Go();
    }
}
  • Demo (rotating star) 20:37
  • A note on Matrix layout (row vector * matrix multiplication) 25:50
  • The framework follows the DX layout (OpenGL uses matrix * column vector multiplication)
  • Important for the order of applying transformation matrices
  • vT * A * B * C = CT * BT * AT * v

Downloads

The GitHub repository for the tutorial code is here.

See also