This is actually a big update to Gaia, not in the amount of code introduced, but in what it allows: multi-material meshes.
Unfortunately its not a particularly elegant solution. The mesh must be prepared using a program like Autodesk Maya by assigning different materials to the model, and then exported with those materials attached.
The materials used don’t actually matter, as Gaia can’t import from .MTL files yet; but the .obj file uses a material identifier, that can be used to differentiate between the parts of the mesh that we want to colour separately. Therefore when importing a mesh, if I pass it a list of materials then it can assign them according to this identifier.
Unfortunately, getting the materials to align with the correct parts of the mesh is pretty much trial-and-error…
I’d love to be able to create textures as defined in the .MTL files, but Gaia’s shaders aren’t versatile enough to be able to try implementing this yet. Maybe after I can get Phong to work…
The biggest problem with the meshes now is their definition. Blocky meshes look really poor in certain scenarios, especially when there are reflective materials involved:
so the next plan is definitely to implement some form of subdivision.
Release 0.1.2
Rendering methods:
- Distributed (stochastic) path tracing
- Monte Carlo path tracing (in-progress)
- Edge Line pass
- Z-Depth pass
Objects:
- Spheres
- Quads (buggy)
- Triangles
- Triangle meshes from .obj files (improved)
Material BRDFs:
- Ideal Lambertian, dielectric, metallic
- Oren-Nayar reflectance model (buggy)
- Blinn-Phong shading model (in-progress)
- Diffuse area lights
- Gooch shading
Acceleration structures:
- In-core multithreading support
- Bounding volume hierarchies
- Axis-aligned bounding boxes
Output file types:
- .hdr
- .ppm