Overview
Animal3D is a rendering framework built in C using OpenGL by professor Dan Buckstein. In the context of this project, Animal3D is simple, rendering each object through the same pipeline with the same shaders. There were no materials, hence this project. This project was completed with a partner, Scott Dagen. Here is the Github link to the project for code samples.
Plans
Above is our UML design, encompassing all of the basic structures and data that we needed to get a start. Our final design actually ended up being very close to this, including our material "editor", which is just a text file that is human-readable, as we did not have access to any sort of UI libraries. We split our tasks into two sections, and I was responsible for the design and implementation of the editor, and any associated data structure. Scott took charge of the RenderPass structure and refactoring the existing render pipeline to support new per-object materials.
Results
The above images show the final results of our efforts! The first image shows:
A textured crate lit/shaded using Phong
A torus lit/shaded using the Gooch Shading model
A textured cylinder using a Phong model
A textured sphere lit using Cel shading
The second image shows both the crate and Earth rendered with materials that specify normal and roughness maps. Overall, this project gave us a ton of insight into how rendering pipelines can be optimized. As we built this, we realized plenty of optimizations that could be made, such as material instancing, shared materials, and application of lighting data in one pass rather than many. Scott also took the initiative to start a hot reload feature, which we ended up coming together for in the end. We can essentially change details of materials in their respective text files, then press a button to reload them at runtime, with almost no performance overhead. We could take it even farther by adding in UI to improve our editor system, allowing us to save materials in a more efficient manner than text. Additionally, we never really handled post-processing, which could be an entirely new type of material that allows us to have different sets of effects on different objects. Below are a few images of some pieces of the project. First is the material used by the Cel-shaded earth above, and second is actually the header of the material editor.
Comments