-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Visual troubleshooting
This page is not meant to be a FAQ section; instead I show here several examples of bugs me and my students were able to fix without looking into the source code, solely by observing things in the images.
Frequent bug: while sorting by y-coordinate, the vertices are sorted, but the data coming with the vertices is not.
Bad y interpolation while sweeping the line:
The vertices were not casted to int prior to filling:
Forgot to decrement indices of vertices (remember in wavefront obj indices are starting from 1, not 0)
Few broken reads of texture coordinates, notice that all the fan of triangles incident to a vertex is messy, thus the vertex is broken:
All "v", "vt" and "vn" lines are read in the same array, thus effectively killing any sense in the model. Very roundish shape of the rendering gives the idea about "vn" confused with "v". Prior to the bugfix and after: