From spheres to cubes
Closed this issue · 0 comments
tristandeborde commented
We want to make our raytracer compute intersections with cubes instead of spheres.
We need:
- A cube class (there's a sphere class from the code we can inspire ourselves from)
- To modify the render function to compute intersections with cubes
- To correct the straight line artifact on the output image!
- Easy way is with AABB, since Octree's voxels are axis-aligned = https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-box-intersection
- But for the physics and rasterization, the gamr voxels are OBB (not axis aligned) = http://www.opengl-tutorial.org/miscellaneous/clicking-on-objects/picking-with-custom-ray-obb-function/