Code-It-Yourself! 3D Graphics Engine Part#2 - Normals, Culling, Lighting & Object Files
317,258
Published 2018-07-29
Source: github.com/OneLoneCoder/Javidx9/tree/master/Consol…
Discord: discord.gg/WhwHUMV
Blog: www.onelonecoder.com/
Twitter: @javidx9
Twitch: javidx9
All Comments (21)
-
The 's off' in the obj file, describes if smooth shading should be used or not.
-
To anyone who wants to understand the math/maths better I raccomend 3blue1brown's "the essence of linear algebra" series. It basically gives a geometric intuition to a lot of the linear algebra operations that are very weird untill you understand at least a little about them like why on earth does the dot product have anything to do with similatity or why the cross product it's that vector or how a matrix is a guide for a transformation ecc...
-
Finding out that the Blender software exist is a massive relieve! I was getting worried that I would have to work the coordinates out for every shape :) Going from learning C++ to actually using it to make something animate across the screen is making everything that I have learnt so far, click into place. It has given me an even bigger list of things to learn as well. Thanks Javid.
-
I'm starting a new personal project with the goal of writing virtually everything myself, so when I saw this, it was the perfect thing to check out. This series is a fun little refresher as I haven't really written graphics code this low level since learning to code. Going back to basics, and really diving into some of the low level stuff like rendering, networking, etc. rather than simply relying on existing libraries is a welcome break from focusing on the game logic side of things. A wire-frame isn't necessarily as exciting to show off as a more complete project, but there's a different kind of satisfaction from building it, along with the understanding gained.
-
Stunning, Javidx9, simply stunning. I'm in awe of your way of explaining this. Can't wait until I have 6 free hours to transcribe this code into VS and watch it come together. Much appreciated.
-
This is great, I absolutely love this series because as soon as you mention something about some method that we have used in my linear algebra class, it's like it just clicks how useful it was that I learned it. I am completely astonished by how many problems are able to be solved by simply using the cross product of dot products.
-
The more closer we get into the nature of reality the math becomes more alien and beautiful.Nice explanation as always !
-
Progress going well so far in rewriting your 3D application in C with standard libraries! Great videos by the way. You are very well mannered, entertaining, and most importantly, an extremely good teacher.
-
One of the best tutorials I've ever seen. Excellent balance between, detail, simplicity and clarity.
-
I quite like this Developer version of Russel Crowe
-
I’m a software engineer who works in health insurance, and I’m mostly baffled at the complexity of 3D calculations. Maybe it’s because I was bad at trigonometry.
-
This series is great. I'd had a curiosity about this type of engine ever since I first played Elite on the BBC Micro in 1985. Thanks for making it.
-
Without a doubt, the best coding channel on Youtube, in terms of topics, content and presentation.
-
You don't need normals for culling triangles. It can be done in window coordinates after projection. There is formula for calculating signed area of a triangle: A = 1/2 * (x1*y2 - x2*y1 + x2*y3 - x3*y2 + x3*y1 - x1*y3) You need only a sign: front_ccw = ((xw_1*yw_2 - xw_2*yw_1 + xw_2*yw_3 - xw_3*yw_2 + xw_3*yw_1 - xw_1*yw_3) > 0) ? true : false; // xw, yw - points in window space for 3 vectors [v1,v2,v3], front_ccw face is visible when normal vector is pointing towards camera and vertex are in Counter-Clock-Wise (CCW) direction. CCW order determines direction of the normal as well: normal = cross( v2 - v1, v3 - v1 ) ps. if area is 0, then triangle is thin and you decide how to draw it. For less than 0, back of a triangle can be drawn with darker colour or rejected.
-
This is the most interesting programming video I've ever watched. Thanks so much for making it!
-
You are a blessing to a student studying graphics. This has taught me so much.
-
It was absolutely cool that you had mentioned the way of inputting more complex models into the engine. Thank you.
-
Huh. This is what the creators of the universe must have felt like in their early days. Thanks Javid.
-
It’s normally normal to normalize the normal! Wish we were friends, again thank you for this, it really helps me grasp cpp more then just plain generic tutorials, just mwah
-
This is the most easily digestible video about 3d I've ever seen. Thankyou for your video.