vork by Voyager
An agent writes a scene as code, renders it on the GPU, looks at the result and revises the code. Source-available and free during the research preview.
Turn a sprite drawn slanted (an oblique or isometric pixel-art sprite, or a creature's four-way outfit sheet) into a textured 3D model (.glb), in your browser.
DesignGo · JavaScriptGitHub @ColdensjoOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
Turn pixel-art sprites drawn slanted (oblique, isometric, four-way outfit sheets) into textured 3D models (.glb), in your browser
Loading the full README.
Read the full README ↗Turn a pixel-art sprite drawn slanted into a textured 3D model (.glb): an oblique sprite (the kind
drawn with a thing's height up and to the left, as many top-down RPGs draw them), a 2:1 isometric
sprite, a creature's outfit sheet drawn facing four ways, or a weapon's inventory icon drawn flat.
Try it in your browser: drop a PNG, turn the model,
download the .glb. The page converts on your computer (Go compiled to WebAssembly); your sprites
are not uploaded.
A sprite is one view of a thing. Every pixel is a ray through it, and a thing anywhere along that ray would draw the same, so the depth has to be guessed. sprite2model guesses it from what such things usually are, carving voxels one sprite pixel wide:
| Reading | Takes the thing to be | For |
|---|---|---|
| Box | the same mirrored east to west and north to south, each level a box | pillars, crates, tables, wardrobes |
| Round | the same, each level a circle | columns, barrels, trees, rocks |
| Wall | the same all along its tile, east to west, north to south, or both | walls, fences, corners |
| Cut-out | one-sided: stood up facing you, given a rounded body behind | statues, banners, weapon racks |
| Hull | whatever its mirrored silhouettes allow | checking a reading |
| Outfit sheet | a creature drawn facing north, east, south and west, one column each | creatures, characters |
| Item | drawn flat, facing you: bevelled where broad, round where narrow, stood upright | swords, axes, maces, shields |
| Auto | the reading that explains most of the sprite | anything |
Download sprite2model for Windows, Linux or macOS from the
releases, or build it with Go 1.25 or later:
go install github.com/Coldensjo/sprite2model/cmd/sprite2model@latest
sprite2model -preview pillar.png # pillar.glb, and pillar.preview.png: the model from four sides
sprite2model -reading round -out models *.png
sprite2model -reading outfit -frame 1 troll_outfit.png
sprite2model serve # the page, run locally, in your browser
| Flag | |
|---|---|
-proj tibia|iso | how the sprite is drawn: oblique (x - z, y - z, 32 pixels a tile, the sprite's bottom-right on its tile's) or 2:1 isometric |
-reading | auto (default), box, round, wall, cutout, hull, outfit or item |
-outline | keep the dark outline round the silhouette in the colours (left out, it takes the colours inside it) |
-centre x,y | where the thing's axis meets the ground (an item's grip), in sprite pixels (default: found) |
-scale f | size factor; 1 makes one tile one unit |
-frame n | an outfit sheet's row (a frame of its walk), from 0 |
-out dir | where to write the models (default: beside each sprite) |
-preview | also write <name>.preview.png |
As a Go library: spritemodel.Run(name, pngBytes, spritemodel.Options{}) gives the .glb, the
preview and a report.
GOOS=js GOARCH=wasm go build -o web/sprite2model.wasm ./cmd/wasm
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" web/
python -m http.server -d web # then open http://localhost:8000
The Page workflow does this on every push to main and publishes web/ to GitHub Pages; the
Release workflow attaches the command line for each platform to a v* tag's release. The example
sprites in web/examples are drawn by go run ./cmd/examples.
One picture holds less than a model: what the readings guess is only as good as the guess. Things that are neither symmetric nor one-sided (creatures from a single sprite, odd furniture) come out rough; a sprite cut off at its foot (the top half of a two-part item) cannot stand up; small sprites make coarse models (a 32 pixel creature is about 20 voxels tall).
MIT. The example sprites are drawn by cmd/examples and are under the same licence; convert only
sprites you have the right to use.