summaryrefslogtreecommitdiffstats
path: root/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'index.md')
-rwxr-xr-xindex.md49
1 files changed, 24 insertions, 25 deletions
diff --git a/index.md b/index.md
index 7ed2056..3a260dd 100755
--- a/index.md
+++ b/index.md
@@ -7,7 +7,7 @@ lang: en
While walking through town the other day, I saw a pillar that looks a bit like this:
-![A circular pillar with vertical tiles.](./images/2026_07_12/Screenshot from 2026-07-12 17-53-00.png)
+![A circular pillar with vertical tiles.](./images/2026_07_12/Screenshot from 2026-07-12 17-53-00.jpg)
In other words, it was a circular vertical column decorated with flat
tiles. I got to thinking: how do you make such a column? I would probably
@@ -21,7 +21,7 @@ number of tiles. Each tile creates a tiny gap vs. the cylindrical pillar,
and those gaps would add up over the circumference of the pillar. Your
tiles wouldn't exactly meet up when you get back to where you started!
-![Gaps introduced by straight tiles surrounding a circular column.](./images/2026_07_12/Screenshot from 2026-07-12 18-05-04.png)
+![Gaps introduced by straight tiles surrounding a circular column.](./images/2026_07_12/Screenshot from 2026-07-12 18-05-04.jpg)
There should be a simple, mathematical relation between the circumference
of the pillar, and the perimeter of the regular polygon with $n$
@@ -31,7 +31,7 @@ Let's draw a couple pictures. To keep things easy to visualize, we'll look
at a case where $n = 3$, but we'll keep our math generalizable to any $n$.
![Figure 1: A circle with radius $r$ circumscribed by a regular triangle with edge
-length $e$.](./images/2026_07_12/Screenshot from 2026-07-12 18-21-54.png)
+length $e$.](./images/2026_07_12/Screenshot from 2026-07-12 18-21-54.jpg)
Our circle has radius $r$, and the circumscribing polygon has edge length $e$.
@@ -41,7 +41,7 @@ precisely, an expression for $\frac{n e}{2 \pi r}$ solely in terms of $n$.)
Zooming in on the bottom-right corner of our circle, we can define a few more
interesting quantities:
-![Figure 2: The bottom-right third of our circle with labeled quantities.](./images/2026_07_12/Screenshot from 2026-07-12 18-41-43.png)
+![Figure 2: The bottom-right third of our circle with labeled quantities.](./images/2026_07_12/Screenshot from 2026-07-12 18-41-43.jpg)
We define:
@@ -53,7 +53,7 @@ We define:
Finally, if we focus on the region outlined by $r$, $h$ and the bottom of
the polygon:
-![Figure 3: The aforementioned region.](./images/2026_07_12/Screenshot from 2026-07-12 18-49-59.png)
+![Figure 3: The aforementioned region.](./images/2026_07_12/Screenshot from 2026-07-12 18-49-59.jpg)
We define one final quantity, $\phi$, the interior angle of the right
triangle formed by $h-r$ and $r$.
@@ -124,7 +124,7 @@ $$
This represents the ratio of these two shapes' circumferences, so we expect that at the limit of n, it should be 1. Therefore we subtract 1 to get an error function. This is the graph of $P/C-1$:
-![Plot of $P/C-1$ (yellow).](./images/2026_07_12/Screenshot from 2026-07-13 00-22-53.png)
+![Plot of $P/C-1$ (yellow).](./images/2026_07_12/Screenshot from 2026-07-13 00-22-53.jpg)
As expected, the error starts out very large with few tiles, then quickly drops
towards 0 (the ratio converging to 1).
@@ -139,7 +139,7 @@ proportional to its size $\frac{1}{n}$).
> *TODO: I think that this measure of relative error is wrong.*
-![Plot of $P/C-1$ (yellow) and $(P/C -1) \cdot n$ (orange).](./images/2026_07_12/Screenshot from 2026-07-13 00-22-58.png)
+![Plot of $P/C-1$ (yellow) and $(P/C -1) \cdot n$ (orange).](./images/2026_07_12/Screenshot from 2026-07-13 00-22-58.jpg)
Here are the values of $P/C-1$ and $(P/C-1) \cdot n$ for up to 30 tiles:
@@ -493,7 +493,7 @@ subject at octahedral lattice points, record them to an atlas, then reconstruct
those photos in a particle.
![Octahedral lattice points around some object.](./images/2026_01_14/Screenshot from 2026-01-14
-13-35-40.png)
+13-35-40.jpg)
## But why octahedrons?
@@ -504,7 +504,7 @@ any trig functions, making it suitable for use in realtime graphics.
This is what an octahedron looks like:
![Unit octahedron.](./images/2026_01_14/Screenshot from 2026-01-14
-13-54-05.png)
+13-54-05.jpg)
It is a polyhedron with 8 triangular faces and 6 vertices. The equator is a
square.
@@ -513,22 +513,22 @@ Let's work out how we'd convert this octahedron to a plane.
First, we project the upper hemisphere onto the xz plane:
![Octahedron with upper hemisphere projected onto xz
-plane.](./images/2026_01_14/Screenshot from 2026-01-14 13-50-27.png)
+plane.](./images/2026_01_14/Screenshot from 2026-01-14 13-50-27.jpg)
Next, we effectively need to "rotate" the triangles in the lower half around
those diagonal edges. We can cheat by first *reflecting* the bottom vertex of each
triangle about its diagonal edge:
-![Octahedron with reflected lower hemisphere.](./images/2026_01_14/Screenshot from 2026-01-14 13-58-18.png)
+![Octahedron with reflected lower hemisphere.](./images/2026_01_14/Screenshot from 2026-01-14 13-58-18.jpg)
Finally, we can just project those points in the lower hemisphere onto the xz
plane:
-![Fully unwrapped octahedron.](./images/2026_01_14/Screenshot from 2026-01-14 13-59-24.png)
+![Fully unwrapped octahedron.](./images/2026_01_14/Screenshot from 2026-01-14 13-59-24.jpg)
Viewed head on, we can see a very beautifully symmetric unwrapping:
-![Unwrapped octahedron, head on.](./images/2026_01_14/Screenshot from 2026-01-14 14-00-16.png)
+![Unwrapped octahedron, head on.](./images/2026_01_14/Screenshot from 2026-01-14 14-00-16.jpg)
Note that we never actually did any rotations, so there no trig! Here's the
same procedure in code:
@@ -642,7 +642,7 @@ With this mapping, we can write some code to spawn cameras at the lattice
points of an octahedral-mapped hemisphere, pointing in at some target object,
and generate an atlas of images taken at different angles:
-![Camera lattice points.](./images/2026_01_14/Screenshot\ from\ 2026-01-14\ 15-13-03.png)
+![Camera lattice points.](./images/2026_01_14/Screenshot\ from\ 2026-01-14\ 15-13-03.jpg)
![Generated atlas.](./images/2026_01_14/Impostor_atlas.png)
@@ -712,7 +712,7 @@ pretty tightly. Here's Suzanne with that correction in place:
Here's the atlas. Pretty tight packing - could probably be optimized a little
further though:
-![Sus-anne atlas.](./images/2026_01_14/suzanne_atlas.png)
+![Sus-anne atlas.](./images/2026_01_14/suzanne_atlas.jpg)
## Impostor v3
@@ -1117,7 +1117,7 @@ raymarch inside a wholly self contained coordinate system.
I've pulled this off, but not in a way which is useful for characters (yet).
-![One draw call, many raymarched objects.](./images/2025_06_11/fake_origins_31.png){width=80%}
+![One draw call, many raymarched objects.](./images/2025_06_11/fake_origins_31.jpg){width=80%}
TLDR:
@@ -1281,22 +1281,22 @@ geometry freely. Re-bake once you're done and everything just works.
4. Shearing works, but doesn't permit re-baking.
-![Test setup, no shearing](./images/2025_06_11/fake_origins_32.png){width=80%}
+![Test setup, no shearing](./images/2025_06_11/fake_origins_32.jpg){width=80%}
![Shear in Blender but don't
-re-bake.](./images/2025_06_11/fake_origins_33.png){width=80%}
+re-bake.](./images/2025_06_11/fake_origins_33.jpg){width=80%}
![Shear in Blender and
-re-bake](./images/2025_06_11/fake_origins_34.png){width=80%}
+re-bake](./images/2025_06_11/fake_origins_34.jpg){width=80%}
-![Shear in Unity.](./images/2025_06_11/fake_origins_35.png){width=80%}
+![Shear in Unity.](./images/2025_06_11/fake_origins_35.jpg){width=80%}
## Blender and Unity tooling
I've written a Blender plugin to permit myself to bake the vectors and
quaternions as described above.
-![Blender overview.](./images/2025_06_11/fake_origins_36.png){width=80%}
+![Blender overview.](./images/2025_06_11/fake_origins_36.jpg){width=80%}
The plugin supports baking vectors and quaternions on extremely large meshes
primarily through caching. If your mesh contains many submeshes that are
@@ -1311,7 +1311,7 @@ going through every combo of 90 degrees (64 total) if you run into trouble. Use
speed up the process. You can visualize the vectors with my Unity script, which
is described below.
-![Baker options.](./images/2025_06_11/fake_origins_38.png){width=80%}
+![Baker options.](./images/2025_06_11/fake_origins_38.jpg){width=80%}
It also supports a bunch of other workflows, mostly designed for the voxel
world creation workflow:
@@ -1344,7 +1344,7 @@ Put them on a curve and select your instance. Then use the "Pack UV island by
submesh Z" plugin tool to actually pack them.
![Instance axis-aligned geometry and sort
-UVs.](./images/2025_06_11/fake_origins_37.png){width=80%}
+UVs.](./images/2025_06_11/fake_origins_37.jpg){width=80%}
Finally, I have a Unity script which lets you visualize the raw baked vectors,
and the "corrected" baked vectors, i.e. those rotated with the baked
@@ -1355,7 +1355,7 @@ orange ones should converge at the center of each submesh.
can correct for that in your SDF.)
![Visualize baked data in
-Unity.](./images/2025_06_11/fake_origins_39.png){width=80%}
+Unity.](./images/2025_06_11/fake_origins_39.jpg){width=80%}
# how much CO2 do American cars produce?
23 May 2025
@@ -1654,4 +1654,3 @@ second according to the eyeball test.
<source src="https://yummers.dev/images/danser.webm" type="video/webm">
me rn
</video>
-