I'm trying to move my game development into the third dimension, but I'm having a bit of troubles understanding what I actually have to do. I've created a 2D MMORPG before using C and SDL, which wasn't too hard. But I can't seem to find any useful resources explaining how 3D programming actually works. I have a basic understanding of the vector math involved, but I just can't seem to find any clear, in-depth explanation of how everything else like lighting and shaders work. I've found plenty of code samples and such, but all of them just throw in a comment like "//Apply the lighting", which doesn't really tell me anything about what it's actually doing and why.
I'm not looking for an API-Specific tutorial; it's easy enough to learn a new API--I'm just not sure what to actually do with it.
3D computer graphics (in contrast to 2D computer graphics) are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for the purposes of performing calculations and rendering 2D images.
Graphics applications make programming calls to the APIs of the language, and the graphics drivers render the images on the screen or printer. The major graphics languages are GDI, DirectX, QuickDraw, Display PDF and OpenGL. Windows uses GDI and DirectX, while the Mac uses QuickDraw and Display PDF.
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.
If you are looking for a book, I highly recommend Real-Time Rendering. I have the second edition of the book and found it be a great asset when working with 3D graphics. The book explains the innerworkings of the building blocks of 3D programming, like transforms, lighting and textures. It also explores a variety of advanced topics, including shaders, collision detection, acceleration and optimization.
The book is very light on code. It explains algorithms in depth but does not contain real code snippets. So it is very good if you want to learn how things work instead of just knowing which function to call.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With