|
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 |
|
|
519 | 515 |
|
520 | 516 | with $t$ going from zero to one. In our case this produces:
|
521 | 517 |
|
522 |
| - <div class="render"> |
523 |
| - |
524 |
| -  |
525 |
| - |
526 |
| - </div> |
| 518 | +  |
527 | 520 |
|
528 | 521 | </div>
|
529 | 522 |
|
|
637 | 630 | <div class='together'>
|
638 | 631 | What we get is this:
|
639 | 632 |
|
640 |
| - <div class="render"> |
641 |
| - |
642 |
| -  |
643 |
| - |
644 |
| - </div> |
| 633 | +  |
645 | 634 |
|
646 | 635 | </div>
|
647 | 636 |
|
|
717 | 706 | <div class='together'>
|
718 | 707 | And that yields this picture:
|
719 | 708 |
|
720 |
| - <div class="render"> |
721 |
| - |
722 |
| -  |
723 |
| - |
724 |
| - </div> |
| 709 | +  |
725 | 710 |
|
726 | 711 | </div>
|
727 | 712 |
|
|
880 | 865 | the sphere, the normal will point outward, but if the ray is inside the sphere, the normal will
|
881 | 866 | point inward.
|
882 | 867 |
|
883 |
| - ![Figure [normal-directions]: Possible directions for sphere surface-normal geometry](../images/fig.normal-possibilities.jpg) |
| 868 | + ![Figure [normal-directions]: Possible directions for sphere surface-normal geometry |
| 869 | + ](../images/fig.normal-possibilities.jpg) |
884 | 870 |
|
885 | 871 | </div>
|
886 | 872 |
|
|
1232 | 1218 | This yields a picture that is really just a visualization of where the spheres are along with their
|
1233 | 1219 | surface normal. This is often a great way to look at your model for flaws and characteristics.
|
1234 | 1220 |
|
1235 |
| - <div class="render"> |
1236 |
| - |
1237 |
| -  |
1238 |
| - |
1239 |
| - </div> |
| 1221 | +  |
1240 | 1223 |
|
1241 | 1224 | </div>
|
1242 | 1225 |
|
|
1423 | 1406 | Zooming into the image that is produced, the big change is in edge pixels that are part background
|
1424 | 1407 | and part foreground:
|
1425 | 1408 |
|
1426 |
| - <div class="render"> |
1427 |
| - |
1428 |
| -  |
1429 |
| - |
1430 |
| - </div> |
| 1409 | +  |
1431 | 1410 |
|
1432 | 1411 | </div>
|
1433 | 1412 |
|
|
1602 | 1581 | <div class='together'>
|
1603 | 1582 | This gives us:
|
1604 | 1583 |
|
1605 |
| - <div class="render"> |
1606 |
| - |
1607 |
| -  |
1608 |
| - |
1609 |
| - </div> |
| 1584 | +  |
1610 | 1585 |
|
1611 | 1586 | </div>
|
1612 | 1587 |
|
|
1647 | 1622 | <div class='together'>
|
1648 | 1623 | That yields light grey, as we desire:
|
1649 | 1624 |
|
1650 |
| - <div class="render"> |
1651 |
| - |
1652 |
| -  |
1653 |
| - |
1654 |
| - </div> |
| 1625 | +  |
1655 | 1626 |
|
1656 | 1627 | </div>
|
1657 | 1628 |
|
|
1731 | 1702 | <div class='together'>
|
1732 | 1703 | After rendering we get a similar image:
|
1733 | 1704 |
|
1734 |
| - <div class="render"> |
1735 |
| - |
1736 |
| -  |
1737 |
| - |
1738 |
| - </div> |
| 1705 | +  |
1739 | 1706 |
|
1740 | 1707 | It's hard to tell the difference between these two diffuse methods, given that our scene of two
|
1741 | 1708 | spheres is so simple, but you should be able to notice two important visual differences:
|
|
1814 | 1781 |
|
1815 | 1782 | Gives us the following image:
|
1816 | 1783 |
|
1817 |
| - <div class="render"> |
1818 |
| - |
1819 |
| -  |
1820 |
| - |
1821 |
| - </div> |
| 1784 | +  |
1822 | 1786 |
|
1823 | 1787 | </div>
|
1824 | 1788 |
|
|
2141 | 2105 | <div class='together'>
|
2142 | 2106 | Which gives:
|
2143 | 2107 |
|
2144 |
| - <div class="render"> |
2145 |
| - |
2146 |
| -  |
2147 |
| - |
2148 |
| - </div> |
| 2108 | +  |
2149 | 2109 |
|
2150 | 2110 | </div>
|
2151 | 2111 |
|
|
2198 | 2158 | <div class='together'>
|
2199 | 2159 | We can try that out by adding fuzziness 0.3 and 1.0 to the metals:
|
2200 | 2160 |
|
2201 |
| - <div class="render"> |
2202 |
| - |
2203 |
| -  |
2204 |
| - |
2205 |
| - </div> |
| 2161 | +  |
2206 | 2162 |
|
2207 | 2163 | </div>
|
2208 | 2164 |
|
|
2223 | 2179 | there is a refraction ray at all. For this project, I tried to put two glass balls in our scene, and
|
2224 | 2180 | I got this (I have not told you how to do this right or wrong yet, but soon!):
|
2225 | 2181 |
|
2226 |
| - <div class="render"> |
2227 |
| - |
2228 |
| -  |
2229 |
| - |
2230 |
| - </div> |
| 2182 | +  |
2231 | 2183 |
|
2232 | 2184 | </div>
|
2233 | 2185 |
|
|
2331 | 2283 |
|
2332 | 2284 | This gives us the following result:
|
2333 | 2285 |
|
2334 |
| -<div class="render"> |
2335 |
| - |
2336 |
| -  |
2337 |
| - |
2338 |
| -</div> |
| 2286 | +  |
2339 | 2287 |
|
2340 | 2288 |
|
2341 | 2289 | Total Internal Reflection
|
|
2456 | 2404 |
|
2457 | 2405 | We get:
|
2458 | 2406 |
|
2459 |
| - <div class="render"> |
2460 |
| - |
2461 |
| -  |
2462 |
| - |
2463 |
| - </div> |
| 2407 | +  |
2464 | 2408 |
|
2465 | 2409 | </div>
|
2466 | 2410 |
|
|
2545 | 2489 | <div class='together'>
|
2546 | 2490 | This gives:
|
2547 | 2491 |
|
2548 |
| - <div class="render"> |
2549 |
| - |
2550 |
| -  |
2551 |
| - |
2552 |
| - </div> |
| 2492 | +  |
2553 | 2493 |
|
2554 | 2494 | </div>
|
2555 | 2495 |
|
|
2626 | 2566 |
|
2627 | 2567 | gives:
|
2628 | 2568 |
|
2629 |
| - <div class="render"> |
2630 |
| - |
2631 |
| -  |
2632 |
| - |
2633 |
| - </div> |
| 2569 | +  |
2634 | 2570 |
|
2635 | 2571 | </div>
|
2636 | 2572 |
|
|
2714 | 2650 |
|
2715 | 2651 | to get:
|
2716 | 2652 |
|
2717 |
| - <div class="render"> |
2718 |
| - |
2719 |
| -  |
2720 |
| - |
2721 |
| - </div> |
| 2653 | +  |
2722 | 2654 |
|
2723 | 2655 | And we can change field of view:
|
2724 | 2656 |
|
|
2729 | 2661 |
|
2730 | 2662 | to get:
|
2731 | 2663 |
|
2732 |
| - <div class="render"> |
2733 |
| - |
2734 |
| -  |
2735 |
| - |
2736 |
| - </div> |
| 2664 | +  |
2737 | 2665 |
|
2738 | 2666 | </div>
|
2739 | 2667 |
|
|
2875 | 2803 |
|
2876 | 2804 | We get:
|
2877 | 2805 |
|
2878 |
| - <div class="render"> |
2879 |
| - |
2880 |
| -  |
2881 |
| - |
2882 |
| - </div> |
| 2806 | +  |
2883 | 2807 |
|
2884 | 2808 | </div>
|
2885 | 2809 |
|
|
2956 | 2880 | <div class='together'>
|
2957 | 2881 | This gives:
|
2958 | 2882 |
|
2959 |
| - <div class="render"> |
2960 |
| - |
2961 | 2883 | 
|
2962 | 2884 |
|
2963 |
| - </div> |
2964 | 2885 | </div>
|
2965 | 2886 |
|
2966 | 2887 | An interesting thing you might note is the glass balls don’t really have shadows which makes them
|
|
0 commit comments