CommunityCoding & Developmentgithub.com

lowpoly-assets

Create original flat-shaded low-poly 3D assets in a stylised flat-shaded look (hard edges, quad-dominant, one palette-atlas material, UVs collapsed onto colour swatches) as Unity-ready FBX (and OBJ) files, via a Python modelling kit with a built-in preview renderer. Use when the user wants to generate, model or prototype low-poly props, environment pieces, weapons, buildings, vehicles or foliage in a flat-shaded, palette-textured low-poly art style, or asks for "polygon assets", "low-poly meshes" or game-ready stylised models.

What is lowpoly-assets?

lowpoly-assets is a Claude Code agent skill that create original flat-shaded low-poly 3D assets in a stylised flat-shaded look (hard edges, quad-dominant, one palette-atlas material, UVs collapsed onto colour swatches) as Unity-ready FBX (and OBJ) files, via a Python modelling kit with a built-in preview renderer. Use when the user wants to generate, model or prototype low-poly props, environment pieces, weapons, buildings, vehicles or foliage in a flat-shaded, palette-textured low-poly art style, or asks for "polygon assets", "low-poly meshes" or game-ready stylised models.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/finex7070/LowPolyAssetsSkill/tree/HEAD

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Low-poly asset generator

Builds meshes procedurally in Python (numpy + Pillow only, no Blender needed), exports binary FBX 7.4 (default) and/or OBJ + MTL plus a palette atlas PNG, and renders a 4-view preview PNG you must look at before calling an asset done.

Skill dir: ~/.claude/skills/lowpoly-assets/ or <project>/.claude/skills/lowpoly-assets/ (below: <SKILL>). Use python3 instead of python on macOS/Linux.

FilePurpose
scripts/lowpoly.pymodelling kit: primitives, transforms, palette, validate, export
scripts/fbx_writer.pybinary FBX 7.4 writer used by export (Unity-verified)
scripts/preview.pysoftware renderer → contact sheet (3/4, side, front, top)
scripts/unity/LowPolyImportTest.csoptional Unity batch check: import report + render
assets/palette.jsonown named palette (55 colours × 8 shades)
references/style_guide.mdstyle rules: budgets, scale, naming, colour use – read first
examples/build_examples.pycrate, barrel, rock, tree, pine, pistol, sign – copy the closest

Workflow

  1. Read references/style_guide.md and the closest recipe in examples/build_examples.py.
  2. Plan in 3–6 bullets: real-world size in metres, category + name (Prop_…), tri budget from the guide, part breakdown into primitives, colour keys per part (base shade + lighter tops / darker trims).
  3. Write a build script (in the user's project or a temp folder, not in the skill dir) that imports the kit:
    import sys; sys.path.insert(0, r"<SKILL>/scripts")
    from lowpoly import *
    m = merge_all([...], "Prop_Thing_01").to_ground()
    print(m.report()); print(validate(m, budget=400))
    export(m, r"<out>/Prop_Thing_01")          # fmt="both" (default) | "fbx" | "obj"
    
  4. Run it with python -E -P build.py, then python -E -P <SKILL>/scripts/preview.py <out>/Prop_Thing_01.obj and Read the PNG. Check silhouette, proportions, colour contrast between parts, floating/intersecting parts, inverted faces (dark patches where light should be). Iterate until it reads well from the 3/4 view.
  5. Deliver: FBX (+ OBJ/MTL if wanted) + LowPoly_Palette.png (one atlas shared by all assets in the folder), the build script (so it can be regenerated), and the preview. Report tri count and size.

Kit cheat sheet

Primitives (sit on y=0, centred in XZ): box(size, color, top=, bottom=), bevel_box(size, bevel, color, edge_color=, top=), cylinder(r, h, sides, color, top=, radius_top=), cone, icosphere(r, subdiv), lathe([(r, y), …], sides, colors=[…per segment]), extrude(outline2d, depth, color, side_color, axis="z"|"y") (concave ok), plane(size, color, subdiv), tube_between(p0, p1, r, sides).

Ops (chainable, mutate + return self): translate, rotate(axis, deg, origin), scale, taper, jitter(amount, seed), bend_noise, recolor(key, where=lambda n: …), to_ground(); mirror("x") returns original+mirror; array, radial, merge_all, m1 + m2.

Colour keys: "wood" (= shade 3), "wood:0" lightest … "wood:7" darkest. Unknown names raise with the list of valid ones. New colours: append to palette.json (never insert/reorder – UVs of existing assets would shift), then delete the old atlas PNG in the output folder so it is regenerated.

Recipes by category

  • Hard-surface props: bevel_box body (bevel 2–4 % of size) + battens, straps, handles as smaller bevel boxes in a darker shade.
  • Round props: lathe with rims (step radius out 3 % for 2–3 cm), 8–10 sides.
  • Weapons: side silhouette outlines → extrude per part (slide, frame, grip, magazine), cylinders for barrels; rotate so barrel → +Z, grip origin.
  • Rocks/cliffs: icosphere(subdiv=1) scaled flat + jitter, lighter tops.
  • Foliage: trunk cylinder(radius_top=…) + 2–4 jittered icospheres or stacked cones; darker undersides via recolor(where=n[1] < -0.3).
  • Buildings: walls as extrude(axis="y") floor-plan slabs or boxes with window openings built from frame pieces; doors as separate parts (Building_X_01_Door_01), pivot at the hinge.
  • Vehicles: body from 2–3 extruded side profiles + bevel boxes, wheels as cylinder rotated on Z (8–10 sides), exported as separate parts.

Unity notes

  • FBX is the default for Unity. Written as cm data with UnitScaleFactor 1 → Unity applies file scale 0.01, object scale stays 1, 1 unit = 1 m. Normals import as hard edges, material is named M_LowPoly_Palette. Verified in Unity 6000.3 (sizes, pivot on ground, normals, palette UVs).
  • OBJ alternative: metres → import scale 1, Normals = Import.
  • parts={...} become separate child GameObjects (doors, wheels).
  • Use one material for all assets: URP/Lit (or Simple Lit), Base Map = LowPoly_Palette.png, Smoothness ≈ 0, texture Filter = Point or Bilinear with mip maps off/limited (swatches are 16 px).
  • Unity mirrors X on import (handedness, FBX and OBJ alike); the asset looks correct, just be aware when placing asymmetric parts.
  • Optional verification: scripts/unity/LowPolyImportTest.cs in a throwaway project (instructions in the file header) → lowpoly_report.txt with size / tris / hard-normal / UV checks and lowpoly_unity_render.png. Ask the user before launching Unity in batch mode (takes minutes, must not touch a project that is open in the editor).
  • If a writer change makes Unity report "Couldn't import file": the FBX SDK needs the Documents/Document block with RootNode (see fbx_writer.py).

Don'ts

  • Don't import, trace or re-export meshes/textures from third-party assets – only original geometry built with this kit.
  • No smooth shading, no per-asset textures, no UV unwrapping for plain colour.
  • Don't exceed the category tri budget without a reason; don't model detail smaller than ~2 cm on props.

Related Skills