Skip to content

Commit de29d24

Browse files
authored
Merge pull request #507 from RayTracing/pixel-image
Rendered images use Markdeep class=pixel
2 parents e824ff6 + 7110e11 commit de29d24

File tree

4 files changed

+67
-282
lines changed

4 files changed

+67
-282
lines changed

books/RayTracingInOneWeekend.html

+25-104
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@
137137
Opening the output file (in `ToyViewer` on my Mac, but try it in your favorite viewer and Google
138138
“ppm viewer” if your viewer doesn’t support it) shows this result:
139139

140-
<div class="render">
141-
142-
![First PPM image](../images/img.first-ppm-image.png)
143-
144-
</div>
140+
![First PPM image](../images/img.first-ppm-image.png class=pixel)
145141

146142
</div>
147143

@@ -519,11 +515,8 @@
519515

520516
with $t$ going from zero to one. In our case this produces:
521517

522-
<div class="render">
523-
524-
![A blue-to-white gradient depending on ray Y coordinate](../images/img.blue-to-white.png)
525-
526-
</div>
518+
![A blue-to-white gradient depending on ray Y coordinate
519+
](../images/img.blue-to-white.png class=pixel)
527520

528521
</div>
529522

@@ -637,11 +630,7 @@
637630
<div class='together'>
638631
What we get is this:
639632

640-
<div class="render">
641-
642-
![A simple red sphere](../images/img.red-sphere.png)
643-
644-
</div>
633+
![A simple red sphere](../images/img.red-sphere.png class=pixel)
645634

646635
</div>
647636

@@ -717,11 +706,7 @@
717706
<div class='together'>
718707
And that yields this picture:
719708

720-
<div class="render">
721-
722-
![A sphere colored according to its normal vectors](../images/img.normals-sphere.png)
723-
724-
</div>
709+
![A sphere colored according to its normal vectors](../images/img.normals-sphere.png class=pixel)
725710

726711
</div>
727712

@@ -880,7 +865,8 @@
880865
the sphere, the normal will point outward, but if the ray is inside the sphere, the normal will
881866
point inward.
882867

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)
884870

885871
</div>
886872

@@ -1232,11 +1218,8 @@
12321218
This yields a picture that is really just a visualization of where the spheres are along with their
12331219
surface normal. This is often a great way to look at your model for flaws and characteristics.
12341220

1235-
<div class="render">
1236-
1237-
![Resulting render of normals-colored sphere with ground](../images/img.normals-sphere-ground.png)
1238-
1239-
</div>
1221+
![Resulting render of normals-colored sphere with ground
1222+
](../images/img.normals-sphere-ground.png class=pixel)
12401223

12411224
</div>
12421225

@@ -1423,11 +1406,7 @@
14231406
Zooming into the image that is produced, the big change is in edge pixels that are part background
14241407
and part foreground:
14251408

1426-
<div class="render">
1427-
1428-
![Close-up of antialiased pixels](../images/img.antialias.png)
1429-
1430-
</div>
1409+
![Close-up of antialiased pixels](../images/img.antialias.png class=pixel)
14311410

14321411
</div>
14331412

@@ -1602,11 +1581,7 @@
16021581
<div class='together'>
16031582
This gives us:
16041583

1605-
<div class="render">
1606-
1607-
![First render of a diffuse sphere](../images/img.first-diffuse.jpg)
1608-
1609-
</div>
1584+
![First render of a diffuse sphere](../images/img.first-diffuse.jpg class=pixel)
16101585

16111586
</div>
16121587

@@ -1647,11 +1622,7 @@
16471622
<div class='together'>
16481623
That yields light grey, as we desire:
16491624

1650-
<div class="render">
1651-
1652-
![Diffuse sphere, with gamma correction](../images/img.gamma-correct.jpg)
1653-
1654-
</div>
1625+
![Diffuse sphere, with gamma correction](../images/img.gamma-correct.jpg class=pixel)
16551626

16561627
</div>
16571628

@@ -1731,11 +1702,7 @@
17311702
<div class='together'>
17321703
After rendering we get a similar image:
17331704

1734-
<div class="render">
1735-
1736-
![Correct rendering of Lambertian spheres](../images/img.correct-lambertian.png)
1737-
1738-
</div>
1705+
![Correct rendering of Lambertian spheres](../images/img.correct-lambertian.png class=pixel)
17391706

17401707
It's hard to tell the difference between these two diffuse methods, given that our scene of two
17411708
spheres is so simple, but you should be able to notice two important visual differences:
@@ -1814,11 +1781,8 @@
18141781

18151782
Gives us the following image:
18161783

