RTIOW-ch12:Where next









1. Lights. You can do this explicitly, by sending shadow rays to lights. Or it can be done implicitly by making some objects emit light,

2. biasing scattered rays toward them, and then downweighting those rays to cancel out the bias. Both work. I am in the minority in favoring the latter approach.

3. Triangles. Most cool models are in triangle form. The model I/O is the worst and almost everybody tries to get somebody else’s code to do this.

4. Surface textures. This lets you paste images on like wall paper. Pretty easy and a good thing to do.

5. Solid textures. Ken Perlin has his code online. Andrew Kensler has some very cool info at his blog.

6. Volumes and media. Cool stuff and will challenge your software architecture. I favor making volumes have the hitable interface and probabilistically have intersections based on density. Your rendering code doesn’t even have to know it has volumes with that method.

7. Parallelism. Run N copies of your code on N cores with different random seeds. Average the N runs. This averaging can also be done hierarchically where N/2 pairs can be averaged to get N/4 images, and pairs of those can be averaged. That method of parallelism should extend well into the thousands of cores with very little coding.


参考书籍:《Ray Tracing in One Weekend》



RTIOW-ch1:Output an image

RTIOW-ch2:The vec3 class

RTIOW-ch3:Rays, a simple camera, and background

RTIOW-ch4:Adding a sphere

RTIOW-ch5:Surface normals and multiple objects


RTIOW-ch7:Diffuse Materials



RTIOW-ch10:Positionable camera

RTIOW-ch11:Defocus Blur

RTIOW-ch12:Where next