3D Polygon Engine #2 - Platonic Solids, light source shading
2022-11-27. Created the five known Platonic solids:
Tetrahedron - 4 faces - triangles
Cube - 6 faces - squares
Octahedron - 8 faces - triangles
Dodecahedron - 12 faces - pentagons
Icosahedron - 20 faces - triangles
Also toying around with moving the camera, and having a destination location moving around. I am just using simple cosine and sine waves in all of X, Y, and Z to adjust them all.
You may notice the individual objects move out of the way of the camera. They each have a concept of position, momentum, and forces from the camera can interact with them, along with frictional forces to slow them back down.
The lighting engine consists of:
- ambient light color
- directional light facing downwards at a 45° angle
- another light source shining directly upwards
With only a single directional light source, the backs of all of the objects are unlit and show as a single shade -- even with ambient light, thus the decision to have a second light source. Perhaps more interesting would be two opposite light sources of different colors, to showcase the lighting source shading. In the current video, all light sources are monochromatic.
Playlists:
--------------------
- Polygon 3D: https://youtube.com/watch?v=0Qq_euAMP48&list=PLjnbT4UISq0YyjqBGG8Q34Kng5gqDmYrT
- Voxel Software 3D: https://youtube.com/watch?v=uadGU-stF-w&list=PLjnbT4UISq0bQF1g85tE9jTrKfEtdRYlY
- Ray Casting 3D: https://youtube.com/watch?v=SkaPYZOKPQg&list=PLjnbT4UISq0YcFtRFjFQqK0g6ONNCtrvY
- Graph-All Calculator 2D: https://youtube.com/watch?v=kLSc7bZW2Bs&list=PLjnbT4UISq0YLgynFSpLzml4BMC6TDZL2
- Parallax Side-Scroll Shooter 2D: https://youtube.com/watch?v=l9bIYkZepPo&list=PLjnbT4UISq0Y_7IAN_zUzxgZnfhXxo_0Q
- Road Pseudo 3D: https://youtube.com/watch?v=rA4g4VX7ys8&list=PLjnbT4UISq0bnfd1RC3M4PgTgkmhlkikV
- Arena Shooter 2D: https://youtube.com/watch?v=VKjiuq437t0&list=PLjnbT4UISq0adw__Y9B2eXA0LL35TyORU
Websites:
---------------------
- GitHub: https://github.com/JDoucette
- Indie Game Studio: http://xona.com
- Blog: http://thefirstpixel.com