Ray tracing [C++ & SDL2] - Episode 11 - Fixing the normals

85 Просмотры
Издатель
Ray tracing [C++ & SDL2] - Episode 11 - Fixing the normals

Following on from the previous episode looking at refraction and how we can implement refractive materials, this episode looks back at the issue of computing surface normals. In particular, we look at how surface normals behave during transformations compared to tangential vectors and why there is a need to handle the normals differently. As we are defining all of our objects in their own local coordinate system, we need to use geometric transforms and so we need to be able to apply these correctly to the normal vectors as well as points on the object's surface.

Other episodes of this series can be found here:

Episode 1 (Introduction and basic code):
https://youtu.be/JN5yUrJPThI

Episode 2 (Camera geometry):
https://youtu.be/KBK6g6RFgdA

Episode 3 (Ray - Sphere intersections):
https://youtu.be/8fWZM8hCX5E

Episode 4 (Simple lighting):
https://youtu.be/dUtkihuUvvo

Episode 5 (Geometric transforms):
https://youtu.be/-Apu2BNp3t8

Episode 6 (Planes & shadows):
https://youtu.be/9K9ZYq6KgFY

Episode 7 (Simple materials):
https://youtu.be/F5vIgpRF_Qo

Episode 8 (Cones & Cylinders):
https://youtu.be/UTz7ytMJ2yk

Episode 9 (UV space & textures):
https://youtu.be/d35gDi98gEY

Episode 9a (Image textures):
https://youtu.be/lGTa8ceYIjA

Episode 10 (Refractive materials):
https://youtu.be/6slB1euGMFw

The Github repository for this series can be found here:
https://github.com/QuantitativeBytes/qbRayTrace

The Github repository for my linear algebra library can be found here:
https://github.com/QuantitativeBytes/qbLinAlg

**********************************

You can also follow QuantitativeBytes on Facebook:

www.facebook.com/QuantitativeBytes

**********************************

As with all of my videos, I show the code that I have developed to solve the particular problems that I need to solve, with the hope that it may provide sufficient background and inspiration to allow you to go on to develop your own code if you wish to. My code may not be the most appropriate solution to the problem you are trying to solve, so I urge you to consider the problem carefully and decide for yourself on the most appropriate solution. I make every effort to ensure that my code works as it should and is free of bugs, but of course I cannot provide any guarantees. If you use my code as shown, I strongly encourage you to make sure that you test it thoroughly to ensure that it works as you need it to. If you find a bug, do please let me know in the comments!

**********************************
Категория
Язык программирования C++
Комментариев нет.