3D engine
Posted: Sun Feb 06, 2011 1:24 am
ok so i know Jasoco already made am engine but i failed to be able to read his code or understand his logic behind why he did things. i have rotations abd projection down and now i need to sort the polygons and add shading then it will be mostly done. if i haven't looked at how to make shadows yet but i think i can figure it out
edit: i got lighting working and i got the poly sort mostly working. the lighting is static and the poly sort has an issue; under some scenario small triangles will show up in 1 or 2 of the corners of the cube but i haven't figured out how to fix it yet. ill look more into that tomorrow
edit2: i tuned the poly sort some, it's still not perfect but it works pretty well
edit3: i improved performance by 2 fold. oddly enough love.graphics.getColor() was 8.5% of the issue even more shocking the sort only took 1.1% of time ... that's why we profile our codes kids
i also added in push and pop matrix operations so that you can rotate, move, and alter the projection of a selected set of polygons with out having to back trace everything you did.the poly sort bug is still aloft however . also there may be performance issue with this on some computers as it's rendering 600 triangles, i was using this to test performance. i get 30fps with regular love on this now
edit: i got lighting working and i got the poly sort mostly working. the lighting is static and the poly sort has an issue; under some scenario small triangles will show up in 1 or 2 of the corners of the cube but i haven't figured out how to fix it yet. ill look more into that tomorrow
edit2: i tuned the poly sort some, it's still not perfect but it works pretty well
edit3: i improved performance by 2 fold. oddly enough love.graphics.getColor() was 8.5% of the issue even more shocking the sort only took 1.1% of time ... that's why we profile our codes kids
i also added in push and pop matrix operations so that you can rotate, move, and alter the projection of a selected set of polygons with out having to back trace everything you did.the poly sort bug is still aloft however . also there may be performance issue with this on some computers as it's rendering 600 triangles, i was using this to test performance. i get 30fps with regular love on this now