灵符lingfu

lingmodeler

↓ 0 downloads

LingModeler: box modeling with quads and tris, rigging + weight painting, 2D vector illustration and animation, procedural textures and game assets; .lmesh / .ling native formats, OBJ, glTF and SVG import / export

Windows · x86-64Linux · x86-64LingOS · x86-64LingOS · Pi 5 ARM64Web · WASM
Keywords 3d, modeling, vector, svg, gltf, obj, rigging, animation, textures, ling
lingfu install lingmodeler
LicenseApache-2.0 OR MIT
Authorsling-lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

README

LingModeler

A lightweight vector 3D modeler, 2D vector illustration and animation studio, procedural texture lab and character rigging tool, written entirely in Ling. It wears the LingStationX design system: near-black chrome, line work, crosshatch fills, corner brackets and tile lettering.

Runs on Windows, macOS and Linux (desktop Ling runtime), and inside LingOS on x86-64 and Raspberry Pi 5 (the in-kernel Ling runtime).

Screenshots

Object mode with generated game assetsEdit mode: extrude and inset in face select
Model: procedural assets (character, tree, rock, crystals, barrel, crate)Edit: box modeling, face select, extrude and inset
Rig mode with the 19-bone character armatureWeight painting the Chest bone
Rig: armature with bone hierarchy, head / tail editingWeights: heat-map weight painting after auto weights
Pose mode with a keyed walk cycleVector illustration
Pose: keyframed walk cycle with skinning and the timelineVector: bezier paths, shapes and layers
2D animation with onion skinProcedural fire texture
Anim: keyframes and onion skin (previous key red, next green)Texture: animated procedural fire
LingModeler running inside LingOS on x86-64LingModeler running inside LingOS for Raspberry Pi
LingOS x86-64 (QEMU, 1920 x 1080)LingOS Raspberry Pi (QEMU raspi3b, 1280 x 720)

Regenerate them with python tools/make_screenshots.py (the LingOS ones come from tools/lingos_qemu_test*.sh).

Run

PlatformHow
WindowsDouble-click LingModeler.vbs (no console), the Desktop shortcut, or run.bat
macOSDouble-click LingModeler.command, or ./run.sh
Linux./run.sh
Anyling run --interp ling/main.ling from this folder

Launchers prefer a built LingModeler.exe / LingModeler next to them, then ../ling/target/release/ling, then ling on PATH. Output goes to lingmodeler.log.

App arguments: --open <file> · --mode <0..7> · --size 1600x900 · --shot N --name x (screenshot at frame N, then exit) · --do "frame,action;..." and --drive "frame,x,y,down;..." (scripted actions and mouse, used by the tests).

Modes

TabKeyWhat it does
Model (Object / Edit)F1, TabPrimitives, transforms, box modeling on polygon meshes (tris, quads, n-gons)
RigF2Bones: add, extrude chains, parent, symmetrize .L/.R, bind the mesh
WeightsF3Weight painting (add, subtract, set, blur brushes), auto weights, per-vertex weight editing
PoseF4Pose bones, keyframe actions on the timeline, linear-blend skinning preview
VectorF52D illustration: bezier paths, shapes, layers, groups, node editing
AnimF62D animation: transform and opacity keys, shape keys (morphs), onion skin
TextureF7Procedural textures: 16 generators, seamless, animated, PNG / normal map / sprite sheet export

Box modeling (Edit mode)

1 / 2 / 3 switch vertex / edge / face selection; click, Shift+click, box drag, Alt+click for edge loops. G / R / S move, rotate and scale (X / Y / Z lock an axis, Shift is fine, Ctrl snaps, click confirms, Esc cancels).

Extrude (E, region / edge / vertex), Inset (I), Bevel (Ctrl+B), Loop cut (Ctrl+R, multi-cut), Subdivide, Catmull-Clark subsurf (Ctrl+2), Merge (M), Merge by distance, Dissolve, Fill / make face (F), Connect (J), Split (Y), Separate (P), Join (Ctrl+J), Flip and Recalculate normals (Shift+N), Triangulate (Ctrl+T), Tris to quads (Alt+J), Smooth, Mirror X, Symmetrize, Spin / lathe, Apply transform, Centre origin. UV projections: box, planar (from the view), cylinder, sphere; UV layout preview.

Rigging and weights

Shift+A adds a bone at the 3D cursor (Shift+right-click places the cursor); E extrudes a child; Ctrl+P parents; T toggles tail-only editing. Auto Weights is adjustable and re-runnable: falloff power, envelope (the zone that gets full weight), max influences per vertex, smoothing iterations across the surface, minimum weight kept, selected bones only. Refine with the brush (radius [ ], strength, smooth / linear / flat falloff, front faces only, auto-normalize), or type exact weights for a vertex in the Weights panel. Normalize, smooth, mirror X (swaps .L/.R) and clear are one click.

