Day 28, Celebratory cocktails
The latest addition to the supported shapes is the cone, a deformed kind of cylinder, also optionally capped and restricted to an interval along its length. With all these things we can make a cocktail to celebrate. With all these transparent parts, it takes more than 8 minutes to render.
Next related
Day 29, Groups
Transforming each object in the scene in global world reference space quickly becomes tiresome, so let’s introduce a new group “shape”. A group takes any number of objects and provides a common reference space for its children via its own transform. A group also helps reduce the search space in large scenes, by aggregating the bounding boxes of its children into a bounding box for the entire group. That way ray intersection tests against the children of the group only needs to happen when the group bounding box is intersected. Neat.
Previous related
Day 27, Cylinders part 2
To celebrate that cylinders can be constrained and capped at the ends, we have a remake of the cubemas scene from a few days ago, but with today’s shiny new cylinders instead of cubes.
Day 26, Cylinders part 1
Devember is rapidly coming to an end, but so is the book. Just a few more shapes to go, and we’re done. Except the easy shapes are already done, so things get more complicated from here. Cylinders seem pretty easy, just a XZ-planar circle, extruded along the Y axis. Done. Except that it gets infinitely long that way, so it needs to be constrained. But then it’s hollow, so it needs to support optional end caps for when you need a closed cylinder and not just a very thin walled tube. So it’s not done yet, but probably new pixels tomorrow.
Day 24 – 25, Cubemas
Oh my god, it’s full of cubes! The scene consists of 8 cubes, two for the room, five for the table, and the traditional cubemas decoration of one glass cube on the table.