Yope3D, icosphere generation (Part 7)

<p>In this article about the Yope3D project, the implementation of an icosphere generation system is discussed, as well as the creation of a Sphere class that will handle the upcoming sphere physics logic, and minor updates to the shading algorithm. This article is a short one, focusing mainly on the setup of the Sphere class and the generation of Sphere meshes, and the switch from Phong shading to Blinn-Phong shading.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:770/1*OrrF5p1GfYp1zIbRR4wbfA.png" style="height:634px; width:700px" /></p> <p>Icosphere with 2 subdivisions (blue points indicate the original source icosahedron)</p> <p>One aspect of the Phong shading algorithm that was not mentioned by the last article was that oftentimes the orientation of the camera view and light reflection leads to a negative dot product, something that is clamped away and results in unrealistic specular highlights. Furthermore, the calculation of the reflection along the normal is an expensive one, and one that can be avoided by using Blinn-Phong shading.</p> <p><a href="https://medium.com/@yugumish/yope3d-icosphere-generation-part-7-f1533971d782"><strong>Learn More</strong></a></p>