A4: Item models and icons
tools/models/items.py builds every item in headless Blender from primitives: the boathook, the eight weapons and powder keg, four consumables and five kinds of ammo, each with its own outline. It writes an OBJ per item (the Debian Blender's glTF exporter needs numpy), a JSON with the grip and the left hand's support point, and a 128 px Cycles icon rendered on the CPU. Materials are named after Palette colours, and TRIM2_/TRIM3_ surfaces are the tier treatment: rope whipping from tier 2, brass bands from tier 3; tier 0 is faded. ItemModels paints the models from Palette by tier. EntityView puts the held item's grip in each figure's right hand, turned with the player's pitch and put away aboard, falling, gliding or swimming, and draws items lying in the world with their models, one MultiMesh per model and tier. The hotbar shows each slot's icon. make models rebuilds them; make item-captures renders the items held, over the shoulder, on the ground and by tier. Closes #44 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,3 +20,15 @@ and check it with `tools/godot.sh --script res://tools/audio/check.gd` (part of
|
||||
`make check` through `test/audio/test_audio_assets.gd`, which also regenerates every
|
||||
file and compares hashes). Files are mono 16-bit PCM at 22,050 Hz. Licence: see
|
||||
`LICENSE-ASSETS`.
|
||||
|
||||
## Item models and icons (`assets/models/items/`, `assets/icons/items/`, A4)
|
||||
|
||||
| Files | Generator | How |
|
||||
|---|---|---|
|
||||
| `models/items/<id>.obj`, `.mtl`, `.json` | `tools/models/items.py` | Built from primitives (boxes, cylinders, cones, spheres, tori) in headless Blender (`blender --background --factory-startup --python tools/models/items.py`). Materials are named after `Palette` colours, and the client paints them from `src/client/style/palette.gd`. The JSON holds the grip, the left hand's support point and the bounds. |
|
||||
| `icons/items/<id>.png` | `tools/models/items.py` | The same model rendered at 128 px with Cycles on the CPU, colours read from `palette.gd`. |
|
||||
|
||||
OBJ, not glTF: the Debian Blender's glTF exporter needs numpy, which the build
|
||||
machine doesn't have. Blender isn't part of `make check`, so these files are checked
|
||||
by `test/client/test_item_models.gd` (every item has a model, icon and grip, painted
|
||||
from the Palette) rather than regenerated byte for byte.
|
||||
|
||||
Reference in New Issue
Block a user