Smooth Triangles
Assuming everything was successful so far, you’ve got your ray tracer rendering complex polygonal models that you’ve imported from OBJ files! A glaringly obvious drawback, though, is that these models are polygonal. The teapot in the following figure is probably typical of what you’re seeing:
After the initial thrill of “Oh my gosh! It works!” wears off, you’re left wondering what you can do to make that chunky teapot look a bit more glossy.
Well, one thing you can do is find a higher resolution model. The first one used about 240 triangles. The teapot in the following figure uses closer to 6,400.
The difference is striking! It’s ...
Get The Ray Tracer Challenge now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.