Give the foliage two green tones and fix the textured_solid import bug
This commit is contained in:
1 parent
abe5c3f933
commit
0a9c78cb30
9 files changed
+25
-9
No files matched your search
@@ -184,6 +184,11 @@ licence-free zone only.
|
|||||||
`trash_bin` are ship-ready.)
|
`trash_bin` are ship-ready.)
|
||||||
- [ ] Foliage: replace the flat-shaded `_shrub()`/`_tree()` clumps with `vegetation-artist`-style
|
- [ ] Foliage: replace the flat-shaded `_shrub()`/`_tree()` clumps with `vegetation-artist`-style
|
||||||
carded clusters; measure triangles and keep the 60k `LIBRARY_TRIANGLE_BUDGET`.
|
carded clusters; measure triangles and keep the 60k `LIBRARY_TRIANGLE_BUDGET`.
|
||||||
|
(Partial 2026-11-04: `_shrub()` clumps and the palm fronds now alternate two green tones
|
||||||
|
(`foliage`/`foliage_dark`, `palm_leaf`/`palm_leaf_dark`) so the crown is no longer one flat
|
||||||
|
colour, and a `textured_solid` bug that broke `planter_box`/`round_planter` imports was
|
||||||
|
fixed. The two-tone read is subtle at gallery distance; the full carded-cluster pass remains
|
||||||
|
the owner-gated P1.)
|
||||||
- [ ] Materials and emissives: `lookdev` pass on bulbs, signs, lanterns, the marquee and the
|
- [ ] Materials and emissives: `lookdev` pass on bulbs, signs, lanterns, the marquee and the
|
||||||
sedan at day and late; confirm the flashlight stays a tight spot with no beam geometry.
|
sedan at day and late; confirm the flashlight stays a tight spot with no beam geometry.
|
||||||
- [ ] Collision: verify every prop collider and navigation obstacle matches its silhouette and
|
- [ ] Collision: verify every prop collider and navigation obstacle matches its silhouette and
|
||||||
|
|||||||
@@ -773,7 +773,8 @@
|
|||||||
"category": "props",
|
"category": "props",
|
||||||
"materials": [
|
"materials": [
|
||||||
"palm_bark",
|
"palm_bark",
|
||||||
"palm_leaf"
|
"palm_leaf",
|
||||||
|
"palm_leaf_dark"
|
||||||
],
|
],
|
||||||
"path": "assets/models/blender/props/palm_tree.glb",
|
"path": "assets/models/blender/props/palm_tree.glb",
|
||||||
"triangles": 400,
|
"triangles": 400,
|
||||||
@@ -819,7 +820,8 @@
|
|||||||
"materials": [
|
"materials": [
|
||||||
"stone_pot",
|
"stone_pot",
|
||||||
"soil",
|
"soil",
|
||||||
"foliage"
|
"foliage",
|
||||||
|
"foliage_dark"
|
||||||
],
|
],
|
||||||
"path": "assets/models/blender/props/planter_box.glb",
|
"path": "assets/models/blender/props/planter_box.glb",
|
||||||
"replaces": "generated/planter_box.glb",
|
"replaces": "generated/planter_box.glb",
|
||||||
@@ -892,7 +894,8 @@
|
|||||||
"category": "props",
|
"category": "props",
|
||||||
"materials": [
|
"materials": [
|
||||||
"stone_pot",
|
"stone_pot",
|
||||||
"foliage"
|
"foliage",
|
||||||
|
"foliage_dark"
|
||||||
],
|
],
|
||||||
"path": "assets/models/blender/props/round_planter.glb",
|
"path": "assets/models/blender/props/round_planter.glb",
|
||||||
"triangles": 1240,
|
"triangles": 1240,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 54 KiB |
+14
-6
@@ -198,6 +198,7 @@ PALETTE = {
|
|||||||
"foliage": ((54, 104, 46), 0.85, 0.0, 0.0),
|
"foliage": ((54, 104, 46), 0.85, 0.0, 0.0),
|
||||||
"foliage_dark": ((36, 78, 36), 0.85, 0.0, 0.0),
|
"foliage_dark": ((36, 78, 36), 0.85, 0.0, 0.0),
|
||||||
"palm_leaf": ((70, 112, 50), 0.8, 0.0, 0.0),
|
"palm_leaf": ((70, 112, 50), 0.8, 0.0, 0.0),
|
||||||
|
"palm_leaf_dark": ((52, 88, 40), 0.8, 0.0, 0.0),
|
||||||
"bark": ((92, 70, 52), 0.95, 0.0, 0.0),
|
"bark": ((92, 70, 52), 0.95, 0.0, 0.0),
|
||||||
"palm_bark": ((128, 104, 78), 0.95, 0.0, 0.0),
|
"palm_bark": ((128, 104, 78), 0.95, 0.0, 0.0),
|
||||||
"glass": ((90, 120, 140), 0.08, 0.2, 0.0),
|
"glass": ((90, 120, 140), 0.08, 0.2, 0.0),
|
||||||
@@ -1223,14 +1224,17 @@ def build_gear(name):
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
def _shrub(name, center, radii, mat, lumps=7, seed=1, lump=0.42):
|
def _shrub(name, center, radii, mat, lumps=7, seed=1, lump=0.42):
|
||||||
"""Dense foliage cluster: many small flat-shaded clumps, not one smooth blob.
|
"""Dense foliage cluster: many small flat-shaded clumps in two greens.
|
||||||
|
|
||||||
Reads as leaves at game distance because the silhouette is broken up and the
|
Alternating light/dark clumps break the single-colour read that made the
|
||||||
facets catch the light, which is what the realism-pass foliage note asks for.
|
old shrub look like a rock; the facets still catch the light at game
|
||||||
|
distance (the realism-pass foliage note).
|
||||||
"""
|
"""
|
||||||
parts = []
|
parts = []
|
||||||
import random
|
import random
|
||||||
rng = random.Random(seed)
|
rng = random.Random(seed)
|
||||||
|
mat_light = material("foliage")
|
||||||
|
mat_dark = material("foliage_dark")
|
||||||
parts.append(sphere(name, 1.0, center, mat, seg=10, rings=7, scale=radii,
|
parts.append(sphere(name, 1.0, center, mat, seg=10, rings=7, scale=radii,
|
||||||
smooth=False))
|
smooth=False))
|
||||||
for i in range(lumps * 2): # inner clumps fill the volume
|
for i in range(lumps * 2): # inner clumps fill the volume
|
||||||
@@ -1240,7 +1244,8 @@ def _shrub(name, center, radii, mat, lumps=7, seed=1, lump=0.42):
|
|||||||
off = (center[0] + math.cos(a) * radii[0] * ring,
|
off = (center[0] + math.cos(a) * radii[0] * ring,
|
||||||
center[1] + math.sin(a) * radii[1] * ring,
|
center[1] + math.sin(a) * radii[1] * ring,
|
||||||
center[2] + rng.uniform(-0.2, 0.55) * radii[2])
|
center[2] + rng.uniform(-0.2, 0.55) * radii[2])
|
||||||
parts.append(sphere(name, 1.0, off, mat, seg=8, rings=6,
|
parts.append(sphere(name, 1.0, off, mat_light if i % 2 == 0 else mat_dark,
|
||||||
|
seg=8, rings=6,
|
||||||
scale=(radii[0] * r, radii[1] * r, radii[2] * r * 0.9),
|
scale=(radii[0] * r, radii[1] * r, radii[2] * r * 0.9),
|
||||||
smooth=False))
|
smooth=False))
|
||||||
for i in range(max(3, lumps // 2)): # outer clumps break the silhouette
|
for i in range(max(3, lumps // 2)): # outer clumps break the silhouette
|
||||||
@@ -1249,7 +1254,8 @@ def _shrub(name, center, radii, mat, lumps=7, seed=1, lump=0.42):
|
|||||||
off = (center[0] + math.cos(a) * radii[0] * rng.uniform(0.85, 1.0),
|
off = (center[0] + math.cos(a) * radii[0] * rng.uniform(0.85, 1.0),
|
||||||
center[1] + math.sin(a) * radii[1] * rng.uniform(0.85, 1.0),
|
center[1] + math.sin(a) * radii[1] * rng.uniform(0.85, 1.0),
|
||||||
center[2] + rng.uniform(-0.05, 0.4) * radii[2])
|
center[2] + rng.uniform(-0.05, 0.4) * radii[2])
|
||||||
parts.append(sphere(name, 1.0, off, mat, seg=8, rings=6,
|
parts.append(sphere(name, 1.0, off, mat_dark if i % 2 == 0 else mat_light,
|
||||||
|
seg=8, rings=6,
|
||||||
scale=(radii[0] * r, radii[1] * r, radii[2] * r * 0.8),
|
scale=(radii[0] * r, radii[1] * r, radii[2] * r * 0.8),
|
||||||
rot=(rng.uniform(0, 1), rng.uniform(0, 1), rng.uniform(0, 3)),
|
rot=(rng.uniform(0, 1), rng.uniform(0, 1), rng.uniform(0, 3)),
|
||||||
smooth=False))
|
smooth=False))
|
||||||
@@ -1392,7 +1398,9 @@ def build_prop(name):
|
|||||||
bm.faces.new((a1, a2, b2, b1))
|
bm.faces.new((a1, a2, b2, b1))
|
||||||
bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=1e-4)
|
bmesh.ops.remove_doubles(bm, verts=bm.verts, dist=1e-4)
|
||||||
frond = _link("Frond", bm)
|
frond = _link("Frond", bm)
|
||||||
_finish(frond, M("palm_leaf"), smooth=True, sharp_angle=80)
|
# Alternate two greens so the crown is not one flat colour.
|
||||||
|
_finish(frond, M("palm_leaf" if i % 2 == 0 else "palm_leaf_dark"),
|
||||||
|
smooth=True, sharp_angle=80)
|
||||||
p.append(frond)
|
p.append(frond)
|
||||||
elif name == "round_planter": # mockup pot with topiary, ~1.0 m
|
elif name == "round_planter": # mockup pot with topiary, ~1.0 m
|
||||||
p.append(lathe("Pot", [(0.0, 0.0), (0.22, 0.0), (0.26, 0.05), (0.33, 0.50),
|
p.append(lathe("Pot", [(0.0, 0.0), (0.22, 0.0), (0.26, 0.05), (0.33, 0.50),
|
||||||
|
|||||||
Reference in new issue
Block a user