the main coding, design, and code testing was done by me.
Freehand drawing, annotations, and a laser pointer for Foundry VTT (v13–v14). Draw on the map (moves with pan and zoom, optionally saved to the scene) or on the screen (pinned to the viewport, fades out automatically).
Tools
- Draw — 16 brushes: ink (Pen, Pressure pen, Monoline), flat (Flat rect, Calligraphy, Flat bristle, Pixel square), dry media (Pencil, Charcoal, Chalk), wet (Marker, Watercolor, Airbrush, Soft brush), and effects (Neon glow, Splatter). Hold for straight lines.
Shift - Paint (wet media, map only) — Watercolour, wash, ink, gouache, oil, clear water, blender, and sponge brushes on a choice of papers (cold-pressed, hot-pressed, rough, xuan, canvas). Paint is simulated rather than drawn: pigments mix subtractively, a loaded brush drags and blends wet colour, watercolour spreads along the paper fibres and darkens at its edges, granulating pigment settles into the paper's tooth, ink builds up layer by layer, and paint stays workable until it dries (oil much longer than water). Pigment and water amounts are set per stroke; Dry now dries everything at once.
- Highlight — Highlighter stroke or lasso area fill.
- Arrow — Straight or freehand, single- or double-headed.
- Shape — Line, rectangle, ellipse, and polygon ( snaps 15° / square / circle; draws from center; double-click, right-click, or closes a polygon). Supports dashed outlines, hand-drawn sketchy lines, solid or patterned fills (hachure, cross-hatch, dots), and grid snap.
ShiftAltEnter - Laser — Glowing trail behind the pointer. Ephemeral and excluded from undo history.
- Text — Click and type; adds a line, or clicking outside commits, and cancels. Text grows to fit by default. Double-click with Select (or click with Text) to edit again. Drag the text to move it, side handles to set a wrapping width, or corner handles to scale the font; use “Restore automatic text width” to remove wrapping.
EnterCtrl/Cmd+EnterEsc - Eraser — Whole-mark or partial (masked) erasing, with optional rectangular or soft feathered nibs and a Current layer only filter.
- Select & transform — Marquee or lasso selection (touch or contain; adds, removes, selects all, optional Current layer only). Drag to move, or use the transform box to scale, rotate around a movable pivot, skew, distort, apply perspective, flip, rotate 90°, enter an exact scale/angle, duplicate (), recolour, or delete.
ShiftCtrlCtrl+ACtrl+D - Eyedropper — Samples the actual visible colour on canvas (map, tokens, wet paint, annotations, lighting, and fog) with a live swatch and hover preview.
#RRGGBB
Strokes stream live to other players (~33 ms batches, with optional name tags), and late joiners receive any active temporary marks. Lifetimes and fades run on Foundry's server clock so marks disappear at the same moment for everyone. Each user has their own undo/redo stack and a scoped clear menu (clearing others' marks or permanent annotations always asks for confirmation). Mouse, touch, and stylus are all supported, with hardware pressure/tilt, palm rejection, and velocity-based simulation when no pen is present.
Brush Studio & Dynamics
Click the Studio button on the palette to tune a brush beyond its defaults: opacity, blend mode (normal, multiply, screen, overlay, add), nib angle and angle mode (fixed, follow stroke, pen tilt, pen twist), flatness, corner radius, hardness, flow, spacing, scatter, and paper grain. Modified brushes can be saved as custom presets and exported or imported as JSON.
Turn on Custom dynamics to drive size, flow, hardness, angle, flatness, scatter, or spacing with editable response curves. Available sensors are pressure, tilt, speed, direction (absolute, relative to start, or across the nib), and random (per dab, per stroke, or smooth noise). One parameter can combine several sensors, and the preview doubles as a test pad. Strokes carry their dynamics so they look the same on every client; strokes without custom dynamics use the original brush path unchanged.
Drawing Aids
The Aids popover on the palette covers input smoothing and canvas guides:
- Stabilization & smoothing — One Euro dejitter, lazy-string or time-average stabilizer (zoom-independent, with optional catch-up when the pen lifts), and post-stroke curve smoothing.
- Smart assists — QuickShape (pause at the end of a freehand stroke to snap it into a clean shape) and Grid snap (for shapes, lines, and pixel strokes).
- Symmetry — Vertical, horizontal, quad, 4/6/8/12× radial, and 3/4/6× kaleidoscope modes. Drag the centre pin or axis handle directly on the canvas (saved per scene); shapes, polygons, and arrows mirror too.
- Rulers — Per-scene 1/2/3-point perspective rulers (with optional horizontal/vertical parallels) and open or closed curve rulers (with optional parallel offset). Edit control points on the canvas; hold when starting a stroke to draw freely past active rulers.
Alt
Map Layers
Map marks live inside Foundry's three stacking planes (Below tokens, Above tokens, and Top). Open the floating Layers panel to organize any plane into nested layers and groups (up to 128 nodes and 4 levels deep per scene):
- Reorder by drag and drop, adjust per-layer opacity, and pick from 17 blend modes (plus Pass through for groups).
- Toggle shared visibility or to hide a layer locally for yourself only.
Alt+click - Use layer locks, Alpha lock (draw only inside existing pixels), clipping masks, and vector layer masks (hide/reveal/50% brush, linked or unlinked transforms, to toggle on/off).
Alt+click - Duplicate layers, select a layer's contents, clear the active layer, or safely merge down when stacking order and appearance stay intact.
- Set a per-layer minimum drawing role, or switch a layer to GM display only (display filtering only — Scene flags remain readable by all clients, so do not use it for secrets).
- Wet-media paint appears as a fixed node at the bottom of Below tokens with its own visibility and opacity controls.
Scenes without custom layers skip the extra compositing passes and render identically to a flat plane.
Foundry VTT(v13–v14)的即时绘制、标注与激光笔模块。支持两种绘制空间:画在地图上(随画布平移缩放,可永久保存进场景),或画在屏幕上(固定在视口内,到时间自动淡出)。
工具
- 画笔 — 16 种笔刷:墨水(钢笔、压感钢笔、单线笔)、扁平(矩形平头笔、平头书法笔、扁平排刷、像素方头笔)、干性(铅笔、方头炭笔、粉笔)、湿性(马克笔、水彩笔、喷枪、柔边笔刷)和特效(霓虹发光笔、喷溅笔刷)。按住
Shift画直线。 - 绘画(湿介质,仅地图)— 水彩、大笔铺色、水墨、水粉、油画、清水笔、晕染笔、海绵等笔刷,可选冷压、热压、粗纹、宣纸、画布等纸张。颜料是模拟出来的而不是画出来的:颜色按减色规律混合,含色的笔会拖动并调和未干的颜料,水彩沿纸纤维扩散并在边缘积色,颗粒颜料沉入纸纹,墨色逐层累积,颜料在干透前都可以继续推动(油画比水彩干得慢得多)。每笔的颜料量与含水量可调,「立即晾干」可一次性晾干全部颜料。
- 高亮 — 荧光笔或套索区域填充。
- 箭头 — 直线或手绘路径,单向或双向。
- 形状 — 直线、矩形、椭圆、多边形(
Shift吸附 15° / 正方形 / 正圆,Alt从中心画;多边形双击、右键或按Enter结束)。支持虚线轮廓、手绘草图风格、实色或图案填充(斜线排线、交叉排线、点阵)与网格吸附。 - 激光笔 — 跟随光标的发光拖尾,不保存,也不进入撤销记录。
- 文字 — 点击输入,
Enter换行,Ctrl/Cmd+Enter或点击外部完成,Esc取消。默认随内容自动延展;用选择工具双击(或用文字工具单击)可再次编辑。拖动文字移动位置,拖左右手柄定宽换行,拖四角手柄缩放字号;需要取消定宽时点「恢复文本自动宽度」。 - 橡皮擦 — 整笔擦除或局部遮罩擦除,局部橡皮支持矩形笔尖与柔边羽化,可选「仅当前层」。
- 选择与变换 — 矩形框选或套索选择(按接触或完全框住匹配,
Shift加选、Ctrl减选、Ctrl+A全选,可选「仅当前层」)。支持拖动移动、自由变换框(缩放、绕可拖动中心旋转、斜切、扭曲、透视、翻转、旋转 90°、精确数值缩放与角度)、复制(Ctrl+D)、换色与删除。 - 吸管取色 — 直接从当前可见画面取色(包含地图、Token、湿颜料、标注、光照与迷雾),光标旁实时显示色块与
#RRGGBB预览。
绘制过程会按约 33 ms 分批实时同步给同场景玩家(可选显示名牌),后进入场景的人也能收到当前仍在显示的临时标记。所有存续与淡出时间都以 Foundry 服务器时钟为准,大家会在同一时刻看到它消失。每位用户有独立的撤销/重做栈和分级清除菜单(清除他人或永久标注时会二次确认)。支持鼠标、触控与数位笔,有数位笔时启用硬件压感、倾斜和防误触,无压感设备则按速度模拟。
笔刷工作室与动力学
点击调色板上的笔刷工作室按钮,可以按笔刷微调不透明度、混合模式(正常、正片叠底、滤色、叠加、线性减淡)、笔尖角度与角度驱动(固定、跟随轨迹、笔倾角、笔杆旋转)、扁平比、圆角、硬度、流量、间距、散布与纸纹肌理。调好的笔刷可以存为自定义预设,也支持 JSON 导入导出。
打开自定义动力学后,可以把压感、倾斜、速度、方向(绝对方向、相对起笔、相对笔尖)与随机(逐点、逐笔、平滑噪声)通过可编辑的响应曲线,映射到尺寸、流量、硬度、角度、扁平比、散布、间距上。同一参数可以叠加多个传感器,上方预览区可以直接试笔。自定义动力学随笔画同步,各客户端看到的效果一致;未开启时仍走笔刷原来的渲染路径。
绘画辅助
调色板上的绘画辅助里有防抖过滤和画布辅助线:
- 防抖与平滑 — 抖动过滤(One Euro)、拉绳或时间平均防抖(不随缩放变手感,可选抬笔补齐到笔尖)以及落笔后的曲线平滑。
- 智能辅助 — 一笔成形(手绘末尾停顿自动规整为几何图形)与网格吸附(用于形状、直线和像素笔)。
- 对称绘图 — 垂直、水平、四象限、4/6/8/12 重放射及 3/4/6 重万花筒。对称中心与轴角度可直接在画布上拖动并按场景保存,形状、多边形与箭头也会同步镜像。
- 标尺 — 按场景保存的 1/2/3 点透视尺(可选水平/垂直平行线)与开放/闭合曲线尺(可选平行等距线),可在画布上直接增删拖动控制点;起笔时按住
Alt可临时不受标尺约束自由画。
地图图层
地图标记放在 Foundry 的三个堆叠平面里(Token 下方、Token 上方、最顶层)。打开浮动图层面板后,可以在任意平面内新建和管理图层与图层组(单场景最多 128 个节点、嵌套 4 层):
- 拖拽排序,按层调节不透明度,支持 17 种混合模式(图层组另支持「穿透」)。
- 单击切换所有人共享的可见性,
Alt+单击仅在本地为自己隐藏。 - 支持图层锁定、Alpha 锁定(仅在已有像素内绘制)、剪贴图层与矢量图层蒙版(隐藏/显示/半透画笔、变换链接、
Alt+单击开关蒙版)。 - 支持复制图层、选中图层内容、清除当前图层,以及在不改变叠放顺序和显示效果前提下的向下合并。
- 可为单个图层指定最低绘制角色,或设为「仅 GM 显示」(仅作显示过滤,Scene flags 仍对所有客户端可读,不能当作保密手段)。
- 湿介质颜料作为固定节点位于「Token 下方」底部,可单独开关可见性与调整不透明度。
未建自定义图层的场景不走额外合成通道,渲染开销与原先一致。