|
2950 | 2950 | -----------
|
2951 | 2951 | You now have a cool ray tracer! What next?
|
2952 | 2952 |
|
2953 |
| - 1. Lights. You can do this explicitly, by sending shadow rays to lights. Or it can be done |
2954 |
| - implicitly by making some objects emit light, |
| 2953 | + 1. Lights. You can do this explicitly, by sending shadow rays to lights, or it can be done |
| 2954 | + implicitly by making some objects emit light, biasing scattered rays toward them, and then |
| 2955 | + downweighting those rays to cancel out the bias. Both work. I am in the minority in favoring |
| 2956 | + the latter approach. |
2955 | 2957 |
|
2956 |
| - 2. Biasing scattered rays toward them, and then downweighting those rays to cancel out the bias. |
2957 |
| - Both work. I am in the minority in favoring the latter approach. |
2958 |
| - |
2959 |
| - 3. Triangles. Most cool models are in triangle form. The model I/O is the worst and almost |
| 2958 | + 2. Triangles. Most cool models are in triangle form. The model I/O is the worst and almost |
2960 | 2959 | everybody tries to get somebody else’s code to do this.
|
2961 | 2960 |
|
2962 |
| - 4. Surface textures. This lets you paste images on like wall paper. Pretty easy and a good thing |
| 2961 | + 3. Surface textures. This lets you paste images on like wall paper. Pretty easy and a good thing |
2963 | 2962 | to do.
|
2964 | 2963 |
|
2965 |
| - 5. Solid textures. Ken Perlin has his code online. Andrew Kensler has some very cool info at his |
| 2964 | + 4. Solid textures. Ken Perlin has his code online. Andrew Kensler has some very cool info at his |
2966 | 2965 | blog.
|
2967 | 2966 |
|
2968 |
| - 6. Volumes and media. Cool stuff and will challenge your software architecture. I favor making |
| 2967 | + 5. Volumes and media. Cool stuff and will challenge your software architecture. I favor making |
2969 | 2968 | volumes have the hittable interface and probabilistically have intersections based on density.
|
2970 | 2969 | Your rendering code doesn’t even have to know it has volumes with that method.
|
2971 | 2970 |
|
2972 |
| - 7. Parallelism. Run $N$ copies of your code on $N$ cores with different random seeds. Average the |
| 2971 | + 6. Parallelism. Run $N$ copies of your code on $N$ cores with different random seeds. Average the |
2973 | 2972 | $N$ runs. This averaging can also be done hierarchically where $N/2$ pairs can be averaged to
|
2974 | 2973 | get $N/4$ images, and pairs of those can be averaged. That method of parallelism should extend
|
2975 | 2974 | well into the thousands of cores with very little coding.
|
|
0 commit comments