Difference between revisions of "3D Fundamentals Tutorial 1"

From Chilipedia
Jump to: navigation, search
(Video)
 
(9 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
== Video ==
 
== Video ==
  
The tutorial video is on YouTube [https://youtu.be/O7dKCaWzvzA here].
+
The tutorial video is on YouTube [https://youtu.be/O7dKCaWzvzA here]
 +
<div class="mw-collapsible mw-collapsed"><br />
 +
* Getting the framework code (clone from GitHub) [https://youtu.be/O7dKCaWzvzA?t=0m43s 0:43]
 +
* <code>Graphics</code> class [https://youtu.be/O7dKCaWzvzA?t=2m00s 2:00]
 +
* <code>Surface</code> class [https://youtu.be/O7dKCaWzvzA?t=4m54s 4:54]
 +
* <code>Color</code> class [https://youtu.be/O7dKCaWzvzA?t=7m16s 7:16]
 +
* <code>MainWindow</code> class [https://youtu.be/O7dKCaWzvzA?t=8m14s 8:14]
 +
* <code>Keyboard</code> and <code>Mouse</code> classes [https://youtu.be/O7dKCaWzvzA?t=9m57s 9:57]
 +
<div class="mw-collapsible-content">
 +
:* 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
 +
</div>
 +
* <code>Main.cpp</code> entry point [https://youtu.be/O7dKCaWzvzA?t=11m30s 11:30]
 +
<div class="mw-collapsible-content">
 +
:* This is where the core game loop runs:
 +
::<syntaxhighlight lang="cpp" line>
 +
try
 +
{
 +
    Game theGame( wnd );
 +
    while( wnd.ProcessMessage() )
 +
    {
 +
        theGame.Go();
 +
    }
 +
}
 +
</syntaxhighlight>
 +
</div>
 +
* <code>Game</code> class [https://youtu.be/O7dKCaWzvzA?t=12m52s 12:52]
 +
* Utility classes [https://youtu.be/O7dKCaWzvzA?t=14m00s 14:00]
 +
<div class="mw-collapsible-content">
 +
:* <code>Rect</code> class for rectangles [https://youtu.be/O7dKCaWzvzA?t=14m00s 14:00]
 +
:* <code>Vec2</code> class for 2D vectors [https://youtu.be/O7dKCaWzvzA?t=14m31s 14:31]
 +
:* <code>Mat2</code> class for (2x2) matrices [https://youtu.be/O7dKCaWzvzA?t=15m18s 15:18]
 +
:* <code>ChiliException</code> class [https://youtu.be/O7dKCaWzvzA?t=15m44s 15:44]
 +
:* <code>ChiliMath</code> class [https://youtu.be/O7dKCaWzvzA?t=17m29s 17:29]
 +
:* <code>ChiliWin</code> class [https://youtu.be/O7dKCaWzvzA?t=17m41s 17:41]
 +
:* <code>DXErr</code> class [https://youtu.be/O7dKCaWzvzA?t=18m19s 18:19]
 +
:* <code>GDIPlusManager</code> class [https://youtu.be/O7dKCaWzvzA?t=18m38s 18:38]
 +
:* <code>Resources</code> [https://youtu.be/O7dKCaWzvzA?t=19m58s 19:58]
 +
:* <code>Shaders</code> [https://youtu.be/O7dKCaWzvzA?t=20m09s 20:09]
 +
</div>
 +
* Demo (rotating star) [https://youtu.be/O7dKCaWzvzA?t=20m37s 20:37]
 +
* A note on Matrix layout (row vector * matrix multiplication) [https://youtu.be/O7dKCaWzvzA?t=25m50s 25:50]
 +
<div class="mw-collapsible-content">
 +
:* The framework follows the DX layout (OpenGL uses matrix * column vector multiplication)
 +
:* Important for the order of applying transformation matrices
 +
:* v<sup>T</sup> * A * B * C = C<sup>T</sup> * B<sup>T</sup> * A<sup>T</sup> * v
 +
</div>
 +
</div>
  
 
== Downloads ==
 
== Downloads ==
  
 
The GitHub repository for the tutorial code is [https://github.com/planetchili/3D_Fundamentals here].
 
The GitHub repository for the tutorial code is [https://github.com/planetchili/3D_Fundamentals here].
 +
 +
== See also ==
 +
* [https://www.patreon.com/planetchili Planet Chili Patreon]
 +
* [[3D Fundamentals Tutorial 2|Next in series (Tutorial 2)]]
 +
* [[3D Fundamentals Series]]

Latest revision as of 03:17, 22 April 2020

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