agent-manifesto-kit 1.8.0 → 1.8.2
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 +44 -0
- package/collection/skills/art-direction-pass/SKILL.md +245 -0
- package/collection/skills/art-direction-pass/agents/openai.yaml +4 -0
- package/collection/skills/art-direction-pass/assets/presets.json +9 -0
- package/collection/skills/art-direction-pass/assets/visual_capture.gd +77 -0
- package/collection/skills/art-direction-pass/scripts/compare.py +86 -0
- package/collection/skills/art-direction-pass/scripts/metrics.py +56 -0
- package/collection/skills/art-direction-pass/scripts/test_tools.py +83 -0
- package/collection/skills/concept-asset-builder/SKILL.md +124 -0
- package/collection/skills/concept-asset-builder/agents/openai.yaml +4 -0
- package/collection/skills/concept-asset-builder/assets/templates/agent_brief.md +56 -0
- package/collection/skills/concept-asset-builder/assets/templates/rubric.json +50 -0
- package/collection/skills/concept-asset-builder/assets/templates/rubric_example_vending.json +14 -0
- package/collection/skills/concept-asset-builder/assets/templates/scene_style_example.md +30 -0
- package/collection/skills/concept-asset-builder/assets/templates/wear_description_example.md +50 -0
- package/collection/skills/concept-asset-builder/assets/templates/zones.json +10 -0
- package/collection/skills/concept-asset-builder/assets/templates/zones_example_vending.json +69 -0
- package/collection/skills/concept-asset-builder/references/examples/postbox_blender.py +1112 -0
- package/collection/skills/concept-asset-builder/references/examples/postbox_wear_three.js +742 -0
- package/collection/skills/concept-asset-builder/references/examples/vending_materials_blender.py +487 -0
- package/collection/skills/concept-asset-builder/references/examples/vending_wear_three.js +798 -0
- package/collection/skills/concept-asset-builder/references/field-lessons.md +36 -0
- package/collection/skills/concept-asset-builder/references/wear-language.md +36 -0
- package/collection/skills/concept-asset-builder/scripts/blender/bake_export.py +174 -0
- package/collection/skills/concept-asset-builder/scripts/blender/render_views.py +100 -0
- package/collection/skills/concept-asset-builder/scripts/blender/studio.py +73 -0
- package/collection/skills/concept-asset-builder/scripts/capture.mjs +44 -0
- package/collection/skills/concept-asset-builder/scripts/codex_review.sh +88 -0
- package/collection/skills/concept-asset-builder/scripts/compare_to.py +24 -0
- package/collection/skills/concept-asset-builder/scripts/composite_godot.py +13 -0
- package/collection/skills/concept-asset-builder/scripts/crop.py +9 -0
- package/collection/skills/concept-asset-builder/scripts/gen_texture.sh +18 -0
- package/collection/skills/concept-asset-builder/scripts/godot/capture.gd +122 -0
- package/collection/skills/concept-asset-builder/scripts/godot/project.godot +18 -0
- package/collection/skills/concept-asset-builder/scripts/init_workspace.sh +17 -0
- package/collection/skills/concept-asset-builder/scripts/measure_silhouette.py +40 -0
- package/collection/skills/concept-asset-builder/scripts/metrics.py +144 -0
- package/collection/skills/concept-asset-builder/scripts/sheet.py +19 -0
- package/collection/skills/concept-asset-builder/scripts/test_tools.py +121 -0
- package/collection/skills/concept-asset-builder/scripts/threejs/index.html +23 -0
- package/collection/skills/concept-asset-builder/scripts/threejs/model.js +9 -0
- package/collection/skills/concept-asset-builder/scripts/threejs/studio.js +178 -0
- package/collection/skills/concept-asset-builder/scripts/wear_stats.py +130 -0
- package/collection/skills/concept-scene-builder/SKILL.md +326 -0
- package/collection/skills/concept-scene-builder/agents/openai.yaml +4 -0
- package/collection/skills/concept-scene-builder/references/field-lessons.md +113 -0
- package/collection/skills/concept-scene-builder/scripts/blend.py +32 -0
- package/collection/skills/concept-scene-builder/scripts/crop.py +56 -0
- package/collection/skills/concept-scene-builder/scripts/grid_overlay.py +117 -0
- package/collection/skills/concept-scene-builder/scripts/test_tools.py +89 -0
- package/collection/skills/machine-builder/SKILL.md +222 -0
- package/collection/skills/machine-builder/agents/openai.yaml +4 -0
- package/collection/skills/machine-builder/assets/spec.example.yaml +47 -0
- package/collection/skills/machine-builder/scripts/validate.py +307 -0
- package/package.json +1 -1
package/collection/skills/concept-asset-builder/references/examples/vending_materials_blender.py
ADDED
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
"""Procedural Cycles materials of the vending machine: weathered teal paint (post box wear language: Voronoi flakes +
|
|
2
|
+
hand-placed star flakes with a thin rust rim, interrupted edge wear to primer with a metal core, rust drip clusters from
|
|
3
|
+
real sources, olive grime only at the bottom), glowing display, metal parts.
|
|
4
|
+
Debug: DEBUG_CHIPS=1 (white = chips), DEBUG_DRIPS=1, DEBUG_EDGE=1 (R near-edge, G edge wear)."""
|
|
5
|
+
import os, math
|
|
6
|
+
import vmlib as L
|
|
7
|
+
from vmlib import M, map_range, mix_rgb, hex_rgba, noise3, vmath
|
|
8
|
+
|
|
9
|
+
PRIMER_A, PRIMER_B = "#C2BCAE", "#B0AA9B" # albedo: lit chips read #C9C3B6..#D6D2C8 like the concept
|
|
10
|
+
METAL_CORE = "#9A9C97"
|
|
11
|
+
RIM = "#9A5A2E"
|
|
12
|
+
DRIP, STAIN = "#A3602C", "#5C3218"
|
|
13
|
+
GRIME = "#6F7046"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def zone_curve(nt, val, pts):
|
|
17
|
+
"""piecewise-linear function of a socket: pts [(x, y), ...] ascending x (clamped at the ends)."""
|
|
18
|
+
out = pts[0][1]
|
|
19
|
+
for (xa, ya), (xb, yb) in zip(pts, pts[1:]):
|
|
20
|
+
if ya == yb:
|
|
21
|
+
continue
|
|
22
|
+
out = M(nt, "ADD", out, M(nt, "MULTIPLY", map_range(nt, val, xa, xb), yb - ya))
|
|
23
|
+
return out
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def paint(name, base_hex, *, small=(0.004, 0.05), medium=(0.0015, 0.02), cells=(0.015, 0.032), fleck=0.12,
|
|
27
|
+
prob_mod=None, near_extra=None, spots=None, crest_wear=0.0, crest_deg=4.0, edge_wear=0.6, wear_r=0.006,
|
|
28
|
+
wear_gate=(26.0, 0.45), wear_mod=None, drips=None, wash=None, grime=None, streaks=0.06, mottle=0.05,
|
|
29
|
+
crevice=0.5, dirt=0.12, lighter_hex=None, rough=(0.66, 0.84), side_hex=None, metal_thr=0.86, grime_k=1.0,
|
|
30
|
+
edge_tint=None):
|
|
31
|
+
m, nt, bsdf = L.mat_nodes(name)
|
|
32
|
+
tco, sep = L.obj_xyz(nt)
|
|
33
|
+
geo = nt.nodes.new("ShaderNodeNewGeometry")
|
|
34
|
+
co = tco.outputs["Object"]
|
|
35
|
+
color = hex_rgba(base_hex)
|
|
36
|
+
if side_hex:
|
|
37
|
+
# faces looking along X (cabinet sides) get their own paint value (concept: sides darker than the back)
|
|
38
|
+
sn_ = nt.nodes.new("ShaderNodeSeparateXYZ")
|
|
39
|
+
nt.links.new(geo.outputs["Normal"], sn_.inputs[0])
|
|
40
|
+
color = mix_rgb(nt, map_range(nt, M(nt, "ABSOLUTE", sn_.outputs[0]), 0.55, 0.92), color, hex_rgba(side_hex))
|
|
41
|
+
if edge_tint:
|
|
42
|
+
# concept: the door reads bluer/darker toward its vertical edges and under the roof (less faded there)
|
|
43
|
+
th, ew, tw = edge_tint
|
|
44
|
+
ex = map_range(nt, M(nt, "ABSOLUTE", sep.outputs["X"]), 0.4225 - ew, 0.4225 - 0.01)
|
|
45
|
+
ez = map_range(nt, sep.outputs["Z"], 1.83 - tw, 1.83 - 0.06)
|
|
46
|
+
en = map_range(nt, noise3(nt, co, 8.0, 8.0, 2.0, detail=3.0, loc=(5.0, 5.0, 0)), 0.3, 0.7, 0.5, 1.0)
|
|
47
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", M(nt, "MAXIMUM", ex, ez), en), color, hex_rgba(th))
|
|
48
|
+
# faded paint: slight mottling + faint vertical runs (description: "слабые вертикальные разводы")
|
|
49
|
+
mot = noise3(nt, co, 6.0, 6.0, 3.0, detail=4.0, rough=0.6, loc=(9.0, 0, 0))
|
|
50
|
+
bh = hex_rgba(base_hex)
|
|
51
|
+
# mottle as a multiplicative tint (works on both paint values of a material)
|
|
52
|
+
lh = hex_rgba(lighter_hex) if lighter_hex else tuple(c * 1.12 for c in bh[:3]) + (1.0,)
|
|
53
|
+
tint = tuple(min(2.0, lh[i] / max(bh[i], 1e-4)) for i in range(3)) + (1.0,)
|
|
54
|
+
col_d = (0.9, 0.9, 0.9, 1.0)
|
|
55
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", map_range(nt, mot, 0.35, 0.65), mottle * 6), color, mix_rgb(nt, 1.0, color, tint, "MULTIPLY"))
|
|
56
|
+
stk = noise3(nt, co, 38.0, 38.0, 1.3, detail=3.0, rough=0.55, loc=(0, 4.0, 0))
|
|
57
|
+
darker = mix_rgb(nt, 1.0, color, col_d, "MULTIPLY")
|
|
58
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", map_range(nt, stk, 0.45, 0.65), streaks * 5), color, darker)
|
|
59
|
+
if dirt > 0:
|
|
60
|
+
dn = map_range(nt, noise3(nt, co, 9.0, 9.0, 4.0, detail=5.0, rough=0.6, loc=(2.0, 0, 5.0)), 0.35, 0.7, 0.0, 1.0)
|
|
61
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", dn, dirt), color, hex_rgba("#7C7A6C"))
|
|
62
|
+
# ragged outlines: warped coordinates
|
|
63
|
+
wv = noise3(nt, co, 22.0, detail=3.0, out="Color")
|
|
64
|
+
wco = vmath(nt, "ADD", co, vmath(nt, "SCALE", vmath(nt, "SUBTRACT", wv, (0.5, 0.5, 0.5)), scale=0.012))
|
|
65
|
+
# near-edge mask: crest of the big roundings (wide) + small cut edges (Bevel node)
|
|
66
|
+
near = L.edge_mask(nt, geo, 0.02, 0.9995, 0.985)
|
|
67
|
+
near = M(nt, "MAXIMUM", near, L.crest_mask(nt, geo, 16.0, 6.0))
|
|
68
|
+
if near_extra is not None:
|
|
69
|
+
near = M(nt, "MAXIMUM", near, near_extra(nt, sep))
|
|
70
|
+
cluster = map_range(nt, noise3(nt, co, 4.0, detail=2.0, loc=(11.0, 0, 0)), 0.38, 0.62, 0.3, 1.7)
|
|
71
|
+
halo, spot_chip = 0.0, None
|
|
72
|
+
if spots:
|
|
73
|
+
spot_chip, halo, spot_rim = L.star_spots(nt, tco, sep, spots)
|
|
74
|
+
pm = prob_mod(nt, sep) if prob_mod is not None else None
|
|
75
|
+
|
|
76
|
+
def prob(base, extra, halo_k):
|
|
77
|
+
p = M(nt, "MULTIPLY", M(nt, "ADD", base, M(nt, "MULTIPLY", near, extra)), cluster)
|
|
78
|
+
if not isinstance(halo, float):
|
|
79
|
+
p = M(nt, "ADD", p, M(nt, "MULTIPLY", halo, halo_k))
|
|
80
|
+
if pm is not None:
|
|
81
|
+
p = M(nt, "MULTIPLY", p, pm)
|
|
82
|
+
return p
|
|
83
|
+
|
|
84
|
+
chip, rim = L.flakes(nt, wco, cells[0], 1.6, prob(small[0], small[1], 0.14), (0.1, 0.32), seed=1.0)
|
|
85
|
+
if medium[0] > 0 or medium[1] > 0:
|
|
86
|
+
c2, r2 = L.flakes(nt, wco, cells[1], 1.6, prob(medium[0], medium[1], 0.02), (0.06, 0.22), seed=2.0)
|
|
87
|
+
chip, rim = M(nt, "MAXIMUM", chip, c2), M(nt, "MAXIMUM", rim, r2)
|
|
88
|
+
c3, r3 = L.flakes(nt, wco, 0.007, 1.3, prob(small[0] * fleck, small[1] * fleck, 0.2), (0.12, 0.3), seed=3.0, rim_w=0.08)
|
|
89
|
+
chip, rim = M(nt, "MAXIMUM", chip, c3), M(nt, "MAXIMUM", rim, r3)
|
|
90
|
+
if spot_chip is not None:
|
|
91
|
+
chip, rim = M(nt, "MAXIMUM", chip, spot_chip), M(nt, "MAXIMUM", rim, spot_rim)
|
|
92
|
+
# edge wear: interrupted primer strip on the crest of the big roundings and on small edges, metal in its core
|
|
93
|
+
worn, metal, e2 = 0.0, 0.0, None
|
|
94
|
+
if edge_wear > 0 or crest_wear > 0:
|
|
95
|
+
e2 = M(nt, "MULTIPLY", L.edge_mask(nt, geo, wear_r, 0.999, 0.9), edge_wear)
|
|
96
|
+
if crest_wear > 0:
|
|
97
|
+
e2 = M(nt, "MAXIMUM", e2, M(nt, "MULTIPLY", L.crest_mask(nt, geo, crest_deg, 2.5), crest_wear))
|
|
98
|
+
gsc, cov = wear_gate
|
|
99
|
+
gs3 = gsc if isinstance(gsc, tuple) else (gsc, gsc, gsc)
|
|
100
|
+
g = noise3(nt, co, *gs3, detail=2.0, loc=(5.0, 7.0, 1.0))
|
|
101
|
+
t0 = 0.5 + (0.5 - cov) * 0.28
|
|
102
|
+
gate = map_range(nt, g, t0 - 0.015, t0 + 0.015)
|
|
103
|
+
strength = 1.0 if wear_mod is None else wear_mod(nt, sep)
|
|
104
|
+
rag = noise3(nt, co, 160.0, detail=3.0, rough=0.6, loc=(2.0, 2.0, 2.0))
|
|
105
|
+
ev = M(nt, "ADD", M(nt, "MULTIPLY", M(nt, "MULTIPLY", e2, gate), strength), M(nt, "MULTIPLY", M(nt, "SUBTRACT", rag, 0.5), 0.9))
|
|
106
|
+
worn = map_range(nt, ev, 0.5, 0.54)
|
|
107
|
+
metal = map_range(nt, ev, metal_thr, metal_thr + 0.07)
|
|
108
|
+
rim = M(nt, "MAXIMUM", rim, M(nt, "MULTIPLY", map_range(nt, ev, 0.44, 0.5), 0.6))
|
|
109
|
+
chip = M(nt, "MAXIMUM", chip, worn)
|
|
110
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", rim, 0.7), color, hex_rgba(RIM))
|
|
111
|
+
uc = mix_rgb(nt, map_range(nt, noise3(nt, co, 60.0, detail=3.0), 0.35, 0.65), hex_rgba(PRIMER_A), hex_rgba(PRIMER_B))
|
|
112
|
+
color = mix_rgb(nt, chip, color, uc)
|
|
113
|
+
if not isinstance(metal, float):
|
|
114
|
+
color = mix_rgb(nt, metal, color, hex_rgba(METAL_CORE))
|
|
115
|
+
if grime:
|
|
116
|
+
# olive grime/mould: patches over the bottom few cm only (z0 .. z0 + 3-8 cm), denser right at the edge
|
|
117
|
+
z0g, hgt = grime
|
|
118
|
+
mz = map_range(nt, sep.outputs["Z"], z0g + hgt, z0g)
|
|
119
|
+
mn = noise3(nt, co, 14.0, 14.0, 20.0, detail=6.0, rough=0.65, loc=(4.0, 0, 0))
|
|
120
|
+
mn2 = noise3(nt, co, 40.0, 40.0, 30.0, detail=4.0, rough=0.6, loc=(8.0, 1.0, 0))
|
|
121
|
+
mn = M(nt, "ADD", M(nt, "MULTIPLY", mn, 0.7), M(nt, "MULTIPLY", mn2, 0.3))
|
|
122
|
+
gm = map_range(nt, M(nt, "ADD", mn, M(nt, "MULTIPLY", M(nt, "POWER", mz, 1.3), 0.24 * grime_k)), 0.74, 0.775)
|
|
123
|
+
gm = M(nt, "MULTIPLY", gm, map_range(nt, sep.outputs["Z"], z0g + hgt + 0.01, z0g + hgt - 0.01))
|
|
124
|
+
gd = map_range(nt, noise3(nt, co, 50.0, detail=3.0, loc=(1.0, 6.0, 0)), 0.3, 0.7, 0.75, 1.0)
|
|
125
|
+
gcol = mix_rgb(nt, map_range(nt, noise3(nt, co, 20.0, detail=4.0, loc=(0, 9.0, 0)), 0.4, 0.62), hex_rgba(GRIME), hex_rgba("#8C8B5C"))
|
|
126
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", gm, M(nt, "MULTIPLY", gd, 0.9)), color, gcol)
|
|
127
|
+
# faint brownish dirt film just above the grime
|
|
128
|
+
film = M(nt, "MULTIPLY", map_range(nt, sep.outputs["Z"], z0g + hgt + 0.03, z0g), 0.12)
|
|
129
|
+
color = mix_rgb(nt, film, color, hex_rgba("#6E6A50"), "MULTIPLY")
|
|
130
|
+
ao = nt.nodes.new("ShaderNodeAmbientOcclusion")
|
|
131
|
+
ao.inputs["Distance"].default_value = 0.03
|
|
132
|
+
ao.samples = 16
|
|
133
|
+
if crevice > 0:
|
|
134
|
+
crev = map_range(nt, ao.outputs["AO"], 0.9, 0.55)
|
|
135
|
+
cp_ = map_range(nt, noise3(nt, co, 35.0, 35.0, 12.0, detail=3.0), 0.35, 0.6, 0.4, 1.0)
|
|
136
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", M(nt, "MULTIPLY", crev, cp_), crevice), color, hex_rgba("#6A3A1E"))
|
|
137
|
+
if wash:
|
|
138
|
+
wn_ = map_range(nt, noise3(nt, co, 55.0, 55.0, 1.2, detail=3.0, loc=(0, 4.0, 0)), 0.46, 0.62)
|
|
139
|
+
wsum = None
|
|
140
|
+
for fn, k_ in wash:
|
|
141
|
+
w1 = M(nt, "MULTIPLY", fn(nt, sep), k_)
|
|
142
|
+
wsum = w1 if wsum is None else M(nt, "MAXIMUM", wsum, w1)
|
|
143
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", wsum, wn_), color, hex_rgba("#8A5530"))
|
|
144
|
+
dr = None
|
|
145
|
+
if drips:
|
|
146
|
+
dr, st = L.drips_planar(nt, tco, sep, drips)
|
|
147
|
+
color = mix_rgb(nt, dr, color, hex_rgba(DRIP))
|
|
148
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", st, 0.75), color, hex_rgba(STAIN))
|
|
149
|
+
if os.environ.get("DEBUG_DRIPS") and dr is not None:
|
|
150
|
+
color = mix_rgb(nt, dr, (0, 0, 0, 1), (1, 1, 1, 1))
|
|
151
|
+
if os.environ.get("DEBUG_CHIPS"):
|
|
152
|
+
color = mix_rgb(nt, chip, (0, 0, 0, 1), (1, 1, 1, 1))
|
|
153
|
+
if os.environ.get("DEBUG_EDGE"):
|
|
154
|
+
dbg = nt.nodes.new("ShaderNodeCombineColor")
|
|
155
|
+
nt.links.new(near, dbg.inputs[0])
|
|
156
|
+
if e2 is not None:
|
|
157
|
+
nt.links.new(e2, dbg.inputs[1])
|
|
158
|
+
color = dbg.outputs["Color"]
|
|
159
|
+
gr = map_range(nt, ao.outputs["AO"], 0.95, 0.45, 0.0, 0.22)
|
|
160
|
+
color = mix_rgb(nt, gr, color, hex_rgba("#5A3A28"), "MULTIPLY")
|
|
161
|
+
nt.links.new(color, bsdf.inputs["Base Color"])
|
|
162
|
+
rgh = map_range(nt, chip, 0.0, 1.0, rough[0], rough[1])
|
|
163
|
+
if not isinstance(metal, float):
|
|
164
|
+
rgh = M(nt, "SUBTRACT", rgh, M(nt, "MULTIPLY", metal, 0.35))
|
|
165
|
+
nt.links.new(M(nt, "MULTIPLY", metal, 0.3), bsdf.inputs["Metallic"])
|
|
166
|
+
L.link_or_set(nt, bsdf.inputs["Roughness"], rgh)
|
|
167
|
+
bp = nt.nodes.new("ShaderNodeBump")
|
|
168
|
+
bp.inputs["Strength"].default_value = 0.35
|
|
169
|
+
bp.inputs["Distance"].default_value = 0.0006
|
|
170
|
+
nt.links.new(M(nt, "SUBTRACT", 1.0, chip), bp.inputs["Height"])
|
|
171
|
+
nt.links.new(bp.outputs["Normal"], bsdf.inputs["Normal"])
|
|
172
|
+
return m
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def worn_metal(name, hex_, *, metallic=0.55, rough=0.45, wear_hex="#B4B2AA", wear=1.0, wear_r=0.004, rust=0.0, grime=None,
|
|
176
|
+
spec_var=0.15):
|
|
177
|
+
"""dark painted / bare metal part: edges rubbed to light metal, slight mottling, optional rust specks."""
|
|
178
|
+
m, nt, bsdf = L.mat_nodes(name)
|
|
179
|
+
tco, sep = L.obj_xyz(nt)
|
|
180
|
+
geo = nt.nodes.new("ShaderNodeNewGeometry")
|
|
181
|
+
co = tco.outputs["Object"]
|
|
182
|
+
base = hex_rgba(hex_)
|
|
183
|
+
mot = noise3(nt, co, 40.0, detail=4.0, rough=0.6)
|
|
184
|
+
color = mix_rgb(nt, map_range(nt, mot, 0.3, 0.7), tuple(c * (1 - spec_var) for c in base[:3]) + (1,), tuple(min(1, c * (1 + spec_var)) for c in base[:3]) + (1,))
|
|
185
|
+
e = L.edge_mask(nt, geo, wear_r, 0.999, 0.9)
|
|
186
|
+
e = M(nt, "MAXIMUM", e, L.crest_mask(nt, geo, 22.0, 6.0)) # the 2.8 mm bevels of the housings are rubbed bright
|
|
187
|
+
rag = noise3(nt, co, 140.0, detail=3.0, rough=0.6, loc=(1.0, 2.0, 0))
|
|
188
|
+
gate = map_range(nt, noise3(nt, co, 30.0, detail=2.0, loc=(4.0, 0, 0)), 0.38, 0.5)
|
|
189
|
+
ev = M(nt, "ADD", M(nt, "MULTIPLY", M(nt, "MULTIPLY", e, gate), wear), M(nt, "MULTIPLY", M(nt, "SUBTRACT", rag, 0.5), 0.7))
|
|
190
|
+
worn = map_range(nt, ev, 0.45, 0.55)
|
|
191
|
+
color = mix_rgb(nt, worn, color, hex_rgba(wear_hex))
|
|
192
|
+
if rust > 0:
|
|
193
|
+
rs = map_range(nt, noise3(nt, co, 70.0, detail=5.0, rough=0.7, loc=(7.0, 0, 0)), 0.62, 0.7)
|
|
194
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", rs, rust), color, hex_rgba("#7A4022"))
|
|
195
|
+
if grime:
|
|
196
|
+
z0g, hgt = grime
|
|
197
|
+
gm = map_range(nt, M(nt, "ADD", noise3(nt, co, 25.0, detail=5.0, loc=(3.0, 0, 0)),
|
|
198
|
+
M(nt, "MULTIPLY", map_range(nt, sep.outputs["Z"], z0g + hgt, z0g), 0.3)), 0.62, 0.68)
|
|
199
|
+
color = mix_rgb(nt, M(nt, "MULTIPLY", gm, 0.85), color, hex_rgba(GRIME))
|
|
200
|
+
ao = nt.nodes.new("ShaderNodeAmbientOcclusion")
|
|
201
|
+
ao.inputs["Distance"].default_value = 0.02
|
|
202
|
+
color = mix_rgb(nt, map_range(nt, ao.outputs["AO"], 0.95, 0.5, 0.0, 0.3), color, hex_rgba("#3A2A20"), "MULTIPLY")
|
|
203
|
+
nt.links.new(color, bsdf.inputs["Base Color"])
|
|
204
|
+
L.link_or_set(nt, bsdf.inputs["Metallic"], M(nt, "ADD", metallic, M(nt, "MULTIPLY", worn, 0.3)))
|
|
205
|
+
L.link_or_set(nt, bsdf.inputs["Roughness"], M(nt, "SUBTRACT", rough, M(nt, "MULTIPLY", worn, 0.12)))
|
|
206
|
+
return m
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def emission(name, hex_, strength):
|
|
210
|
+
m, nt, _ = L.mat_nodes(name)
|
|
211
|
+
for n in list(nt.nodes):
|
|
212
|
+
if n.type == "BSDF_PRINCIPLED":
|
|
213
|
+
nt.nodes.remove(n)
|
|
214
|
+
out = [n for n in nt.nodes if n.type == "OUTPUT_MATERIAL"][0]
|
|
215
|
+
em = nt.nodes.new("ShaderNodeEmission")
|
|
216
|
+
em.inputs["Color"].default_value = hex_rgba(hex_)
|
|
217
|
+
em.inputs["Strength"].default_value = strength
|
|
218
|
+
nt.links.new(em.outputs[0], out.inputs["Surface"])
|
|
219
|
+
return m
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def glow_wall(name, yf):
|
|
223
|
+
m, nt, _ = L.mat_nodes(name)
|
|
224
|
+
for n in list(nt.nodes):
|
|
225
|
+
if n.type == "BSDF_PRINCIPLED":
|
|
226
|
+
nt.nodes.remove(n)
|
|
227
|
+
out = [n for n in nt.nodes if n.type == "OUTPUT_MATERIAL"][0]
|
|
228
|
+
tco, sep = L.obj_xyz(nt)
|
|
229
|
+
f = map_range(nt, sep.outputs["Y"], yf + 0.01, yf + 0.12)
|
|
230
|
+
em = nt.nodes.new("ShaderNodeEmission")
|
|
231
|
+
nt.links.new(mix_rgb(nt, f, hex_rgba("#A6E4FA"), hex_rgba("#D6F5FF")), em.inputs["Color"])
|
|
232
|
+
nt.links.new(map_range(nt, f, 0.0, 1.0, 1.15, 1.5), em.inputs["Strength"])
|
|
233
|
+
nt.links.new(em.outputs[0], out.inputs["Surface"])
|
|
234
|
+
return m
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def glow_back(name, hex_, strength):
|
|
238
|
+
"""display back panel: cool white, brighter toward the edges (concept: bluish-white rim inside the frame)."""
|
|
239
|
+
m, nt, _ = L.mat_nodes(name)
|
|
240
|
+
for n in list(nt.nodes):
|
|
241
|
+
if n.type == "BSDF_PRINCIPLED":
|
|
242
|
+
nt.nodes.remove(n)
|
|
243
|
+
out = [n for n in nt.nodes if n.type == "OUTPUT_MATERIAL"][0]
|
|
244
|
+
em = nt.nodes.new("ShaderNodeEmission")
|
|
245
|
+
em.inputs["Color"].default_value = hex_rgba(hex_)
|
|
246
|
+
em.inputs["Strength"].default_value = strength
|
|
247
|
+
nt.links.new(em.outputs[0], out.inputs["Surface"])
|
|
248
|
+
return m
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
def plastic(name, hex_, rough=0.35, glow=0.25, coat=0.4, k=1.0):
|
|
252
|
+
m, nt, bsdf = L.mat_nodes(name)
|
|
253
|
+
c = tuple(v * k for v in hex_rgba(hex_)[:3]) + (1.0,)
|
|
254
|
+
bsdf.inputs["Base Color"].default_value = c
|
|
255
|
+
bsdf.inputs["Roughness"].default_value = rough
|
|
256
|
+
bsdf.inputs["Coat Weight"].default_value = coat
|
|
257
|
+
bsdf.inputs["Coat Roughness"].default_value = 0.15
|
|
258
|
+
bsdf.inputs["Emission Color"].default_value = c
|
|
259
|
+
bsdf.inputs["Emission Strength"].default_value = glow
|
|
260
|
+
return m
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def clear_plastic(name):
|
|
264
|
+
m, nt, bsdf = L.mat_nodes(name)
|
|
265
|
+
bsdf.inputs["Base Color"].default_value = hex_rgba("#EAF7FA")
|
|
266
|
+
bsdf.inputs["Roughness"].default_value = 0.2
|
|
267
|
+
bsdf.inputs["Transmission Weight"].default_value = 0.6
|
|
268
|
+
bsdf.inputs["IOR"].default_value = 1.4
|
|
269
|
+
bsdf.inputs["Emission Color"].default_value = hex_rgba("#DDF4FA")
|
|
270
|
+
bsdf.inputs["Emission Strength"].default_value = 0.35
|
|
271
|
+
return m
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
def build(G):
|
|
275
|
+
S = G["SPEC"]
|
|
276
|
+
pal = S["palette"]
|
|
277
|
+
X0, X1, YF, YB, YD, YBODY, Z0, Z1 = (G[k] for k in ("X0", "X1", "YF", "YB", "YD", "YBODY", "Z0", "Z1"))
|
|
278
|
+
WIN, IP, FL, FV, items = G["WIN"], G["IP"], G["FL"], G["FV"], G["items"]
|
|
279
|
+
po_hw, po_z0, po_z1 = G["po"]
|
|
280
|
+
v_hw, v_z0, v_z1 = G["vent"]
|
|
281
|
+
FW = G["FW"]
|
|
282
|
+
mats = {}
|
|
283
|
+
|
|
284
|
+
# ------------------------------------------------ front door
|
|
285
|
+
bp_rect = (0.11, 0.38, 0.70, 0.965) # button panel zone
|
|
286
|
+
|
|
287
|
+
def door_prob(nt, sep):
|
|
288
|
+
z = sep.outputs["Z"]
|
|
289
|
+
p = zone_curve(nt, z, [(Z0, 0.6), (0.1, 0.8), (0.32, 0.9), (0.36, 1.3), (0.95, 1.3), (0.99, 0.6), (1.70, 0.6), (1.74, 0.6)])
|
|
290
|
+
# medium ragged chips around the button panel (description: up to 10-15% light there)
|
|
291
|
+
d = L.rect_dist(nt, sep, *bp_rect)
|
|
292
|
+
ring = M(nt, "MULTIPLY", map_range(nt, d, -0.05, -0.005), map_range(nt, d, 0.02, 0.0))
|
|
293
|
+
p = M(nt, "ADD", p, M(nt, "MULTIPLY", ring, 1.6))
|
|
294
|
+
# quiet inside the info panel recess (<= 1% there)
|
|
295
|
+
df = L.rect_dist(nt, sep, FL["x0"] - 0.012, FL["x1"] + 0.012, FL["y0"] - 0.012, FL["y1"] + 0.012)
|
|
296
|
+
p = M(nt, "ADD", p, M(nt, "MULTIPLY", M(nt, "MULTIPLY", map_range(nt, df, -0.05, -0.004), map_range(nt, df, 0.0, -0.002)), 1.0))
|
|
297
|
+
di = L.rect_dist(nt, sep, IP["x0"], IP["x1"], IP["y0"], IP["y1"])
|
|
298
|
+
p = M(nt, "MULTIPLY", p, map_range(nt, di, 0.004, 0.012, 1.0, 0.3))
|
|
299
|
+
return p
|
|
300
|
+
|
|
301
|
+
def door_near(nt, sep):
|
|
302
|
+
# door side edges (strip seen on the side views) and the vertical door edges: chips cluster there
|
|
303
|
+
ax = M(nt, "ABSOLUTE", sep.outputs["X"])
|
|
304
|
+
e = map_range(nt, ax, X1 - 0.07, X1 - 0.015)
|
|
305
|
+
top = map_range(nt, sep.outputs["Z"], Z1 - 0.17, Z1 - 0.09)
|
|
306
|
+
return M(nt, "MAXIMUM", M(nt, "MULTIPLY", e, 1.3), M(nt, "MULTIPLY", top, 0.8))
|
|
307
|
+
|
|
308
|
+
def door_wear_mod(nt, sep):
|
|
309
|
+
# the roof rounding wears most at the front and side crests; less on the low edges;
|
|
310
|
+
# the info panel outline shows short stretches of bare primer (r2)
|
|
311
|
+
zc = zone_curve(nt, sep.outputs["Z"], [(Z0, 0.6), (0.4, 0.8), (1.7, 1.0)])
|
|
312
|
+
di = M(nt, "ABSOLUTE", L.rect_dist(nt, sep, IP["x0"], IP["x1"], IP["y0"], IP["y1"]))
|
|
313
|
+
return M(nt, "MULTIPLY", zc, M(nt, "ADD", 1.0, M(nt, "MULTIPLY", map_range(nt, di, 0.006, 0.001), 0.9)))
|
|
314
|
+
|
|
315
|
+
fspots = [ # front: 1-3 medium/large star flakes in the middle, a few on the lower part / edges
|
|
316
|
+
dict(face="front", plane=YF, s=-0.12, z=0.56, w=0.075, h=0.05, seed=1, arms=6),
|
|
317
|
+
dict(face="front", plane=YF, s=-0.015, z=0.645, w=0.04, h=0.038, seed=2),
|
|
318
|
+
dict(face="front", plane=YF, s=0.386, z=0.48, w=0.04, h=0.065, seed=3),
|
|
319
|
+
dict(face="front", plane=YF, s=-0.392, z=0.375, w=0.04, h=0.06, seed=4),
|
|
320
|
+
dict(face="front", plane=YF, s=-0.29, z=0.17, w=0.045, h=0.04, seed=5),
|
|
321
|
+
dict(face="front", plane=YF, s=0.17, z=0.305, w=0.04, h=0.03, seed=6),
|
|
322
|
+
dict(face="front", plane=YF, s=0.40, z=1.40, w=0.03, h=0.07, seed=7),
|
|
323
|
+
dict(face="front", plane=YF, s=-0.405, z=1.38, w=0.025, h=0.06, seed=8),
|
|
324
|
+
dict(face="front", plane=YF + 0.004, s=-0.2, z=0.71, w=0.03, h=0.025, seed=9),
|
|
325
|
+
dict(face="front", plane=YF, s=0.40, z=0.86, w=0.025, h=0.045, seed=10),
|
|
326
|
+
dict(face="front", plane=YF, s=-0.39, z=1.08, w=0.022, h=0.05, seed=11),
|
|
327
|
+
dict(face="front", plane=YF, s=-0.21, z=0.12, w=0.035, h=0.03, seed=12),
|
|
328
|
+
dict(face="front", plane=YF, s=0.06, z=0.24, w=0.03, h=0.03, seed=13),
|
|
329
|
+
dict(face="front", plane=YF, s=0.33, z=0.31, w=0.03, h=0.035, seed=14),
|
|
330
|
+
dict(face="front", plane=YF, s=-0.345, z=0.585, w=0.03, h=0.04, seed=15),
|
|
331
|
+
dict(face="front", plane=YF, s=0.30, z=0.60, w=0.03, h=0.03, seed=16),
|
|
332
|
+
dict(face="front", plane=YF, s=0.315, z=0.49, w=0.035, h=0.03, seed=17),
|
|
333
|
+
dict(face="front", plane=YF, s=-0.07, z=0.29, w=0.03, h=0.025, seed=18),
|
|
334
|
+
dict(face="front", plane=YF, s=-0.30, z=0.93, w=0.03, h=0.02, seed=19),
|
|
335
|
+
dict(face="front", plane=YF, s=0.25, z=0.935, w=0.035, h=0.02, seed=20),
|
|
336
|
+
]
|
|
337
|
+
LIFT = 0.03
|
|
338
|
+
for sp in fspots:
|
|
339
|
+
if sp["z"] < 1.3:
|
|
340
|
+
sp["z"] += LIFT
|
|
341
|
+
it = items
|
|
342
|
+
fdrips = [
|
|
343
|
+
# under the raised window frame: 2-4 short drips
|
|
344
|
+
dict(face="front", plane=YF, s0=WIN["x0"] - FW, s1=WIN["x1"] + FW, z=WIN["y0"] - FW, maxlen=0.105, seed=1, cell=0.13, active=0.45, stain=0.8),
|
|
345
|
+
# info panel: from under the top outline (2-6, 3-8 cm) on the recessed plane, and from the lower outline
|
|
346
|
+
dict(face="front", plane=YF + IP["recess"], tol=0.003, s0=IP["x0"] + 0.01, s1=IP["x1"] - 0.01, z=IP["y1"] - 0.003, maxlen=0.150, seed=2, cell=0.09, active=0.55, stain=0.9),
|
|
347
|
+
dict(face="front", plane=YF, s0=IP["x0"], s1=IP["x1"], z=IP["y0"] - 0.002, maxlen=0.160, seed=3, cell=0.085, active=0.4, stain=0.7),
|
|
348
|
+
# under every button element (3-8 cm, a few longer)
|
|
349
|
+
dict(face="front", plane=YF, s0=it["select_button"]["x0"], s1=it["select_button"]["x1"], z=it["select_button"]["y0"], maxlen=0.123, seed=4, cell=0.1, active=1.0, stain=1.6),
|
|
350
|
+
dict(face="front", plane=YF, s0=it["coin_slot_unit"]["x0"], s1=it["coin_slot_unit"]["x1"], z=it["coin_slot_unit"]["y0"], maxlen=0.160, seed=5, cell=0.12, active=1.0, stain=1.6),
|
|
351
|
+
dict(face="front", plane=YF, s0=it["return_button"]["x0"], s1=it["return_button"]["x1"], z=it["return_button"]["y0"], maxlen=0.160, seed=6, cell=0.11, active=1.0, stain=1.6),
|
|
352
|
+
dict(face="front", plane=YF, s0=it["coin_return"]["x0"], s1=it["coin_return"]["x1"], z=it["coin_return"]["y0"], maxlen=0.160, seed=7, cell=0.11, active=1.0, stain=1.6),
|
|
353
|
+
dict(face="front", plane=YF, s0=it["coin_slot_unit"]["x0"] + 0.01, s1=it["coin_slot_unit"]["x1"] - 0.01, z=it["coin_slot_unit"]["y0"], maxlen=0.121, seed=13, cell=0.035, active=0.6, stain=0.8, wcap=0.3),
|
|
354
|
+
dict(face="front", plane=YF, s0=it["return_button"]["x0"] + 0.01, s1=it["return_button"]["x1"] - 0.01, z=it["return_button"]["y0"], maxlen=0.108, seed=14, cell=0.03, active=0.6, stain=0.8, wcap=0.3),
|
|
355
|
+
dict(face="front", plane=YF, s0=it["coin_return"]["x0"] + 0.005, s1=it["coin_return"]["x1"] - 0.005, z=it["coin_return"]["y0"], maxlen=0.135, seed=15, cell=0.033, active=0.65, stain=0.8, wcap=0.3),
|
|
356
|
+
# pickup flap: 3-6 drips from under the lower frame edge
|
|
357
|
+
dict(face="front", plane=YF, s0=FL["x0"] - 0.01, s1=FL["x1"] + 0.01, z=FL["y0"] - 0.012, maxlen=0.160, seed=8, cell=0.09, active=0.8, stain=1.2),
|
|
358
|
+
# small vent: 1-3, 2-5 cm
|
|
359
|
+
dict(face="front", plane=YF, s0=FV["x0"], s1=FV["x1"], z=FV["y0"] - 0.001, maxlen=0.088, seed=9, cell=0.08, active=1.0, stain=0.7),
|
|
360
|
+
# rusting star flakes bleed a little
|
|
361
|
+
dict(face="front", plane=YF, s0=-0.16, s1=-0.08, z=0.57, maxlen=0.123, seed=10, cell=0.08, active=1.0, stain=0.5),
|
|
362
|
+
dict(face="front", plane=YF, s0=0.37, s1=0.41, z=0.485, maxlen=0.105, seed=11, cell=0.04, active=1.0, stain=0.4, wcap=0.3),
|
|
363
|
+
]
|
|
364
|
+
|
|
365
|
+
def wash_front(nt, sep): # faint rusty wash under the button panel and the info panel (fades over 15 cm)
|
|
366
|
+
z = sep.outputs["Z"]
|
|
367
|
+
a = M(nt, "MULTIPLY", map_range(nt, L.rect_dist(nt, sep, 0.12, 0.37, 0.55, 0.72), -0.004, 0.004),
|
|
368
|
+
map_range(nt, z, 0.55, 0.72))
|
|
369
|
+
b = M(nt, "MULTIPLY", map_range(nt, L.rect_dist(nt, sep, -0.31, 0.04, 0.53, 0.66), -0.004, 0.004), map_range(nt, z, 0.53, 0.66))
|
|
370
|
+
return M(nt, "MULTIPLY", M(nt, "MAXIMUM", a, b), L.face_gate(nt, sep, "front", YF, 0.004))
|
|
371
|
+
|
|
372
|
+
mats["door"] = paint("paint_door", "#A3AEA5", edge_tint=("#7E9FA0", 0.07, 0.21), side_hex="#829F9B", metal_thr=1.25, small=(0.022, 0.14), medium=(0.004, 0.05), fleck=0.14,
|
|
373
|
+
prob_mod=door_prob, near_extra=door_near, spots=fspots, crest_wear=1.3, crest_deg=3.0,
|
|
374
|
+
edge_wear=0.9, wear_r=0.006, wear_gate=(24.0, 0.42), wear_mod=door_wear_mod, drips=fdrips,
|
|
375
|
+
wash=[(wash_front, 0.35)], grime=(Z0, 0.10), grime_k=1.7, lighter_hex="#93B6B9", mottle=0.08)
|
|
376
|
+
|
|
377
|
+
# ------------------------------------------------ body shell (sides + back)
|
|
378
|
+
def body_prob(nt, sep):
|
|
379
|
+
z = sep.outputs["Z"]
|
|
380
|
+
p = zone_curve(nt, z, [(Z0, 0.7), (0.1, 1.0), (0.33, 0.9), (0.95, 0.8), (1.70, 0.7)])
|
|
381
|
+
return p
|
|
382
|
+
|
|
383
|
+
def body_near(nt, sep):
|
|
384
|
+
# chips gather along the door seam and the back vertical edge on the sides, along the side edges on the back
|
|
385
|
+
seam = map_range(nt, sep.outputs["Y"], YBODY + 0.09, YBODY + 0.01)
|
|
386
|
+
side = map_range(nt, M(nt, "ABSOLUTE", sep.outputs["X"]), X1 - 0.004, X1 - 0.001)
|
|
387
|
+
back_edge = map_range(nt, sep.outputs["Y"], YB - 0.09, YB - 0.025)
|
|
388
|
+
e = M(nt, "MULTIPLY", M(nt, "MAXIMUM", seam, M(nt, "MULTIPLY", back_edge, 0.8)), side)
|
|
389
|
+
back = map_range(nt, sep.outputs["Y"], YB - 0.004, YB - 0.001)
|
|
390
|
+
bx = map_range(nt, M(nt, "ABSOLUTE", sep.outputs["X"]), X1 - 0.11, X1 - 0.03)
|
|
391
|
+
bt = map_range(nt, sep.outputs["Z"], Z1 - 0.2, Z1 - 0.1)
|
|
392
|
+
return M(nt, "MAXIMUM", e, M(nt, "MULTIPLY", M(nt, "MAXIMUM", bx, bt), M(nt, "MULTIPLY", back, 0.8)))
|
|
393
|
+
|
|
394
|
+
bspots = [
|
|
395
|
+
# back (seen from behind: image left = +X): 3-5 large star flakes in the middle / top + medium ones
|
|
396
|
+
dict(face="back", plane=YB, s=0.146, z=1.36, w=0.08, h=0.11, seed=21, arms=5),
|
|
397
|
+
dict(face="back", plane=YB, s=-0.071, z=0.915, w=0.09, h=0.12, seed=22, arms=6),
|
|
398
|
+
dict(face="back", plane=YB, s=-0.205, z=1.665, w=0.065, h=0.07, seed=23),
|
|
399
|
+
dict(face="back", plane=YB, s=0.335, z=0.57, w=0.05, h=0.095, seed=24),
|
|
400
|
+
dict(face="back", plane=YB, s=-0.335, z=1.22, w=0.035, h=0.05, seed=25),
|
|
401
|
+
dict(face="back", plane=YB, s=0.30, z=1.03, w=0.022, h=0.03, seed=26),
|
|
402
|
+
dict(face="back", plane=YB, s=-0.20, z=0.45, w=0.025, h=0.028, seed=27),
|
|
403
|
+
dict(face="back", plane=YB, s=0.05, z=1.52, w=0.02, h=0.025, seed=28),
|
|
404
|
+
# left side (-X): image right = front
|
|
405
|
+
dict(face="left", plane=X0, s=0.245, z=1.43, w=0.045, h=0.075, seed=31, arms=5),
|
|
406
|
+
dict(face="left", plane=X0, s=-0.17, z=1.03, w=0.04, h=0.07, seed=32),
|
|
407
|
+
dict(face="left", plane=X0, s=-0.165, z=1.42, w=0.03, h=0.05, seed=33),
|
|
408
|
+
dict(face="left", plane=X0, s=0.165, z=0.47, w=0.035, h=0.05, seed=34),
|
|
409
|
+
dict(face="left", plane=X0, s=-0.17, z=0.24, w=0.03, h=0.045, seed=35),
|
|
410
|
+
# right side (+X)
|
|
411
|
+
dict(face="right", plane=X1, s=-0.185, z=1.32, w=0.04, h=0.075, seed=41, arms=5),
|
|
412
|
+
dict(face="right", plane=X1, s=0.20, z=0.855, w=0.05, h=0.08, seed=42, arms=6),
|
|
413
|
+
dict(face="right", plane=X1, s=0.25, z=0.23, w=0.035, h=0.05, seed=43),
|
|
414
|
+
dict(face="right", plane=X1, s=0.235, z=1.64, w=0.03, h=0.04, seed=44),
|
|
415
|
+
dict(face="right", plane=X1, s=-0.19, z=0.61, w=0.03, h=0.05, seed=45),
|
|
416
|
+
]
|
|
417
|
+
for sp in bspots:
|
|
418
|
+
if sp["z"] < 1.3:
|
|
419
|
+
sp["z"] += LIFT
|
|
420
|
+
bdrips = [
|
|
421
|
+
# back: from under the top outline groove (5-10 total with the vents), 3-10 cm
|
|
422
|
+
dict(face="back", plane=YB, s0=-po_hw + 0.02, s1=po_hw - 0.02, z=po_z1 - 0.004, maxlen=0.160, seed=21, cell=0.1, active=0.6, stain=0.8),
|
|
423
|
+
dict(face="back", plane=YB, s0=-po_hw + 0.05, s1=po_hw - 0.03, z=po_z1 - 0.004, maxlen=0.135, seed=51, cell=0.065, active=0.45, stain=0.6, size=0.8),
|
|
424
|
+
# rusting large flakes on the back bleed
|
|
425
|
+
dict(face="back", plane=YB, s0=0.12, s1=0.17, z=1.33, maxlen=0.121, seed=26, cell=0.05, active=1.0, stain=0.5, wcap=0.3),
|
|
426
|
+
dict(face="back", plane=YB, s0=-0.1, s1=-0.04, z=0.91, maxlen=0.135, seed=27, cell=0.06, active=1.0, stain=0.5, wcap=0.3),
|
|
427
|
+
# side outline grooves: occasional runs along the back panel sides
|
|
428
|
+
dict(face="back", plane=YB, s0=-po_hw - 0.01, s1=-po_hw + 0.02, z=1.25, maxlen=0.135, seed=28, cell=0.03, active=1.0, stain=0.3, wcap=0.3),
|
|
429
|
+
dict(face="back", plane=YB, s0=po_hw - 0.02, s1=po_hw + 0.01, z=0.8, maxlen=0.121, seed=29, cell=0.03, active=1.0, stain=0.3, wcap=0.3),
|
|
430
|
+
# sides: 1-3 short runs from under the roof rounding and at the seam / star flakes
|
|
431
|
+
dict(face="left", plane=X0, s0=0.23, s1=0.27, z=1.40, maxlen=0.108, seed=33, cell=0.04, active=1.0, stain=0.4, wcap=0.3),
|
|
432
|
+
dict(face="right", plane=X1, s0=0.18, s1=0.23, z=0.86, maxlen=0.121, seed=34, cell=0.05, active=1.0, stain=0.4, wcap=0.3),
|
|
433
|
+
dict(face="left", plane=X0, s0=YBODY + 0.01, s1=YBODY + 0.05, z=0.72, maxlen=0.095, seed=35, cell=0.04, active=1.0, stain=0.4, wcap=0.3),
|
|
434
|
+
dict(face="right", plane=X1, s0=YBODY + 0.01, s1=YBODY + 0.05, z=1.12, maxlen=0.081, seed=36, cell=0.04, active=1.0, stain=0.4, wcap=0.3),
|
|
435
|
+
]
|
|
436
|
+
for face, plane, sd in (("left", X0, 61), ("right", X1, 62)):
|
|
437
|
+
# along the door seam / front edge strip of the body: short runs from chips at random heights
|
|
438
|
+
for j, zz in enumerate((1.62, 1.18, 0.9, 0.42)):
|
|
439
|
+
bdrips.append(dict(face=face, plane=plane, s0=YBODY + 0.004, s1=YBODY + 0.05, z=zz + 0.03 * ((sd + j) % 3), maxlen=0.081 + 0.02 * (j % 2),
|
|
440
|
+
seed=sd * 10 + j, cell=0.045, active=0.7, stain=0.4, wcap=0.3))
|
|
441
|
+
bdrips.append(dict(face=face, plane=plane, s0=YB - 0.06, s1=YB - 0.005, z=1.5 - 0.4 * (sd - 61), maxlen=0.095, seed=sd * 10 + 7,
|
|
442
|
+
cell=0.055, active=0.9, stain=0.4, wcap=0.3))
|
|
443
|
+
for i, vx in enumerate(G["VENT_X"]):
|
|
444
|
+
bdrips.append(dict(face="back", plane=YB, s0=vx - v_hw, s1=vx + v_hw, z=v_z0 - 0.002, maxlen=0.160, seed=40 + i, cell=0.033,
|
|
445
|
+
active=0.8, stain=1.1))
|
|
446
|
+
|
|
447
|
+
mats["body"] = paint("paint_body", "#6B8E8E", side_hex="#3E6A72", metal_thr=1.25, small=(0.009, 0.18), medium=(0.002, 0.07), fleck=0.12,
|
|
448
|
+
prob_mod=body_prob, near_extra=body_near, spots=bspots, crest_wear=1.3, crest_deg=3.0,
|
|
449
|
+
edge_wear=0.8, wear_r=0.006, wear_gate=(24.0, 0.42), drips=bdrips, grime=(Z0, 0.10), grime_k=1.7,
|
|
450
|
+
lighter_hex="#779A9A", streaks=0.08)
|
|
451
|
+
# ------------------------------------------------ raised frames, louvres
|
|
452
|
+
mats["frame"] = paint("paint_frame", "#AABEB9", small=(0.008, 0.25), medium=(0.0, 0.03), fleck=0.2, edge_wear=1.6, crest_wear=1.5, crest_deg=18.0,
|
|
453
|
+
wear_r=0.005, wear_gate=(26.0, 0.6), crevice=0.3, dirt=0.06, streaks=0.03)
|
|
454
|
+
mats["flap_frame"] = paint("paint_flap_frame", "#A7B8B2", small=(0.006, 0.15), medium=(0.0, 0.0), fleck=0.2, crest_wear=1.5, crest_deg=18.0,
|
|
455
|
+
edge_wear=1.6, wear_r=0.004, wear_gate=(26.0, 0.6), crevice=0.4, dirt=0.1, streaks=0.03)
|
|
456
|
+
mats["louvre"] = paint("paint_louvre", "#A3C2C2", small=(0.004, 0.08), medium=(0.0, 0.0), fleck=0.2, edge_wear=1.0,
|
|
457
|
+
wear_r=0.003, wear_gate=(30.0, 0.4), crevice=0.6, dirt=0.05, streaks=0.03)
|
|
458
|
+
# ------------------------------------------------ display
|
|
459
|
+
mats["glow"] = glow_back("glow_back", "#D6F5FF", 1.55) # spec #DDF6FF x2 clips to pure white in this studio
|
|
460
|
+
mats["glow_wall"] = glow_wall("glow_wall", G["YF"])
|
|
461
|
+
mats["rail"] = plastic("rail", "#BFDDE6", rough=0.4, glow=0.08, coat=0.2, k=0.8)
|
|
462
|
+
mats["rail_slot"] = plastic("rail_slot", "#6A7D86", rough=0.6, glow=0.0, coat=0.0)
|
|
463
|
+
# bottle liquid colours sampled from the concept (spec palette is lighter/more saturated than the painted bottles);
|
|
464
|
+
# albedo scaled down: the bottles are lit by the key light AND the light box behind them
|
|
465
|
+
upper = ["#DCAE9D", "#ACC59D", "#B3CDA9", "#BCC190", "#BBC390", "#ABB98F"]
|
|
466
|
+
lower = ["#DBAB9D", "#D5BD9C", "#B8C9A0", "#BDC694", "#B6C79B", "#B6BD92"]
|
|
467
|
+
mats["bottle"] = [plastic(f"bottle_{i}", c, rough=0.4, glow=0.05, coat=0.35, k=0.78) for i, c in enumerate(lower + upper)]
|
|
468
|
+
mats["bottle_clear"] = clear_plastic("bottle_clear")
|
|
469
|
+
mats["cap"] = plastic("cap", "#C9DCE3", rough=0.35, glow=0.1, coat=0.3)
|
|
470
|
+
# ------------------------------------------------ metal parts
|
|
471
|
+
mats["btn_dark"] = worn_metal("btn_dark", "#3A3D3F", metallic=0.45, rough=0.5, wear=1.9, wear_hex="#9E9C94", rust=0.5)
|
|
472
|
+
mats["coin_unit"] = worn_metal("coin_unit", "#2E3032", metallic=0.45, rough=0.5, wear=1.9, wear_hex="#9E9C94", rust=0.5)
|
|
473
|
+
mats["bronze"] = worn_metal("bronze", "#8C7A5C", metallic=0.75, rough=0.42, wear_hex="#CFC3A3", wear=1.8, rust=0.4)
|
|
474
|
+
mats["btn_window"] = worn_metal("btn_window", "#6E7474", metallic=0.1, rough=0.3, wear=0.0, spec_var=0.08)
|
|
475
|
+
mats["btn_push"] = worn_metal("btn_push", "#5B4C46", metallic=0.3, rough=0.45, wear_hex="#8E7E74", wear=0.9, rust=0.3)
|
|
476
|
+
mats["cup_dark"] = worn_metal("cup_dark", "#5A4A32", metallic=0.7, rough=0.5, wear=0.0)
|
|
477
|
+
mats["chrome"] = worn_metal("chrome", "#B5B4AC", metallic=0.9, rough=0.3, wear=0.0)
|
|
478
|
+
mats["slot_black"] = L.flat_mat("slot_black", "#151617", 0.8)
|
|
479
|
+
mats["vent_dark"] = L.flat_mat("vent_dark", "#4E6A6E", 0.85)
|
|
480
|
+
mats["flap_inner"] = worn_metal("flap_inner", pal.get("inner", FL["inner_color"]), metallic=0.2, rough=0.7, wear=0.0)
|
|
481
|
+
mats["flap"] = worn_metal("flap", "#67645D", metallic=0.2, rough=0.4, wear=0.6, wear_hex="#9A9890", spec_var=0.1)
|
|
482
|
+
mats["flap_floor"] = worn_metal("flap_floor", "#626462", metallic=0.3, rough=0.55, wear=0.8)
|
|
483
|
+
mats["vent_metal"] = worn_metal("vent_metal", "#8B8F8E", metallic=0.5, rough=0.55, wear_hex="#BDBDB5", wear=1.0, rust=0.35)
|
|
484
|
+
mats["screw"] = worn_metal("screw", "#8B8F8E", metallic=0.6, rough=0.45, wear=0.6, rust=0.5)
|
|
485
|
+
mats["feet"] = worn_metal("feet", S["feet"]["color"], metallic=0.4, rough=0.6, wear_hex="#B4B6B2", wear=1.0, rust=0.35,
|
|
486
|
+
grime=(0.0, 0.035))
|
|
487
|
+
return mats
|