1817-
<div class="render">
1818-
1819-
![Rendering of diffuse spheres with hemispherical scattering](../images/img.rand-hemispherical.png)
1820-
1821-
</div>
1784+
![Rendering of diffuse spheres with hemispherical scattering
1785+
](../images/img.rand-hemispherical.png class=pixel)
18221786

18231787
</div>
18241788

@@ -2141,11 +2105,7 @@
21412105
<div class='together'>
21422106
Which gives:
21432107

2144-
<div class="render">
2145-
2146-
![Shiny metal](../images/img.metal-shiny.png)
2147-
2148-
</div>
2108+
![Shiny metal](../images/img.metal-shiny.png class=pixel)
21492109

21502110
</div>
21512111

@@ -2198,11 +2158,7 @@
21982158
<div class='together'>
21992159
We can try that out by adding fuzziness 0.3 and 1.0 to the metals:
22002160

2201-
<div class="render">
2202-
2203-
![Fuzzed metal](../images/img.metal-fuzz.png)
2204-
2205-
</div>
2161+
![Fuzzed metal](../images/img.metal-fuzz.png class=pixel)
22062162

22072163
</div>
22082164

@@ -2223,11 +2179,7 @@
22232179
there is a refraction ray at all. For this project, I tried to put two glass balls in our scene, and
22242180
I got this (I have not told you how to do this right or wrong yet, but soon!):
22252181

2226-
<div class="render">
2227-
2228-
![Glass first](../images/img.glass-first.png)
2229-
2230-
</div>
2182+
![Glass first](../images/img.glass-first.png class=pixel)
22312183

22322184
</div>
22332185

@@ -2331,11 +2283,7 @@
23312283

23322284
This gives us the following result:
23332285

2334-
<div class="render">
2335-
2336-
![Glass sphere that always refracts](../images/img.glass-always-refract.png)
2337-
2338-
</div>
2286+
![Glass sphere that always refracts](../images/img.glass-always-refract.png class=pixel)
23392287

23402288

23412289
Total Internal Reflection
@@ -2456,11 +2404,7 @@
24562404

24572405
We get:
24582406

2459-
<div class="render">
2460-
2461-
![Glass sphere that sometimes refracts](../images/img.glass-sometimes-refract.png)
2462-
2463-
</div>
2407+
![Glass sphere that sometimes refracts](../images/img.glass-sometimes-refract.png class=pixel)
24642408

24652409
</div>
24662410

@@ -2545,11 +2489,7 @@
25452489
<div class='together'>
25462490
This gives:
25472491

2548-
<div class="render">
2549-
2550-
![A hollow glass sphere](../images/img.glass-hollow.png)
2551-
2552-
</div>
2492+
![A hollow glass sphere](../images/img.glass-hollow.png class=pixel)
25532493

25542494
</div>
25552495

@@ -2626,11 +2566,7 @@
26262566

26272567
gives:
26282568

2629-
<div class="render">
2630-
2631-
![A wide-angle view](../images/img.wide-view.png)
2632-
2633-
</div>
2569+
![A wide-angle view](../images/img.wide-view.png class=pixel)
26342570

26352571
</div>
26362572

@@ -2714,11 +2650,7 @@
27142650

27152651
to get:
27162652

2717-
<div class="render">
2718-
2719-
![A distant view](../images/img.view-distant.png)
2720-
2721-
</div>
2653+
![A distant view](../images/img.view-distant.png class=pixel)
27222654

27232655
And we can change field of view:
27242656

@@ -2729,11 +2661,7 @@
27292661

27302662
to get:
27312663

2732-
<div class="render">
2733-
2734-
![Zooming in](../images/img.view-zoom.png)
2735-
2736-
</div>
2664+
![Zooming in](../images/img.view-zoom.png class=pixel)
27372665

27382666
</div>
27392667

@@ -2875,11 +2803,7 @@
28752803

28762804
We get:
28772805

2878-
<div class="render">
2879-
2880-
![Spheres with depth-of-field](../images/img.depth-of-field.png)
2881-
2882-
</div>
2806+
![Spheres with depth-of-field](../images/img.depth-of-field.png class=pixel)
28832807

28842808
</div>
28852809

@@ -2956,11 +2880,8 @@
29562880
<div class='together'>
29572881
This gives:
29582882

2959-
<div class="render">
2960-
29612883
![Final scene](../images/img.book1-final.jpg)
29622884

2963-
</div>
29642885
</div>
29652886

29662887
An interesting thing you might note is the glass balls don’t really have shadows which makes them

0 commit comments

Comments
 (0)