Tyler Carrol213 downloadsRender SVG images from frontmatter-defined objects, layers, and views.
This logo was created using this plugin and is available in the
/sketch-matter-demo-vault
SketchMatter renders SVG images from the frontmatter in Obsidian notes.
The following examples are available in the
/sketch-matter-demo-vault

polygon, polyline, line, circle, rect, ellipse, text, and compositeAn object note usually contains:
sketchmatter-type/continentfill, stroke, strokeWidth, and opacityExample:
---
tags:
- sketchmatter-type/continent
- sketchmatter-type/label
sketchmatter-layer: 100
sketchmatter-coordinates:
- "100, 100"
- "300, 120"
- "360, 240"
- "220, 300"
sketchmatter-label-coordinates:
- "240, 190"
sketchmatter-label-text: Sunreach
sketchmatter-font-family: Georgia
sketchmatter-font-size: 24
sketchmatter-font-style:
- bold
- italic
sketchmatter-font-color: "#4b2d12"
sketchmatter-image-id: map1
---
sketchmatter-image-id can be a single ID, a comma-separated string, or a YAML array when one object belongs to multiple images.
Coordinates are interpreted by the resolved shape renderer. Type definitions in plugin settings provide the usual shape and style defaults, and object-level frontmatter can override them. If a note has multiple matching type tags, SketchMatter emits one object per type tag so a single note can render, for example, both a continent polygon and its label.
Type definitions are configured in Settings → Community plugins → SketchMatter.
Each type definition can specify:
sketchmatter-label-layer)The default settings include:
label type definition that uses the built-in text shape and reads its position from sketchmatter-label-coordinatescity type definition that uses the built-in composite shape for a marker symbolIf a shape is not explicitly set, SketchMatter can infer one from the coordinate structure.
View definition notes are tagged like this:
tags:
- sketchmatter-view/political
Supported frontmatter:
sketchmatter-include-layerssketchmatter-exclude-layersincludeImageIdsexcludeImageIdsExample:
---
tags:
- sketchmatter-view/political
sketchmatter-include-layers: 100-400
includeImageIds:
- map3
---
Views can be selected in the panel or referenced from a sketchmatter code block.
Image definition notes are tagged like this:
tags:
- sketchmatter-image/map2
Supported frontmatter:
sketchmatter-widthsketchmatter-heightsketchmatter-background-colorsketchmatter-background-imagesketchmatter-preserve-aspect-ratiosketchmatter-projection (see the supported projections below)sketchmatter-background-image accepts vault assets, wikilinks, absolute URLs, and data URLs.
For 2D previews and SVG exports, image dimensions set the minimum canvas size. The canvas expands to include rendered objects outside those dimensions, including objects at negative coordinates. Without an image definition, the minimum canvas size is 1200 × 900. Backgrounds keep their configured size. Globe textures keep the fixed image dimensions for projection alignment.
Use a sketchmatter code block:
image: map1
view: political
Supported parameters:
imageviewmode (2d or globe)projection (see the supported projections below)Both are optional. The view value is case-insensitive. If an image is omitted, SketchMatter will try to resolve one from the selected view or the filtered objects.
Use an interactive globe in a note with:
image: Earth
view: political
mode: globe
projection: equirectangular
Projection describes the layout of the completed source map. It does not change existing object coordinates or reproject the 2D SVG. A code-block or panel override takes precedence over the image definition, which takes precedence over the plugin default.
Supported source projections:
equirectangular — direct longitude and latitude mappingmercator — Web Mercator, with polar caps clamped at approximately ±85.0511°miller — Miller cylindrical compromise projectiongall-peters — Gall–Peters equal-area cylindrical projectionmollweide — Mollweide equal-area elliptical projectionrobinson — Robinson compromise projectionwinkel-tripel — Winkel Tripel compromise projectionFor the five extended projections, SketchMatter assumes the complete world projection is centered and proportionally fitted to the full image canvas. Select the projection in which the source map was authored; selecting a different projection does not convert the underlying note coordinates. Winkel Tripel uses a 2048×1024 texture limit to keep interactive preview generation responsive.
Globe previews require WebGL. If WebGL or a texture asset is unavailable, SketchMatter displays the existing 2D preview with an error message. Remote image assets remain subject to the source server's CORS policy. Editing and SVG export continue to use the 2D map.
In addition to type-definition styles, object notes can opt into:
sketchmatter-opacitysketchmatter-texturesketchmatter-masksketchmatter-blend and sketchmatter-blend-radiussketchmatter-overlap-pattern, sketchmatter-overlap-thickness, sketchmatter-overlap-spacing, sketchmatter-overlap-angle, and sketchmatter-overlap-colorsketchmatter-seed, sketchmatter-magnitude, and sketchmatter-noisesketchmatter-label-textsketchmatter-font-family, sketchmatter-font-size, sketchmatter-font-style, and sketchmatter-font-colorsketchmatter-texture accepts the same asset forms as background images: vault paths, wikilinks, absolute URLs, and data URLs.
Mask selectors can target:
type:<type-name>file:<path-or-basename>continentOverlap patterns are drawn only where objects of the same type intersect. Supported pattern values are:
lineshatchcrosshatchdotsFor lines, use sketchmatter-overlap-angle to rotate the line direction (degrees, default 0).
In the panel, select Export SVG to write the current render to the vault root.
Typical filenames look like:
sketch-matter-export-all.svgsketch-matter-export-political-map1.svgAll user-facing frontmatter and tag-prefix keys are configurable in plugin settings. The defaults include:
sketchmatter-typesketchmatter-viewsketchmatter-imagesketchmatter-layersketchmatter-shapesketchmatter-childrensketchmatter-coordinatessketchmatter-radiussketchmatter-image-idsketchmatter-label-coordinatessketchmatter-label-textsketchmatter-font-familysketchmatter-font-sizesketchmatter-font-stylesketchmatter-font-colorsketchmatter-widthsketchmatter-heightsketchmatter-background-colorsketchmatter-background-imagesketchmatter-preserve-aspect-ratiosketchmatter-opacitysketchmatter-texturesketchmatter-masksketchmatter-seedsketchmatter-magnitudesketchmatter-noisesketchmatter-blendsketchmatter-blend-radiussketchmatter-overlap-patternsketchmatter-overlap-thicknesssketchmatter-overlap-spacingsketchmatter-overlap-anglesketchmatter-overlap-colorsketchmatter-fillsketchmatter-strokesketchmatter-stroke-widthdefaultLayer: 1000 (fallback layer for objects with no layer set)npm install
npm run build
main.js, manifest.json, and styles.css to:<Vault>/.obsidian/plugins/sketch-matter/
For watch mode during development:
npm run dev
This repository includes a ready-made demo vault in /sketch-matter-demo-vault.
.\scripts\build-to-demo-vault.ps1
npm run buildmain.js, manifest.json, and styles.css to sketch-matter-demo-vault/.obsidian/plugins/sketch-matter/sketch-matter-demo-vault in ObsidianSee sketch-matter-demo-vault/README.md for a guided walkthrough.
SketchMatter works with three note types:
At render time, the plugin collects objects, applies any selected view and image filters, resolves shapes and styling, and renders the matching objects into one SVG.