- Posted: Jun 19, 2013 at 6:00 AM
- 8,315 Views
So why building a 3D soft engine? Well, it’s simply because it really helps understanding how modern 3D works with our GPUs. Indeed, I’m currently learning the basics of 3D thanks to internal workshops delivered within Microsoft by the awesome David Catuhe. He’s been mastering 3D for many years now and matrices operations is hard-coded in his brain. When I was young, I was dreaming to be able to write such engines but I had the feeling it was too complex for me. Finally, you’ll see that this is not – that - complex. You simply need someone that will help you understanding the underlying principles in a simple way.
Through this series, you will learn how to project some 3D coordinates (X, Y, Z) associated to a point (a vertex) on a 2D screen, how to draw lines between each point, how to fill some triangles, to handle lights, materials and so on. This first tutorial will simply show you how to display 8 points associated to a cube and how to move them in a virtual 3D world.
By properly following this tutorial, you will have the following result at the end:
In this tutorial, you will learn how to draw lines, what a face is and how cool is the Bresenham algorithm to draw some triangles.
Thanks to that, at the end, you will know how to code something as cool as that:
Again, you can download the solutions containing the source code: [GD: Click through to the original article for the download links]
- C# : SoftEngineCSharpPart2.zip
- TypeScript : SoftEngineTSPart2.zip
In next tutorial, you will learn how to export some Meshes from Blender, a free 3D modeler tool, into a JSON format. We will then load this JSON file to display it with our wireframe engine. Indeed, we already have everything setup to display much more complex meshes like these one:
Here's a snap of the C# version (which is also a Windows Store App);
And its Project;
While not Halo, in the end, if you follow along, you'll still be one step ahead...