|
137 | 137 | Opening the output file (in `ToyViewer` on my Mac, but try it in your favorite viewer and Google
|
138 | 138 | “ppm viewer” if your viewer doesn’t support it) shows this result:
|
139 | 139 |
|
140 |
| - <div class="render"> |
141 |
| - |
142 |
| -  |
143 |
| - |
144 |
| - </div> |
| 140 | +  |
145 | 141 |
|
146 | 142 | </div>
|
147 | 143 |
|
|
516 | 512 |
|
517 | 513 | with $t$ going from zero to one. In our case this produces:
|
518 | 514 |
|
519 |
| - <div class="render"> |
520 |
| - |
521 |
| -  |
522 |
| - |
523 |
| - </div> |
| 515 | +  |
524 | 517 |
|
525 | 518 | </div>
|
526 | 519 |
|
|
634 | 627 | <div class='together'>
|
635 | 628 | What we get is this:
|
636 | 629 |
|
637 |
| - <div class="render"> |
638 |
| - |
639 |
| -  |
640 |
| - |
641 |
| - </div> |
| 630 | +  |
642 | 631 |
|
643 | 632 | </div>
|
644 | 633 |
|
|
714 | 703 | <div class='together'>
|
715 | 704 | And that yields this picture:
|
716 | 705 |
|
717 |
| - <div class="render"> |
718 |
| - |
719 |
| -  |
720 |
| - |
721 |
| - </div> |
| 706 | +  |
722 | 707 |
|
723 | 708 | </div>
|
724 | 709 |
|
|
877 | 862 | the sphere, the normal will point outward, but if the ray is inside the sphere, the normal will
|
878 | 863 | point inward.
|
879 | 864 |
|
880 |
| - ![Figure [normal-directions]: Possible directions for sphere surface-normal geometry](../images/fig.normal-possibilities.jpg) |
| 865 | + ![Figure [normal-directions]: Possible directions for sphere surface-normal geometry |
| 866 | + ](../images/fig.normal-possibilities.jpg) |
881 | 867 |
|
882 | 868 | </div>
|
883 | 869 |
|
|
1231 | 1217 | This yields a picture that is really just a visualization of where the spheres are along with their
|
1232 | 1218 | surface normal. This is often a great way to look at your model for flaws and characteristics.
|
1233 | 1219 |
|
1234 |
| - <div class="render"> |
1235 |
| - |
1236 |
| -  |
1237 |
| - |
1238 |
| - </div> |
| 1220 | +  |
1239 | 1222 |
|
1240 | 1223 | </div>
|
1241 | 1224 |
|
|
1422 | 1405 | Zooming into the image that is produced, the big change is in edge pixels that are part background
|
1423 | 1406 | and part foreground:
|
1424 | 1407 |
|
1425 |
| - <div class="render"> |
1426 |
| - |
1427 |
| -  |
1428 |
| - |
1429 |
| - </div> |
| 1408 | +  |
1430 | 1409 |
|
1431 | 1410 | </div>
|
1432 | 1411 |
|
|
1601 | 1580 | <div class='together'>
|
1602 | 1581 | This gives us:
|
1603 | 1582 |
|
1604 |
| - <div class="render"> |
1605 |
| - |
1606 |
| -  |
1607 |
| - |
1608 |
| - </div> |
| 1583 | +  |
1609 | 1584 |
|
1610 | 1585 | </div>
|
1611 | 1586 |
|
|
1646 | 1621 | <div class='together'>
|
1647 | 1622 | That yields light grey, as we desire:
|
1648 | 1623 |
|
1649 |
| - <div class="render"> |
1650 |
| - |
1651 |
| -  |
1652 |
| - |
1653 |
| - </div> |
| 1624 | +  |
1654 | 1625 |
|
1655 | 1626 | </div>
|
1656 | 1627 |
|
|
1730 | 1701 | <div class='together'>
|
1731 | 1702 | After rendering we get a similar image:
|
1732 | 1703 |
|
1733 |
| - <div class="render"> |
1734 |
| - |
1735 |
| -  |
1736 |
| - |
1737 |
| - </div> |
| 1704 | +  |
1738 | 1705 |
|
1739 | 1706 | It's hard to tell the difference between these two diffuse methods, given that our scene of two
|
1740 | 1707 | spheres is so simple, but you should be able to notice two important visual differences:
|
|
1813 | 1780 |
|
1814 | 1781 | Gives us the following image:
|
1815 | 1782 |
|
1816 |
| - <div class="render"> |
1817 |
| - |
1818 |
| -  |
1819 |
| - |
1820 |
| - </div> |
| 1783 | +  |
1821 | 1785 |
|
1822 | 1786 | </div>
|
1823 | 1787 |
|
|
2140 | 2104 | <div class='together'>
|
2141 | 2105 | Which gives:
|
2142 | 2106 |
|
2143 |
| - <div class="render"> |
2144 |
| - |
2145 |
| -  |
2146 |
| - |
2147 |
| - </div> |
| 2107 | +  |
2148 | 2108 |
|
2149 | 2109 | </div>
|
2150 | 2110 |
|
|
2197 | 2157 | <div class='together'>
|
2198 | 2158 | We can try that out by adding fuzziness 0.3 and 1.0 to the metals:
|
2199 | 2159 |
|
2200 |
| - <div class="render"> |
2201 |
| - |
2202 |
| -  |
2203 |
| - |
2204 |
| - </div> |
| 2160 | +  |
2205 | 2161 |
|
2206 | 2162 | </div>
|
2207 | 2163 |
|
|
2222 | 2178 | there is a refraction ray at all. For this project, I tried to put two glass balls in our scene, and
|
2223 | 2179 | I got this (I have not told you how to do this right or wrong yet, but soon!):
|
2224 | 2180 |
|
2225 |
| - <div class="render"> |
2226 |
| - |
2227 |
| -  |
2228 |
| - |
2229 |
| - </div> |
| 2181 | +  |
2230 | 2182 |
|
2231 | 2183 | </div>
|
2232 | 2184 |
|
|
2330 | 2282 |
|
2331 | 2283 | This gives us the following result:
|
2332 | 2284 |
|
2333 |
| -<div class="render"> |
2334 |
| - |
2335 |
| -  |
2336 |
| - |
2337 |
| -</div> |
| 2285 | +  |
2338 | 2286 |
|
2339 | 2287 |
|
2340 | 2288 | Total Internal Reflection
|
|
2455 | 2403 |
|
2456 | 2404 | We get:
|
2457 | 2405 |
|
2458 |
| - <div class="render"> |
2459 |
| - |
2460 |
| -  |
2461 |
| - |
2462 |
| - </div> |
| 2406 | +  |
2463 | 2407 |
|
2464 | 2408 | </div>
|
2465 | 2409 |
|
|
2544 | 2488 | <div class='together'>
|
2545 | 2489 | This gives:
|
2546 | 2490 |
|
2547 |
| - <div class="render"> |
2548 |
| - |
2549 |
| -  |
2550 |
| - |
2551 |
| - </div> |
| 2491 | +  |
2552 | 2492 |
|
2553 | 2493 | </div>
|
2554 | 2494 |
|
|
2625 | 2565 |
|
2626 | 2566 | gives:
|
2627 | 2567 |
|
2628 |
| - <div class="render"> |
2629 |
| - |
2630 |
| -  |
2631 |
| - |
2632 |
| - </div> |
| 2568 | +  |
2633 | 2569 |
|
2634 | 2570 | </div>
|
2635 | 2571 |
|
|
2713 | 2649 |
|
2714 | 2650 | to get:
|
2715 | 2651 |
|
2716 |
| - <div class="render"> |
2717 |
| - |
2718 |
| -  |
2719 |
| - |
2720 |
| - </div> |
| 2652 | +  |
2721 | 2653 |
|
2722 | 2654 | And we can change field of view:
|
2723 | 2655 |
|
|
2728 | 2660 |
|
2729 | 2661 | to get:
|
2730 | 2662 |
|
2731 |
| - <div class="render"> |
2732 |
| - |
2733 |
| -  |
2734 |
| - |
2735 |
| - </div> |
| 2663 | +  |
2736 | 2664 |
|
2737 | 2665 | </div>
|
2738 | 2666 |
|
|
2874 | 2802 |
|
2875 | 2803 | We get:
|
2876 | 2804 |
|
2877 |
| - <div class="render"> |
2878 |
| - |
2879 |
| -  |
2880 |
| - |
2881 |
| - </div> |
| 2805 | +  |
2882 | 2806 |
|
2883 | 2807 | </div>
|
2884 | 2808 |
|
|
2955 | 2879 | <div class='together'>
|
2956 | 2880 | This gives:
|
2957 | 2881 |
|
2958 |
| - <div class="render"> |
2959 |
| - |
2960 | 2882 | 
|
2961 | 2883 |
|
2962 |
| - </div> |
2963 | 2884 | </div>
|
2964 | 2885 |
|
2965 | 2886 | An interesting thing you might note is the glass balls don’t really have shadows which makes them
|
|
0 commit comments