Procedural assets

Generate: rock, crystal cluster, low-poly tree, barrel, crate, pillar, stairs, ramp, terrain tile, fence, coin / gem, and a character base mesh with a 19-bone rig and auto weights, ready to pose.

Textures

Noise (fBm), Voronoi cells, checker, bricks, stripes, wood, marble, dots, gradient, plasma, fire, water caustics, clouds, grunge, hexagons, scales. Three-stop colour ramps, hue shift, seamless tiling, time-driven animation. Apply bakes face colours onto the selected object; OBJ / glTF export writes the PNG and maps it.

Files

FormatReadWriteNotes
.lmeshyesyesNative scene. Valid Ling source: use "hero.lmesh" then draw_Hero(ox, oy, oz, s)
.lingyesyesNative vector document and the SVG intermediary; also valid Ling: draw_<name>(ox, oy, s)
.obj + .mtlyesyesPolygons, UVs, materials (colours, map_Kd), smooth / flat normals
.gltfyes (embedded buffers)yesMaterials, textures, vertex colours, skins, bone animations; import reads skins + weights
.glbnoyesBinary glTF (desktop build)
.svgyesyesPaths (M L H V C S Q T A Z), rect, circle, ellipse, line, poly*, groups, transforms, styles; animated export uses SMIL
.pngtexture importyesTextures, normal maps, sprite sheets, PNG frame sequences, turntable sheets

Limits, stated plainly: SVG text, gradients and clip paths are skipped on import, arcs become polylines and multi-contour paths become one shape per contour. glTF import needs embedded (data URI) buffers (ling convert handles external .bin / .glb) and does not import animations yet.

Build

# Windows portable folder + zip: dist\LingModeler-win64\LingModeler.exe
powershell -File tools\build_desktop.ps1
# Linux / macOS (run on that OS): dist/LingModeler-linux or dist/LingModeler-macos (+ LingModeler.app)
sh tools/build_desktop.sh

lingfu build --no-aot also works: it finds Ling.toml (entry ling/main.ling) and builds an interpreter-embedded exe, which must be started from the ling folder because it resolves use from the working directory. Plain lingfu build defaults to native AOT, and the current Cranelift backend panics on this 750-function program (a toolchain bug, not an app error; every module compiles on its own), so the scripts above use the portable-launcher build instead.

LingOS

ling/main_os.ling is generated from main.ling by tools/make_os_entry.py (it swaps in plat_os.ling, which scan-converts polygons in Ling and turns image features off). The LingOS repo has two targets:

cd ../LingOS
python ../LingModeler/tools/make_os_entry.py
../ling/target/release/ling build kernel/x86_64-lingmodeler --platform kernel --out dist   # x86-64 (QEMU / VirtualBox / PC)
../ling/target/release/ling build kernel/rpi-lingmodeler --platform rpi --out dist         # Raspberry Pi 5

or powershell -File tools\build_lingos.ps1. On the Pi desktop LingModeler is the "M" dock tile and sits in the Applications menu under Development; Ctrl+Q returns to the desktop.

Source files

FileWhat it holds
ling/main.ling, ling/main_os.lingEntry points: desktop, and LingOS (generated)
ling/plat.ling, ling/plat_os.lingPlatform layer (desktop runtime / in-kernel runtime)
ling/core.ling, ling/ds.ling, ling/icons.lingWidgets and the LingStationX design system
ling/mesh.ling, ling/meshops.ling, ling/prims.ling, ling/uv.lingPolygon meshes, selection, undo, modeling operations, primitives, UVs
ling/view3d.lingViewport, camera, picking, G / R / S
ling/rig.ling, ling/pose.lingBones, auto weights, weight painting; pose, skinning, actions
ling/vec2d.ling, ling/anim.ling, ling/timeline.lingVector studio, 2D animation, shared timeline
ling/texture.ling, ling/gen.lingProcedural textures, asset generators
ling/lingfmt.ling, ling/objfmt.ling, ling/gltf.ling, ling/svg.ling, ling/json.lingFile formats
ling/raster.lingSoftware rasterizer for PNG exports

Ling gotchas met while writing this

  • && and || do not short-circuit: guard a list_get with a nested if, never i < n && list_get(l, i).
  • sel(c, a, b) is a function: both branches are evaluated.
  • Words reserved in any supported language cannot be identifiers: si, ok, can, fit, form, move, copy, start ...
  • bind x = ... both declares and reassigns; there is no unary minus (0.0 - x).

← Back to index