Ortho3D banner

Ortho3D

1 devlog
3h 24m 40s

an orthographic 3D renderer

Tree Plate

This project was started before flavortown. At the start of flavortown, I had an engine that used the vector_math library and a matrix copied from wikipedia to draw a cube made out of triangles. Recently, I tried to add a second cube, and got weird rendering artifacts. I eventually figured out it was because my code for determining whether a triangle was in front of or behind the camera was naïve and didn’t account for edge cases. I got a whiteboard out and (using a 2D plane and lines instead of triangles for simplicity) found several edge cases to fix. After a bunch of thinking, I figured out the solution, which was to test if two edges of the triangle extended out hit both sides of the box extending from the center of the screen. I tried to do this, and saw my cube didn’t render correctly (see attachment). I eventually figured out this was due to a bug in the vector_math library (https://github.com/google/vector_math.dart/issues/358).

Attachment
0