Asset editing tools: pixel editor, basic image editor, basic audio editor #32
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cmoriarty/trog#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Today the only lever a human has over a generated asset is regeneration: the tweak box in the files pane re-prompts the seat and commits whatever comes back (
studio/src/panes/FilesPane.tsx,/orch/jobs). There is no way to fix a single wrong pixel, crop a sprite, or trim 200ms of silence off a sfx without spinning up a GPU and rolling the dice again. That is the wrong tool for small, deterministic corrections — and it is the difference between "the AI made something close" and "the game has the asset it needs".Add direct-manipulation editors to the studio: a full-featured pixel editor for pixel art, a basic image editor for non-pixel art, and a basic audio editor for sfx/music/vocals.
Ground rules
PUT /orch/repo/{slug}/file/{path}(base64 body, commit message;server/trog_lib/orchestrator.py:565). Message conventionstudio: edit assets/…. Same-origin, no new service.c40bac8), and must refresh the viewer + top bar on success rather than leaving a stale image on screen (the #31 2a bug — don't reintroduce it in a second code path).1. Pixel editor (full featured)
For anything the pixel pipeline produced —
pixel_post.pixelize_pngoutput: grid-aligned, palette-quantized PNG (server/trog_lib/pixel_post.py).Must have:
pixel_post), with add/remove/reorder, palette swap across the whole sprite, and re-quantize-to-N after editing so a hand-edit can't silently blow the color count the art direction promised.comfy_itemsheet path). The editor must read a frame grid (rows/cols or frame size), let you edit a single frame in isolation, and play the frames back as an animation at a settable fps so the edit is judged in motion.[/], space-drag pan, ctrl+z/ctrl+shift+z).2. Basic image editor (non-pixel art)
For the HD/modern art direction of #24, and for any non-quantized image (backgrounds, UI, promo). Not Photoshop — the useful 10%:
3. Audio editor (basic)
For
assets/{music,sfx,vocal}/*.wav(server/trog_lib/audio_item.py). Waveform-first, WebAudio decode, edits applied to the PCM buffer and re-encoded as WAV on save:audio_item.make_seamless_loop) so a music track edited by hand still loops cleanly.Choosing the right editor
The files pane already sniffs by extension (
IMAGE_EXT/AUDIO_EXT,studio/src/panes/FilesPane.tsx:23). Audio is unambiguous. Pixel-vs-not needs a signal, in priority order:assets/sprite/…vsassets/image/…);Done when
studio: edit …message, and survives a concurrent tweak (409 → refetch → re-apply or clearly refuse, never silently drop the edit).npm run typecheck --prefix studioclean, plus tests for the non-UI cores (pixel ops, palette quantize, PCM trim/fade/normalize, WAV encode) so the math isn't only tested by eyeballing it.Out of scope
Related: #24 (art-direction modes decide which editor is the default), #31 (tweak flow + viewer refresh bug), #28 (studio files pane follow-ups).