I built a 3D dice roller as a Chrome extension and wanted dice that look like the marbled Chessex ones — those rich, swirling, Old-World-stone dice every tabletop player covets. The catch: the renderer ( @3d-dice/dice-box ) lets the user pick a color per die kind (d4 red, d6 blue, d20 gold, etc.), so the texture can't just be a flat painted bitmap. The marble pattern has to stay, but the color underneath has to follow whatever the user picked. This post is the recipe for generating those textures from scratch with simplex noise — no Photoshop, no marble photo, just code that produces something like this for every die: The pipeline is three layers stacked on top of plain noise, plus one trick about the alpha channel that took me a while to spot. Let's walk through it. Layer 1: Multi-octave simplex noise Start with the basic noise field. One sample of simplex noise gives you smooth, organic blobs that look more like cloud cover than rock.…