@babylonjs-toolkit/agent 1.2.16 → 1.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/package.json +1 -1
- package/skills/bt-blender/SKILL.md +386 -0
- package/skills/bt-blender/THIRD_PARTY_NOTICES.md +141 -0
- package/skills/bt-blender/references/art-style-and-genre.md +173 -0
- package/skills/bt-blender/references/characters-and-creatures.md +644 -0
- package/skills/bt-blender/references/environments.md +478 -0
- package/skills/bt-blender/references/game-engine-export.md +284 -0
- package/skills/bt-blender/references/geometry-nodes.md +447 -0
- package/skills/bt-blender/references/hard-surface.md +720 -0
- package/skills/bt-blender/references/procedural-generation.md +358 -0
- package/skills/bt-blender/references/rigging-and-animation.md +1080 -0
- package/skills/bt-blender/references/sculpting-and-retopology.md +544 -0
- package/skills/bt-blender/references/uv-and-pbr-materials.md +381 -0
- package/skills/bt-blender/references/vehicles.md +632 -0
- package/skills/bt-blender/scripts/blender/assembly_check.py +420 -0
- package/skills/bt-blender/scripts/blender/character_blockout.py +462 -0
- package/skills/bt-blender/scripts/blender/construction_kit.py +1710 -0
- package/skills/bt-blender/scripts/blender/environment_kit.py +525 -0
- package/skills/bt-blender/scripts/blender/export_asset.py +623 -0
- package/skills/bt-blender/scripts/blender/geometry_nodes_builders.py +575 -0
- package/skills/bt-blender/scripts/blender/hard_surface_panels.py +374 -0
- package/skills/bt-blender/scripts/blender/hard_surface_trims.py +200 -0
- package/skills/bt-blender/scripts/blender/image_measure.py +568 -0
- package/skills/bt-blender/scripts/blender/materials_pbr.py +439 -0
- package/skills/bt-blender/scripts/blender/measure_stations.py +486 -0
- package/skills/bt-blender/scripts/blender/ortho_views.py +309 -0
- package/skills/bt-blender/scripts/blender/procedural_game_ready.py +258 -0
- package/skills/bt-blender/scripts/blender/procedural_generators.py +842 -0
- package/skills/bt-blender/scripts/blender/qa_check.py +729 -0
- package/skills/bt-blender/scripts/blender/retopology_tools.py +781 -0
- package/skills/bt-blender/scripts/blender/review_render.py +358 -0
- package/skills/bt-blender/scripts/blender/rigging_tools.py +1170 -0
- package/skills/bt-blender/scripts/blender/style_palette.py +190 -0
- package/skills/bt-blender/scripts/blender/tool_common.py +289 -0
- package/skills/bt-blender/scripts/blender/uv_layout.py +555 -0
- package/skills/bt-blender/scripts/blender/vehicle_parts.py +370 -0
- package/skills/bt-blender/scripts/blender/view_consistency.py +133 -0
- package/skills/bt-blender/scripts/blender/world_gate.py +219 -0
- package/skills/bt-blender/scripts/bt-blender.mjs +329 -0
- package/skills/bt-blender/scripts/validate_gltf.mjs +204 -0
- package/skills/bt-gauntlet/SKILL.md +6 -6
- package/skills/bt-gauntlet/references/critic-rubrics.md +71 -4
- package/skills/bt-gauntlet/references/spec-composition.md +13 -0
- package/skills/bt-gauntlet/references/unity-pipeline.md +18 -2
- package/skills/bt-unwrap/scripts/blender/__pycache__/bt_unwrap.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/image_utils.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/mesh_tools.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/model_io.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/previews.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/rasterizer.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/reference_views.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/reference_warp.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/texture_bake.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/texture_compose.cpython-313.pyc +0 -0
- package/skills/bt-unwrap/scripts/blender/__pycache__/uv_layout.cpython-313.pyc +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Art style and genre: shape, proportion, rendering style, budgets, readability and value
|
|
2
|
+
|
|
3
|
+
**Load this when** a brief names a look ("stylised", "low-poly", "hand-painted", "realistic") or a genre and
|
|
4
|
+
platform, before the first blockout. Style decides proportions, bevel sizes, how detail is carried, the
|
|
5
|
+
texture and triangle budgets, and what must read at play size. Use it alongside `hard-surface.md`,
|
|
6
|
+
`vehicles.md` or `environments.md`, which cover the techniques themselves.
|
|
7
|
+
|
|
8
|
+
**Helpers.** `scripts/blender/style_palette.py`: `palette_image`, `palette_material`, `paint_faces`,
|
|
9
|
+
`flat_shade`, `lightness`, `value_report` and `silhouette_pixel_height`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Shape language and big-medium-small
|
|
14
|
+
|
|
15
|
+
- **Circles** read as friendly and harmless, **squares** as sturdy and reliable, **triangles** as aggressive
|
|
16
|
+
(21 Draw). Mix them on purpose: a square, imposing mass with a round face stays approachable. Apply the
|
|
17
|
+
language to bodies, props and architecture alike.
|
|
18
|
+
- **Big, medium, small.** Block the big masses first, then the medium forms, then the small details. Keep a
|
|
19
|
+
hierarchy of focal points, and spend triangles where they show on the silhouette edge (80.lv, stylised
|
|
20
|
+
optimisation).
|
|
21
|
+
- **Exaggerate what serves the game.** Function should show in the shape: a ranged character's bow, a tank's
|
|
22
|
+
bulk (Riot, *Clarity in League*). Small screens lose small forms, so enlarge hands, tools and pickups
|
|
23
|
+
(Android / Arm).
|
|
24
|
+
- **Stylise by simplifying.** Fortnite removes all parallel lines from real objects. Sea of Thieves builds
|
|
25
|
+
complexity from simple, "wonky" but believably deformed parts (Habrador's GDC notes). Breath of the Wild's
|
|
26
|
+
art "makes it easy to lie" without losing the feeling of reality.
|
|
27
|
+
|
|
28
|
+
## 2. Stylised versus realistic proportions
|
|
29
|
+
|
|
30
|
+
| Choice | Stylised | Realistic |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Proportions | Exaggerated: big heads, hands, wheels, doors; chunky trims | Measured from references (`measure-stations`) |
|
|
33
|
+
| Smallest modelled thing | "Nothing smaller than a mailbox" (Fortnite's level rule); clutter is texture | Down to the size that reads at the closest camera |
|
|
34
|
+
| Bevels | Wide and soft, one absolute width per kit, sized for the camera distance | Small, crisp, often from normal maps or trims |
|
|
35
|
+
| Edges at distance | Chunky foliage and solid shapes; no thin cards | Thin parts allowed if LODs remove them |
|
|
36
|
+
| Silhouette | Unique even when edges are optimised away (Meta) | Correct first, then readable |
|
|
37
|
+
|
|
38
|
+
No source gives numeric stylised bevel widths. Set one absolute width per kit at the camera distance, and
|
|
39
|
+
check it in a review render. Bevelled edges at distance become long thin triangles, which are slow on mobile
|
|
40
|
+
and flicker on shiny materials (Android / Arm).
|
|
41
|
+
|
|
42
|
+
## 3. Rendering style decides the mesh
|
|
43
|
+
|
|
44
|
+
| Style | Mesh and UVs | Material and draws | Notes |
|
|
45
|
+
|---|---|---|---|
|
|
46
|
+
| **Low-poly flat** (palette atlas) | Faceted, flat-shaded (`flat_shade`). UVs collapsed into colour cells (`paint_faces`) | **One material and one tiny atlas for every asset**: one draw per asset, and a re-skin is an image swap | Nearest filtering, or cells wide enough that filtering never reaches a neighbour. Flat shading costs about 3-4 times the vertices of smooth shading |
|
|
47
|
+
| **Hand-painted** | Smooth, low to mid poly. Unique UVs, generous islands | Base colour only, often unlit. Light, AO and edge wear are painted in | Detail is broad, so texel density can sit at or below the third-person figure. Characters are often under 5k tris with 1024 textures (80.lv) |
|
|
48
|
+
| **Stylised shading over PBR inputs** | As PBR | Albedo, packed metal / AO / emissive / roughness, normal and a ramp | Valorant: diffuse from one N·L through an artist ramp, cheap baked environments, a 144 fps budget on 2012 integrated GPUs |
|
|
49
|
+
| **Realistic PBR** | Mid-poly or high-to-low (`hard-surface.md`) | Metal / roughness | Dielectric albedo between 30-50 and 240 sRGB ("coal is dark, but it is not 0.0 black"). Metallic is 0 or 1. No lighting in the base colour (Adobe, *The PBR Guide*) |
|
|
50
|
+
|
|
51
|
+
## 4. Budgets by genre and platform
|
|
52
|
+
|
|
53
|
+
The figures marked *starting point* are working defaults.
|
|
54
|
+
|
|
55
|
+
| Camera and genre | Texel density | Hero / unit triangles | Notes |
|
|
56
|
+
|---|---|---|---|
|
|
57
|
+
| First person | 1024 px/m (Maxon 10.24 px/cm) | Weapon 10-20k, props 1-5k (*starting point*) | The camera reaches every surface |
|
|
58
|
+
| Third person, racing, action | 512 px/m (Maxon 5.12; CryEngine 512) | Hero 10-20k, props 0.5-5k (*starting point*) | Vehicles: see `vehicles.md` |
|
|
59
|
+
| Top-down, strategy, isometric | 256 px/m or lower (Maxon 2.56) | Units about 360, buildings about 3k, a lone hero 11k (Arm's mobile demo) | More objects on screen, fewer triangles each |
|
|
60
|
+
| Web catalogue or viewer asset | 2K textures | ≤ 150k mobile, ≤ 250k desktop, < 20 / < 100 draws per item | Khronos 3D Commerce publishing targets |
|
|
61
|
+
| Standalone VR | As third person | 750k-1M triangles per frame on Quest 2, UI included | Meta. Prefer a strong non-photoreal style |
|
|
62
|
+
|
|
63
|
+
Everywhere: keep triangles above about 10 px on screen (Arm), under 65,535 vertices per mesh, and about a
|
|
64
|
+
50 % cut per LOD level.
|
|
65
|
+
|
|
66
|
+
## 5. Silhouette readability at play size
|
|
67
|
+
|
|
68
|
+
- **Read order.** TF2 is read team first (colour), then class (silhouette), then weapon. Each must survive
|
|
69
|
+
"a variety of distances". League must show facing direction in the silhouette alone. Skins and variants
|
|
70
|
+
never change the primary read.
|
|
71
|
+
- **Test groups, not only singles.** Overwatch heroes read alone but blur in a crowd. Remove small details, or
|
|
72
|
+
bring their values closer together.
|
|
73
|
+
- **Test at the real size.** Find the on-screen height with `silhouette_pixel_height(height, distance, fov,
|
|
74
|
+
screen_height)`, then run `review-render --pixel-height <that>`. Anything under about 10 px goes into the
|
|
75
|
+
texture or goes away (no source gives a smaller floor than Arm's 10 px triangle rule).
|
|
76
|
+
- **Squint and desaturate.** If the render does not read when squinting, or in greyscale, fix the values
|
|
77
|
+
before adding detail (Ice Wyrm Games).
|
|
78
|
+
|
|
79
|
+
## 6. Palette and value
|
|
80
|
+
|
|
81
|
+
- **Value carries the read; colour carries identity.** Gameplay elements get the brightest, highest-contrast
|
|
82
|
+
values. Large areas use narrow, quieter ranges: "If everything is drawing attention, nothing will."
|
|
83
|
+
- **Saturation as a signal.** Left 4 Dead greys everything below a saturation threshold while pickups and
|
|
84
|
+
exits stay vivid. TF2 uses muted colours with small saturated areas.
|
|
85
|
+
- **One restricted palette for a whole world.** TF2 shares one palette across characters, weapons and maps.
|
|
86
|
+
Lock large-area colours early, and keep colours "from a small band" except focal ones. 60-30-10 (dominant,
|
|
87
|
+
secondary, accent) is a practitioner rule borrowed from interior design, useful as a starting split.
|
|
88
|
+
- **Check it numerically.** `value_report(colours, focal_indices)` gives each colour's L* and fails a focal
|
|
89
|
+
colour within 20 L* of any large-area colour.
|
|
90
|
+
|
|
91
|
+
### Recipe: a palette-atlas prop with a value check
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
"""A low-poly tree painted from a shared palette atlas: one closed lathed solid, flat-shaded, each face mapped
|
|
95
|
+
into its colour cell, one material. Checks the palette's value structure and the prop's on-screen height.
|
|
96
|
+
Saves palette_prop.blend and palette.png."""
|
|
97
|
+
import json
|
|
98
|
+
import os
|
|
99
|
+
import sys
|
|
100
|
+
|
|
101
|
+
import bpy
|
|
102
|
+
|
|
103
|
+
import construction_kit as kit
|
|
104
|
+
import style_palette as palette
|
|
105
|
+
|
|
106
|
+
out_folder = sys.argv[sys.argv.index("--") + 1]
|
|
107
|
+
COLOURS = [(0.36, 0.23, 0.14), # 0 bark
|
|
108
|
+
(0.20, 0.48, 0.22), # 1 foliage
|
|
109
|
+
(0.10, 0.26, 0.14), # 2 foliage underside
|
|
110
|
+
(0.42, 0.50, 0.30), # 3 ground, the largest area
|
|
111
|
+
(1.00, 0.80, 0.15)] # 4 pickup gold: the focal colour
|
|
112
|
+
FOCAL = [4]
|
|
113
|
+
TRUNK_TOP = 0.6 # metres: where the foliage starts
|
|
114
|
+
PROP_HEIGHT = 2.0
|
|
115
|
+
DOWN_FACING_Z = -0.5 # a face whose normal Z is below this faces the ground
|
|
116
|
+
VIEW_DISTANCE, VERTICAL_FOV, SCREEN_HEIGHT = 20.0, 60.0, 1080 # the game camera this prop is judged in
|
|
117
|
+
|
|
118
|
+
kit.clear_default_scene()
|
|
119
|
+
# One closed solid: trunk up to TRUNK_TOP, the foliage's flat underside, then the cone to the tip.
|
|
120
|
+
tree = kit.profile_spin("Tree_Pine", [(0.0, 0.0), (0.12, 0.0), (0.12, TRUNK_TOP), (0.6, TRUNK_TOP), (0.0, PROP_HEIGHT)],
|
|
121
|
+
steps=7, axis="Z")
|
|
122
|
+
palette.flat_shade(tree)
|
|
123
|
+
atlas = palette.palette_image("Palette_World", COLOURS, path=os.path.abspath(os.path.join(out_folder, "palette.png")))
|
|
124
|
+
tree.data.materials.append(palette.palette_material("World_Palette", atlas))
|
|
125
|
+
for polygon in tree.data.polygons:
|
|
126
|
+
if polygon.normal.z < DOWN_FACING_Z and polygon.center.z >= TRUNK_TOP:
|
|
127
|
+
colour = 2 # the shaded underside of the foliage
|
|
128
|
+
elif polygon.center.z < TRUNK_TOP:
|
|
129
|
+
colour = 0 # trunk sides and base
|
|
130
|
+
else:
|
|
131
|
+
colour = 1
|
|
132
|
+
palette.paint_faces(tree, [polygon.index], colour)
|
|
133
|
+
|
|
134
|
+
bpy.ops.wm.save_as_mainfile(filepath=os.path.join(out_folder, "palette_prop.blend"))
|
|
135
|
+
print(json.dumps({"values": palette.value_report(COLOURS, FOCAL),
|
|
136
|
+
"pixel_height": round(palette.silhouette_pixel_height(PROP_HEIGHT, VIEW_DISTANCE, VERTICAL_FOV,
|
|
137
|
+
SCREEN_HEIGHT), 1)}))
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Then gate it:
|
|
141
|
+
- `values` passes: gold stands more than 20 L* from every other colour.
|
|
142
|
+
- `qa-check --model palette_prop.blend --profile game` passes. Palette UVs stack many faces in one cell, which
|
|
143
|
+
the web profile reports as overlap.
|
|
144
|
+
- `review-render --model palette_prop.blend --out review --pixel-height <pixel_height>` still reads as a
|
|
145
|
+
tree at that height (about 94 px at 20 m on a 1080 p screen).
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Sources
|
|
150
|
+
|
|
151
|
+
- 21 Draw, "Why Is Shape Language So Important" — https://www.21-draw.com/why-is-shape-language-so-important/
|
|
152
|
+
- Riot Games, "Clarity in League" and "VALORANT Shaders and Gameplay Clarity" —
|
|
153
|
+
https://www.leagueoflegends.com/en-us/news/dev/clarity-in-league/ ,
|
|
154
|
+
https://www.riotgames.com/en/news/valorant-shaders-and-gameplay-clarity
|
|
155
|
+
- Team Fortress Wiki, "Artstyle" (quoting Valve's NPAR 2007 paper) — https://wiki.teamfortress.com/wiki/Artstyle ;
|
|
156
|
+
Game Developer, "How Valve Makes Art to Enhance Gameplay" — https://gamedeveloper.com/art/in-depth-how-valve-makes-art-to-enhance-gameplay
|
|
157
|
+
- 80.lv, "Comparing Team Fortress 2 and Overwatch Art Direction" —
|
|
158
|
+
https://80.lv/articles/comparing-team-fortress-2-and-overwatch-art-direction
|
|
159
|
+
- Habrador, "Stylized graphics: Fortnite and Sea of Thieves" (GDC 2018 notes) —
|
|
160
|
+
https://blog.habrador.com/2018/08/stylized-graphics-fortnite-sea-of-thieves.html
|
|
161
|
+
- Thumbsticks, "GDC17: Designing Zelda: Breath of the Wild" — https://www.thumbsticks.com/gdc17-designing-zelda-breath-of-the-wild/
|
|
162
|
+
- Android Developers / Arm, "Optimize geometry" — https://developer.android.com/games/optimize/geometry
|
|
163
|
+
- Adobe Substance, "The PBR Guide – Part 2" — https://www.adobe.com/learn/substance-3d-designer/web/the-pbr-guide-part-2
|
|
164
|
+
- Maxon Cinema 4D Help, "Texel Density" — https://help.maxon.net/c4d/en-us/Content/html/Texel_Density.html
|
|
165
|
+
- Khronos 3D Commerce, Publishing Targets —
|
|
166
|
+
https://github.com/mlimper/3DC-Asset-Creation/blob/main/asset-creation-guidelines/full-version/sec99_PublishingTargets/PublishingTargets.md
|
|
167
|
+
- Meta, "Art Direction for All-in-One VR Performance" — https://developers.meta.com/vr/blog/art-direction-for-all-in-one-vr-performance/
|
|
168
|
+
- Low Poly Palette add-on documentation (palette atlas layout) — https://superhivemarket.com/products/low-poly-palette/docs
|
|
169
|
+
- 80.lv, "Optimization of Stylized Game Assets" and "Tips on Creating Stylized 3D Content" —
|
|
170
|
+
https://80.lv/articles/optimization-of-stylized-game-assets , https://80.lv/articles/tips-on-creating-stylized-3d-content/
|
|
171
|
+
- Radiator Blog, "Bevels in video games" — https://www.blog.radiator.debacle.us/2017/07/bevels-in-video-games.html
|
|
172
|
+
- Ice Wyrm Games, "Reducing Visual Confusion in Your Game" — https://icewyrmgames.github.io/research/reducing-visual-confusion-in-your-game
|
|
173
|
+
- itch.io, "Color palettes and the 60-30-10 rule" — https://itch.io/blog/478705/a-short-recommendation-color-palettes-and-the-60-30-10-rule
|