Difference between revisions of "3D Fundamentals Tutorial 1"
(→Video) |
(→Video) |
||
(5 intermediate revisions by the same user 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] | * 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>Graphics</code> class [https://youtu.be/O7dKCaWzvzA?t=2m00s 2:00] | ||
Line 20: | Line 21: | ||
* <code>MainWindow</code> class [https://youtu.be/O7dKCaWzvzA?t=8m14s 8:14] | * <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] | * <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: | :* Two ways of accessing inputs: | ||
::- Queue of events (you can pull events off the queue in the order in which they occured | ::- Queue of events (you can pull events off the queue in the order in which they occured | ||
::- Check current state of input devices | ::- Check current state of input devices | ||
+ | </div> | ||
* <code>Main.cpp</code> entry point [https://youtu.be/O7dKCaWzvzA?t=11m30s 11:30] | * <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> | ::<syntaxhighlight lang="cpp" line> | ||
try | try | ||
Line 34: | Line 39: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | </div> |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | * <code>Game</code> class [https://youtu.be/O7dKCaWzvzA?t=12m52s 12:52] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | * Utility classes [https://youtu.be/O7dKCaWzvzA?t=14m00s 14:00] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | <div class="mw-collapsible-content"> |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | :* <code>Rect</code> class for rectangles [https://youtu.be/O7dKCaWzvzA?t=14m00s 14:00] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | :* <code>Vec2</code> class for 2D vectors [https://youtu.be/O7dKCaWzvzA?t=14m31s 14:31] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | :* <code>Mat2</code> class for (2x2) matrices [https://youtu.be/O7dKCaWzvzA?t=15m18s 15:18] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | :* <code>ChiliException</code> class [https://youtu.be/O7dKCaWzvzA?t=15m44s 15:44] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | :* <code>ChiliMath</code> class [https://youtu.be/O7dKCaWzvzA?t=17m29s 17:29] |
− | * [https://youtu.be/O7dKCaWzvzA?t= | + | :* <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 == |
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.
Contents
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
andMouse
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(); } }
- 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.