Matt Pfeiffer ᯅ's Avatar

Matt Pfeiffer ᯅ

@mattpfeiffer.bsky.social

 Platforms Engineer | Audio/Graphics | RealityKit | Metal

970 Followers  |  716 Following  |  130 Posts  |  Joined: 06.05.2023  |  1.7147

Latest posts by mattpfeiffer.bsky.social on Bluesky

Preview
PLY to RealityKit with Grid-Based Decimation (Example: HD Skeleton Scan) PLY to RealityKit with Grid-Based Decimation (Example: HD Skeleton Scan) - ModelIOLoader.swift

gist.github.com/Matt54/f001a...

05.10.2025 17:05 — 👍 4    🔁 1    💬 0    📌 0
Video thumbnail

RealityKit experiment #81
(code in the replies)

I found a scan of a human skeleton and wanted to try to visualize it in RealityKit. The PLY file had millions of triangles, so I had to decimate the mesh. It ended up being really satisfying to see the wireframe at different LODs

05.10.2025 17:05 — 👍 7    🔁 1    💬 1    📌 0

Thanks Clem! I would love to see that Gaussian Splat example

03.10.2025 16:49 — 👍 1    🔁 0    💬 0    📌 0
Preview
RealityKit SDF Falling Sand Animation (Metal + LowLevelMesh + Marching Cubes) RealityKit SDF Falling Sand Animation (Metal + LowLevelMesh + Marching Cubes) - EasingCurve.swift

gist.github.com/Matt54/afc92...

02.10.2025 09:46 — 👍 1    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #80
(gist in the replies)

LowLevelMesh “Falling Sand” dissolution and reassemble effect created with SDF shapes and Marching Cubes. A Metal compute shader uses a spatial sweep to "release" triangles that rigidly start to fall

02.10.2025 09:45 — 👍 10    🔁 2    💬 2    📌 0
Preview
RealityKit Extruded Text to LowLevelMesh animated by Metal compute shader RealityKit Extruded Text to LowLevelMesh animated by Metal compute shader - ExtrudedTextLowLevelMeshView.swift

gist.github.com/Matt54/44177...

25.09.2025 11:27 — 👍 1    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #79
(code in the replies)

Animating 3D text by converting the output of MeshResource(extruding:) to a LowLevelMesh and applying a Metal compute shader

The MeshResource was interesting to unpack since it had multiple models/parts plus instance transforms

25.09.2025 11:27 — 👍 8    🔁 1    💬 1    📌 0

Thank you! 🙏

18.09.2025 15:59 — 👍 0    🔁 0    💬 0    📌 0
Preview
RealityKit Explode and Assemble SDF Shape (Metal + LowLevelMesh + Marching Cubes) RealityKit Explode and Assemble SDF Shape (Metal + LowLevelMesh + Marching Cubes) - EasingCurve.swift

gist.github.com/Matt54/87edc...

18.09.2025 11:25 — 👍 2    🔁 1    💬 0    📌 0
Video thumbnail

RealityKit experiment #78
(gist in the replies)

LowLevelMesh explode-and-assemble animation created by meshing an SDF using Marching Cubes and rigidly pushing it’s triangles outward

18.09.2025 11:24 — 👍 9    🔁 3    💬 2    📌 0
Preview
RealityKit Color-Blending Metaballs (Metal + LowLevelMesh + Marching Cubes) RealityKit Color-Blending Metaballs (Metal + LowLevelMesh + Marching Cubes) - MarchingCubesColorBlobParams.h

gist.github.com/Matt54/bcc31...

29.08.2025 12:20 — 👍 2    🔁 1    💬 0    📌 0
Video thumbnail

RealityKit experiment #77
(gist in the replies)

Color-blending metaballs created from animated sphere SDFs via Marching Cubes. LowLevelMesh vertices store per-vertex color in the Geometry Color vertex attribute, read by ShaderGraphMaterial

29.08.2025 12:20 — 👍 7    🔁 1    💬 1    📌 0

Ahhh, well I love that description 😆

20.08.2025 09:27 — 👍 1    🔁 0    💬 0    📌 0

Is it the room?

20.08.2025 09:17 — 👍 0    🔁 0    💬 1    📌 0
Preview
RealityKit Marching Cubes Blob (Metal + LowLevelMesh) RealityKit Marching Cubes Blob (Metal + LowLevelMesh) - MarchingCubesBlobParams.h

