blender-motion-state-inspection
AFaffaan-m/ECC279k近 7 天新增 4,056 个 star
Turn generated or hand-made art into exactly what a game engine loads. Covers sprite cutout, trim and nearest-neighbour fitting to frame sizes, pixelation to a palette, sprite sheets and strips, player/team-colour masks, seamless textures, and rendering a 3D model into sprite frames from the game's own camera (isometric/RTS 8 or 16 headings, side view, top-down) with Blender. Use after generating assets, or when the user asks to make sprites, sprite sheets, animation frames, isometric unit sprites or icons for a game.
The fal-assets skill makes pictures. This skill makes files the game accepts: the right size, frame
layout, orientation, alpha, palette and format. All commands are um sprite ... and um render3d ...; each
has --help with examples.
Before converting anything, open two or three of the game's own assets and write down in MODLOG.md:
The draw code is the final authority. In Terraria, NPC frame height = texture height / Main.npcFrameCount,
so any consistent frame size works.
um sprite info raw.png # size, alpha coverage, corner colour
um sprite cutout raw.png cut.png # flat bg → transparent (border flood fill keeps interior whites)
um sprite cutout raw.png cut.png --grey 150 --keep-top 0.8 # also remove a soft grey shadow / the floor under it
um sprite fit cut.png item.png --size 64x26 --hard-alpha # trim + ONE nearest-neighbour scale into the frame
um sprite fit cut.png npc.png --size 38x34 --anchor bottom # standing sprites sit on the frame's bottom edge
um sprite pixelate cut.png px.png --size 32x32 --colors 16 --outline # true pixel art from painterly art
um sprite palette px.png px2.png --from stock_sprite.png # snap to the game's own colours
um sprite frames npc.png frames/ --n 3 --kind bob # cheap idle animation (bob/squash/wobble/flash)
um sprite sheet sheet.png frames/*.png --vertical # Terraria-style strip (or --cols N grid)
um sprite slice sheet.png out/ --frame 32x32 # the other direction
um sprite team-mask unit.png unit_grey.png --hue blue # player-colour mask (+ desaturated sprite)
um sprite preview item.png look.png --scale 6 # checkerboard + zoom: LOOK at it before shipping
fit --smooth.um fal model3d concept.png --name unit # textured GLB (Trellis 2 by default)
um render3d assets/gen/unit.glb frames/ --preset aoe2 --length 80 --forward-yaw -90 \
--anims idle:10:bob,walk:12:walk,attack:16:lunge,death:20:die --shadows --samples 40
um render3d assets/gen/unit.glb side/ --preset side --canvas 128 --length 110 --engine eevee # platformer facing R + L
Presets:
| Preset | Projection | Camera | Facings |
|---|---|---|---|
aoe2 | ortho | 30° | 16 clockwise from east |
iso8 | ortho | 30° | 8 |
trueiso | ortho | 35.264° | 8 |
topdown | ortho | — | 8 |
side | ortho | — | 2 (right, left) |
turntable | persp | — | 24 (promo/icon spins) |
--length sets the model's longest horizontal side in pixels at 1x, so match stock units.--forward-yaw turns the model so its nose faces +X; check the first frame.--shadows adds a shadow-only pass (*_s.png) for engines that keep shadows in their own layer.um sprite sheet, or with an engine writer (e.g. examples/aoe2-de-civ/sld.py).blender on PATH or BLENDER=...). Cycles uses the GPU when available.--sun / --ambient, or brighten in post.um fal run tripo3d/tripo/remesh [email protected] face_limit:=8000, then convert in Blender
(GLB → FBX/OBJ) with the engine's scale and axis convention: Unity Y-up metres, Unreal Z-up
centimetres, Bethesda NIF via PyNifly.um fal texture generates it tiled. Check with um sprite tile-preview t.png t3.png. Fix
seams on other images with um sprite seamless.um fal pbr. Convert to the engine's packing: Unreal ORM (occlusion/roughness/metal in RGB),
Unity metallic-smoothness (smoothness = 1 - roughness in alpha).magick with DXT settings. BC7 for quality, BC1 for cutout sprites, BC3
when alpha is soft.Put one converted asset into the game and screenshot it next to stock art (um win shot). Check the scale,
facing, pivot, outline and palette. Fix the recipe, then batch-convert the rest with the same commands (a
small script or Makefile, so the pipeline is reproducible from assets/gen/).
Read the user's own install with UnityPy and write a local, private resource pack. Never put the output in the mod, its repo or a release; each user runs the converter on their own copy.
UnityPy.load() decompresses a whole bundle (a 865 MB bundle became 8.7 GB of RAM).
Decompress only the serialized files and read .resS / .resource lazily, block by block; run each
converter module in its own process.UnityPy.Environment(path=""), and load cross-referenced bundles together; otherwise
UnityPy searches the working directory for missing dependencies.catalog.bin. Map game objects to prefabs through their GUID keys, not by guessing
names. Prefer the low-quality variant if one exists (same meshes, smaller textures).AudioClip.samples needs FMOD (fmod_toolkit); encode with ffmpeg to mono OGG.pack.mcmeta (pack_format 15 for 1.20.1); ResourceLocations
accept only [a-z0-9_./-]. For posed meshes, a custom mesh file drawn with
RenderType.entityCutoutNoCull is more robust than forge:obj (block-atlas textures, usemtl).AFaffaan-m/ECC279k近 7 天新增 4,056 个 star
ANanthropics/skills181k近 7 天新增 1,159 个 star
SHShubhamsaboo/awesome-llm-apps142k近 7 天新增 914 个 star
HAharry0703/MoneyPrinterTurbo131k近 7 天新增 1,664 个 star
PApaperclipai/paperclip102k近 7 天新增 3,122 个 star