gist.github.com/Matt54/1a506...

20.08.2025 09:00 — 👍 3    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #76
(gist in the replies)

LowLevelMesh blob from meshing the smooth-min of animated sphere SDFs with marching cubes. Glassy ShaderGraphMaterial is based on Apple's "Implementing adjustable material" sample

20.08.2025 08:59 — 👍 17    🔁 3    💬 4    📌 0

Haha exactly 😆

13.08.2025 16:57 — 👍 1    🔁 0    💬 0    📌 0

gist.github.com/Matt54/aec7d...

13.08.2025 11:40 — 👍 1    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #75
(gist in the replies)

LowLevelMesh shape shifting by interpolating between two signed distance fields and meshing with marching cubes

13.08.2025 11:40 — 👍 29    🔁 7    💬 3    📌 0
Preview
Marching Cubes Metaballs in RealityKit (Metal + LowLevelMesh) Marching Cubes Metaballs in RealityKit (Metal + LowLevelMesh) - MarchingCubesParams.h

gist.github.com/Matt54/881d7...

08.08.2025 11:16 — 👍 3    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #74
(gist in the replies)

- LowLevelMesh with disconnected geometry
- Marching Cubes + SDF for vertex positions
- Vertex normals from SDF gradient
- Polynomial smooth-min to blend the shapes

08.08.2025 11:15 — 👍 25    🔁 5    💬 2    📌 0
Preview
RealityKit burn fade sphere: LowLevelMesh, ShaderGraphMaterial, and compute shader RealityKit burn fade sphere: LowLevelMesh, ShaderGraphMaterial, and compute shader - BurnFadeParams.h

gist.github.com/Matt54/bf9d1...

22.07.2025 00:22 — 👍 0    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #73
(gist in the replies)

Here's a simple burn fade example. The ShaderGraphMaterial directly sets the color and opacity from the UV2 attribute of the LowLevelMesh vertices and the Metal compute shader updates those color/opacity values

22.07.2025 00:22 — 👍 5    🔁 2    💬 1    📌 0

Yeah that makes sense

The idea came to me while building a glowing torus for a project and I just wanted to see how it would look as a spinner. Performance is probably not good 😆

20.07.2025 20:18 — 👍 1    🔁 0    💬 0    📌 0
Preview
RealityKit LowLevelMesh Glowing Torus Spinner RealityKit LowLevelMesh Glowing Torus Spinner. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com/Matt54/20595...

20.07.2025 12:42 — 👍 0    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #72
(gist in the comments)

LowLevelMesh Torus Spinner
- incrementally adds vertices/indices (or shifts the indexOffset when removing)
- multiple layers of varying opacity and minor radius are stacked with additive blend mode for the glow effect

20.07.2025 12:42 — 👍 9    🔁 2    💬 2    📌 0
Preview
Burn Fade Animation for USDZ Models in RealityKit using LowLevelMesh, ShaderGraphMaterial & Metal Compute Shader Burn Fade Animation for USDZ Models in RealityKit using LowLevelMesh, ShaderGraphMaterial & Metal Compute Shader - BurnFadeModelView.swift

gist.github.com/Matt54/a9d12...

16.07.2025 11:31 — 👍 0    🔁 0    💬 0    📌 0
Video thumbnail

RealityKit experiment #71
(gist in the comments)

- Loads mesh & texture from USDZ
- LowLevelMesh verts use float4 color+alpha in uv2
- ShaderGraphMaterial blends texture with uv2.rgb, sets opacity from uv2.w
- Metal Compute Shader animates uv2

16.07.2025 11:30 — 👍 10    🔁 3    💬 1    📌 0

@vrhermit.com but that's only on the growth animation of the mesh. If you kept the mesh quality low and didn't care about the growth animation, you could probably go really high! You would just need to replace the incremental growth implementation with an algorithm that calculates the end state

06.07.2025 16:49 — 👍 1    🔁 0    💬 1    📌 0

There's currently a bottleneck on the CPU-side that would prevent you from going too high (how high depends on the mesh quality), but I was thinking about trying to combine this idea with MeshInstancesComponent to create a field of grass since it's all one mesh

06.07.2025 16:40 — 👍 0    🔁 0    💬 1    📌 0

@mattpfeiffer is following 19 prominent accounts