Compare commits

..

7 Commits

Author SHA1 Message Date
16850fa764 Steam media: fresh screenshots and showcase for the new visuals
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 00:13:18 +06:00
36e4bb2a10 Round 6 fixes: held tools, headlamp glare, ladder openings, level horizon, roof hulls, rain hits, idle motion, belt packs, meadow variety
- Held tools sit lower and further right; the hammer faces forward and strikes about the camera's right
- Headlamp leaves held items, treats and vending machines alone (rendering layer NoLamp); other lights keep lighting them
- Hay grounded on the floor in world space (it floated)
- Deck fence opens at each ladder, rail colliders split around it; ladders moved to 2 m off the edge middle, clear of the intakes; climbing goes over a rail only if one is in the way
- Crew stand to the soil's up (Planet.Level): flat round the base, the ball's up past it, so the horizon stays level on a small planet
- Convex roof hulls for the crew cabin, garage, pitched roof and windmill tower; cabin box lowered to the eaves
- Rain and acid rain hits differ by surface: soil, grass, wood, metal
- Idle motion: dishes pan, sways sway, sensors turn, eyes blink, windmill turns in the breeze, reels and parked rotors tick over
- Belt: take tools off at the supply wall; hold E at a vending machine for a pack of 3 on the belt, LMB has one
- New meadow pieces: boulders, slab stones, crystals, mushrooms, stump, bulb plants
- -demofix checks for all of the above; loc rows in all 11 tables

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 22:52:05 +06:00
fd20af06ae Round-5 props in the game: beer cans, hand can, cigar, phone, lawn mower, farm machines
Bonchellon's round-5 models (ArtSource/Blender/remaster_v3_tools, 27 Nov) were made as
drop-in replacements: same names, children, pivots and material slots. Swapped in:
SM_BeerCan, SM_BeerCanCrushed, SM_HandCan, SM_HandCigar, SM_Phone, SM_Tool_LawnMower and
the four farm machines (icons only). The seven hand tools keep today's stylized remake,
SM_Tool_Shears is unused and SM_PhoneHand is a hand (none in first person).
Assets rebuilt (BuildAll); -demotreats, -demophone, -demohands run clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:51:57 +06:00
dd0430048b Trailer: HUD takes showed the phone's screen; cut.py renders in parallel
- The trailer, BotCapture and PhoneScreen picked "any" UIDocument; since the phone has
  its own (drawn into its screen in the hand) the first-person takes captured the
  phone's home screen instead of the HUD. They take UIRoot's document now.
- cut.py renders a whole film in GC_CUT_WORKERS processes (20 by default), each a
  stretch of frames as near-lossless x264, joined and encoded once on NVENC with the
  sound. Shake and grain are seeded by frame, so the result does not depend on the
  split. Main trailer 57 -> 13 min.
- polden.py and story.py read the single rolls folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:46:37 +06:00
9f6b749bad Store media shot again on the current build: screenshots, showcase, trailers
The trailer rolls lived in a folder that is gone, so everything was shot again
(-demotrailer, -stills) from today's build: new tools, deck props, console, T logo.
- 14 store screenshots from the -stills takes
- showcase WEBMs and banners rebuilt (Tools/Steam/showcase.py)
- the demo trailer is now an edl for cut.py (Tools/Trailer/edl_demo.py)
- tools find the project from their own location instead of the old path

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 21:46:36 +06:00
d4dff6ea99 Ending: rail camera, stable far planet, green bursts from a US landing
Flights run on rails at even speed along the spline with eased ends and
smooth zoom pushes, no hand-held shake. Grass fur, sector lines and
shadows fade out as the camera climbs, and above 250 m the ground swaps
to an even cube-sphere skin so the relief no longer pops while orbiting.
Per-shot FOV, motion blur, slamming titles and a warp to Earth; the
rocket now lands in Kansas and the green bursts straight out of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 16:38:46 +03:00
a3e4f00282 Stylized tools: hand-painted + PBR remake of all seven hand tools
Nail scissors, garden shears, sickle, scythe, long scythe, two-handed
scythe and hammer remade from scratch in Blender in a grounded
hand-painted style, with a metallic/smoothness mask so metal still
shines. Materials come from ArtSource/materials_style.json; the builder
now supports a mask texture and a faint paint glow. Blender sources,
textures and previews live in ArtSource/Blender/stylized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 16:38:46 +03:00
272 changed files with 13667 additions and 5632 deletions

BIN
ArtSource/Blender/SM_Boulders.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/SM_BulbPlants.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/SM_Crystals.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/SM_DeckTile.blend (Stored with Git LFS)

Binary file not shown.

BIN
ArtSource/Blender/SM_Shrooms.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/SM_SlabStones.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/SM_Stump.blend (Stored with Git LFS) Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,52 @@
"""Every painted tool in ArtSource/Blender/stylized side by side, for review in Blender.
blender -b --factory-startup --python ArtSource/Blender/scripts/gc_style_review.py
Writes ArtSource/Blender/stylized/Style_Tools_Review.blend (opens in Material Preview).
"""
import os
import bpy
from mathutils import Vector
HERE = os.path.dirname(os.path.abspath(__file__))
DIR = os.path.normpath(os.path.join(HERE, "..", "stylized"))
NAMES = ["SM_Tool_NailScissors", "SM_Tool_GardenShears", "SM_Tool_Sickle", "SM_Tool_Hammer",
"SM_Tool_Scythe", "SM_Tool_LongScythe", "SM_Tool_WideScythe"]
bpy.ops.wm.read_factory_settings(use_empty=True)
scene = bpy.context.scene
x = 0.0
for name in NAMES:
path = os.path.join(DIR, name + ".blend")
if not os.path.exists(path):
continue
with bpy.data.libraries.load(path, link=False) as (src, dst):
dst.objects = list(src.objects)
roots = []
for o in dst.objects:
if o is None or o.type not in {"MESH", "EMPTY"}:
continue
scene.collection.objects.link(o)
if o.parent is None:
roots.append(o)
# lay the tool out flat with a gap after the previous one
xs = [(o.matrix_world @ Vector(c)).x for o in dst.objects if o and o.type == "MESH" for c in o.bound_box]
width = (max(xs) - min(xs)) if xs else 0.3
for r in roots:
r.location.x += x - (min(xs) if xs else 0.0)
label = bpy.data.curves.new(name + "_label", "FONT")
label.body = name.replace("SM_Tool_", "")
label.size = 0.08
t = bpy.data.objects.new(name + "_label", label)
t.location = (x, -0.25, -0.4)
scene.collection.objects.link(t)
x += width + 0.35
for area_screen in bpy.data.screens:
for area in area_screen.areas:
if area.type == "VIEW_3D":
for sp in area.spaces:
if sp.type == "VIEW_3D":
sp.shading.type = "MATERIAL"
out = os.path.join(DIR, "Style_Tools_Review.blend")
bpy.ops.wm.save_as_mainfile(filepath=out, check_existing=False)
print("REVIEW", out)

View File

@ -0,0 +1,114 @@
"""GRASS CUTTER - the basic scythe (SM_Tool_Scythe) in the stylized, hand-painted set. Built from gc_style_kit; the other hand tools of the
set are in gc_style_tools.py, which also uses the snath and blade helpers here.
Game frame (round 4, gc_up4_tools.scythe; ViewModel / CrewAvatar hold data depends on it):
one object "Body", no parent, origin at the world origin, identity transform; Blender -Y = Unity forward, blade out on +X;
the snath runs y +0.15 .. -1.27, the blade heel at (0, -1.3, -0.095) tilted 38 degrees, tip at x ~0.82;
nibs (grips) hang along Z at (0.03, -0.04) and (-0.03, -0.66).
Run (absolute paths):
blender -b --factory-startup --python C:/Github/Grass-Cutters/ArtSource/Blender/scripts/gc_style_scythe.py -- [--res 2048] [--samples 128]
[--no-bake (reuse textures/T_Scythe_Painted.png)] [--no-render] [--shots full,mount,...]
Writes ArtSource/Blender/stylized/{SM_Tool_Scythe.blend, fbx/, textures/T_Scythe_Painted.png, previews/SM_Tool_Scythe_*.png}.
"""
import os, sys, math
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import gc_style_kit as K
from mathutils import Vector, Matrix
DEG = math.radians
TILT = 38.0
def tilt_frame(y0, hz):
return Matrix.Translation((0, y0, hz)) @ Matrix.Rotation(DEG(-TILT), 4, "X") @ Matrix.Translation((0, -y0, -hz))
def scythe_outline(y0, L, w0, bow, curl, n=28):
"""Round 4's outline: spine points S and widths W at n + 1 stations, the tip point."""
S, W = [], []
for i in range(n + 1):
u = i / n
S.append(Vector((L * u, y0 - bow * math.sin(u * 2.35) + curl * u ** 3)))
W.append(w0 * (1 - u) ** 0.62 * (0.8 + 0.2 * math.sin(min(1.0, u * 4) * 1.57)) + 0.007)
tip = Vector((S[-1].x + 0.02, S[-1].y + 0.01))
return S, W, tip
def scythe_blade(y0, hz, L, w0, bow, curl, n=28, thick=1.0, name="blade"):
"""The crescent in the round 4 plane: a fat rounded spine, a thick body, a broad ground bevel to a bright edge. Returns (S, W, F)."""
S, W, tip = scythe_outline(y0, L, w0, bow, curl, n)
F = tilt_frame(y0, hz)
E = []
for i in range(n):
t = (S[min(i + 1, n)] - S[max(i - 1, 0)]).normalized()
nrm = Vector((-t.y, t.x))
if nrm.y < 0:
nrm = -nrm
E.append(S[i] + nrm * W[i])
K.blade(name, [(p.x, p.y) for p in S[:n]], [(p.x, p.y) for p in E], F, z0=hz,
rw=lambda u: 0.042 * thick * (1 - 0.35 * u), rh=lambda u: 0.024 * thick * (1.0 - 0.55 * u ** 1.2),
hb=lambda u: (0.0052 * (1 - 0.4 * u) + 0.001) * thick, bev=lambda w, u: min(0.042, 0.36 * w),
tip=(tip.x, tip.y), cuts=(n // 2,))
return S, W, F
def snath(pts, r0, r1, key="wood", cuts=None, sides=8, sq=1.0, n=30):
"""The snath: a chunky chamfered octagon along pts, r0 at the butt to r1 at the blade."""
pth = K.Path(pts)
K.pole("snath", pth, lambda t: r0 + (r1 - r0) * t, key, n=n, cap0=False, cap1=True, cuts=cuts, sides=sides, sq=sq)
return pth
def butt(pth, r0, key_band="brass", key_cap="iron"):
"""A brass band near the butt and a domed dark iron cap."""
K.band("buttband", pth, 0.05, 0.03, r0, 0.0065, key_band)
c0 = pth.at(0.0)
d0 = (pth.at(0.0) - pth.at(0.03)).normalized()
K.lathe("buttcap", [(r0 * 0.96, -0.02), (r0 + 0.0055, -0.016), (r0 + 0.006, -0.004), (r0 + 0.002, 0.004), (r0 * 0.7, 0.013), (r0 * 0.32, 0.0175),
(0.0, 0.019)], key_cap, segs=16, frame=K.frame_z(c0, d0), phase=math.pi / 16)
def nibs_and_clamps(pth, rfun, nibs, z_top=0.12, r=0.036, side_split=-0.3):
for k, (x, y) in enumerate(nibs):
s = pth.nearest_y(y)
ctr = pth.at(s)
K.nib(k, x, y, z_top, r=r, stem_to=ctr.z - 0.015)
K.clamp(k, pth, s, rfun(s), 1 if y > side_split else -1, saddle_xy=(x, y))
def mount(pth, y0, hz, x0=0.007, top_z=-0.0155):
"""The blade mount: a brass collar on the snath end, a dark iron socket with a brass strap and big bolts."""
Ls = pth.len
r = 0.027
K.band("collar", pth, Ls - 0.036, 0.054, r, 0.0095, "brass", ch=0.006)
K.band("collar_lip", pth, Ls - 0.071, 0.012, r, 0.005, "iron", ch=0.003)
yc, zc = y0 - 0.01, (hz + top_z) / 2 - 0.006
sz = top_z - hz + 0.017
K.rbox("socket", (x0, yc, zc), (0.1, 0.098, sz), "iron", bev=0.013, segs=2)
K.rbox("strap", (x0, yc - 0.002, zc), (0.11, 0.036, sz + 0.01), "brass", bev=0.008, segs=2)
K.hexbolt("bolt_top", (x0, yc - 0.002, zc + sz / 2 + 0.005), (0, 0, 1), r=0.017, h=0.012, washer=0.022)
K.hexbolt("bolt_side", (x0 - 0.055, yc - 0.002, zc), (-1, 0, 0), r=0.016, h=0.011, washer=0.021)
SNATH_PTS = [(0.012, 0.15, 0.116), (0.018, 0.07, 0.13), (0.0, -0.08, 0.125), (-0.02, -0.4, 0.13), (-0.012, -0.72, 0.105), (0.01, -1.02, 0.03),
(0.0, -1.27, -0.05)]
def scythe():
r0, r1 = 0.0355, 0.027
pth = snath(SNATH_PTS, r0, r1, cuts=(10, 20))
rfun = lambda s: r0 + (r1 - r0) * s / pth.len
butt(pth, r0)
nibs_and_clamps(pth, rfun, ((0.03, -0.04), (-0.03, -0.66)))
mount(pth, -1.3, -0.095)
scythe_blade(-1.3, -0.095, 0.8, 0.19, 0.13, 0.17)
return dict(res=2048, ps=1.0, full={"full": (38, 150), "full_front": (34, -38)},
views=[("mount", (0.03, -1.28, -0.05), 0.16, 30, 215), ("clamps", (0.0, -0.06, 0.03), 0.17, 16, -55),
("blade_edge", (0.55, -1.25, -0.13), 0.3, 45, 165)])
BUILDERS = {"SM_Tool_Scythe": scythe}
if __name__ == "__main__":
K.run(BUILDERS)

View File

@ -0,0 +1,398 @@
"""GRASS CUTTER - the hand tools in the stylized, hand-painted set (gc_style_kit; the scythe is gc_style_scythe.py).
Each tool keeps round 4's game frame (gc_up4_tools.py: object names, origins, the scissor pivot at (0, -0.145, 0), axes, length, grips),
so ViewModel / CrewAvatar hold data stays valid; check with gc_up5_check.verify against Assets/Art/Models.
SM_Tool_Sickle Body turned octagonal handle with linen wraps, brass ferrule, a thick crescent
SM_Tool_LongScythe Body long snath with linen bands, a wooden grain cradle with lashed fingers
SM_Tool_WideScythe Body a squared ash beam strapped in iron, D-handles, a broad riveted blade on braces
SM_Tool_GardenShears Body, BladeA, BladeB chunky shear blades, wooden handles with linen grips; also exported as SM_Tool_Shears
SM_Tool_NailScissors Body, BladeA, BladeB curved blades, brass bows, a finger rest
SM_Tool_Hammer Body octagonal handle with a linen grip, dark iron head, a bright face, a split claw
Run (absolute paths):
blender -b --factory-startup --python C:/Github/Grass-Cutters/ArtSource/Blender/scripts/gc_style_tools.py -- [names] [--res N] [--samples N]
[--no-bake] [--no-render] [--shots full,...]
"""
import os, sys, math
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
import gc_style_kit as K
import gc_style_scythe as SC
from mathutils import Vector, Matrix
DEG = math.radians
PI = math.pi
TAU = 2 * math.pi
PV_Y = -0.145
XU = Vector((1, 0, 0))
# ======================================================================= helpers
def crect(c, U, V, a0, a1, b0, b1, ch):
"""A chamfered rectangle a0..a1 along U, b0..b1 along V round c (8 points)."""
ch = max(0.0, min(ch, (a1 - a0) * 0.4, (b1 - b0) * 0.4))
pts = [(a0 + ch, b0), (a1 - ch, b0), (a1, b0 + ch), (a1, b1 - ch), (a1 - ch, b1), (a0 + ch, b1), (a0, b1 - ch), (a0, b0 + ch)]
return [c + U * a + V * b for a, b in pts]
def pole2(name, pth, rxz, key, n=24, s0=0.0, s1=None, sides=8, ch=0.1, cap0=False, cap1=True, cuts=()):
"""An octagonal pole whose section is rxz(t) = (half width across, half height) at t 0..1 over s0..s1."""
s1 = pth.len if s1 is None else s1
rings = []
for i in range(n + 1):
t = i / n
s = s0 + (s1 - s0) * t
rx, rz = rxz(t)
c = pth.at(s)
T_, X, U = pth.frame(s)
rings.append([c + X * p.x + U * p.y for p in K.oct_section(rz, ch, sides, rx / rz)])
return K.loft(name, rings, key, cap0=cap0, cap1=cap1, cuts=cuts)
def disc(name, c, r, z0, z1, key, segs=16, ch=0.003):
"""A disc about Z at c with chamfered rims, z0 -> z1 (either way up)."""
lo, hi = min(z0, z1), max(z0, z1)
ch = min(ch, (hi - lo) * 0.45)
return K.lathe(name, [(0.0, lo), (r - ch, lo), (r, lo + ch), (r, hi - ch), (r - ch, hi), (0.0, hi)], key, segs=segs,
frame=Matrix.Translation((c[0], c[1], 0)))
def resample(pts, n):
P = K.Path(pts)
return [P.at(P.len * i / n) for i in range(n + 1)]
# ======================================================================= sickle
def sickle():
z = 0.26
hp = [(0, 0.03, -0.3), (0, 0.012, -0.14), (0, 0, 0.02), (0, -0.04, 0.17), (0, -0.16, z - 0.005), (0, -0.335, z)]
pth = K.Path(hp, up=XU)
def rf(t): # a turned profile: a swell under the palm, a waist, a taper into the ferrule (chunkier than round 4)
return 0.043 + 0.01 * math.exp(-((t - 0.2) / 0.13) ** 2) + 0.004 * math.exp(-((t - 0.47) / 0.08) ** 2) - 0.005 * max(0.0, (t - 0.62) / 0.38)
K.pole("handle", pth, rf, "wood", n=28, cap0=True, cap1=False, cuts=(14,))
for t, w in ((0.3, 0.05), (0.45, 0.05)): # two padded linen wraps where the fingers close
K.band(f"wrap{t}", pth, pth.len * t, w, rf(t), 0.006, "wrap", ch=0.008)
# a chunky wooden pommel with a brass ring, a linen cord loop through it
fr = Matrix.Translation((0, 0.031, 0))
K.lathe("pommel", [(0.0, -0.352), (0.03, -0.352), (0.048, -0.343), (0.054, -0.326), (0.05, -0.305), (0.043, -0.29)], "knob", segs=12, frame=fr)
K.lathe("pring", [(0.0445, -0.296), (0.0485, -0.292), (0.0485, -0.279), (0.0445, -0.275)], "brass", segs=12, frame=fr)
K.tube("loop", [(0, 0.03, -0.345), (0.045, 0.08, -0.385), (0.0, 0.14, -0.41), (-0.045, 0.08, -0.385), (0, 0.03, -0.345)], lambda t: 0.011,
"wrap", segs=8, cap0=False, cap1=False)
# brass ferrule and a dark iron collar on the tang, rivets either side
FY = Matrix.Translation((0, 0, z)) @ Matrix.Rotation(DEG(90), 4, "X") # local +Z -> world -Y
K.lathe("ferrule", [(0.0385, 0.288), (0.0435, 0.294), (0.0435, 0.356), (0.0385, 0.364)], "brass", segs=12, frame=FY)
K.lathe("collar", [(0.031, 0.358), (0.0355, 0.364), (0.0355, 0.378), (0.031, 0.386), (0.0, 0.386)], "iron", segs=12, frame=FY)
for sx in (-1, 1):
K.dome(f"rivet{sx}", (sx * 0.043, -0.325, z), (sx, 0, 0), 0.009, 0.006, "iron")
# the crescent: round 4's outline, spine outside, edge inside, a narrow neck from the collar
c = Vector((0.335, -0.79, 0))
S, E = [], []
n = 26
for i in range(n + 1):
ad = 150 + (378 - 150) * i / n
u = (ad - 142) / 236
a = DEG(ad)
r_o = 0.455 - 0.05 * u + 0.012 * math.sin(u * math.pi)
w = 0.128 * (1 - u) ** 0.62 * (0.86 + 0.14 * math.sin(min(1.0, u * 2.2) * 1.57)) + 0.005
S.append(Vector((c.x + r_o * math.cos(a), c.y + r_o * math.sin(a))))
E.append(Vector((c.x + (r_o - w) * math.cos(a), c.y + (r_o - w) * math.sin(a))))
s0, e0 = Vector((-0.017, -0.37)), Vector((0.017, -0.37))
neck = [(s0.lerp(S[0], k / 4), e0.lerp(E[0], (k / 4) ** 1.4)) for k in range(4)]
S = [a_ for a_, b_ in neck] + S
E = [b_ for a_, b_ in neck] + E
j = 4 + next(i for i in range(n + 1) if 150 + 228 * i / n >= 178)
L = [0.0]
for q in range(1, j + 1):
L.append(L[-1] + (S[q] - S[q - 1]).length)
for q in range(1, j):
E[q] = e0.lerp(E[j], (L[q] / L[j]) ** 1.15)
tip = S[-1] + (S[-1] - S[-2]).normalized() * 0.012
K.blade("blade", [tuple(p) for p in S[:-1]], [tuple(p) for p in E[:-1]], Matrix.Identity(4), z0=z,
rw=lambda u: 0.03 * (1 - 0.4 * u), rh=lambda u: 0.018 * (1 - 0.5 * u), hb=lambda u: 0.0045 * (1 - 0.35 * u) + 0.0008,
bev=lambda w, u: min(0.03, 0.36 * w), tip=tuple(tip), cuts=(16,), under=0.8)
return dict(res=2048, ps=0.75, full={"full": (60, -12), "full_side": (18, -70)},
views=[("neck", (0.0, -0.36, 0.25), 0.1, 35, -40), ("blade", (0.25, -0.95, 0.26), 0.3, 62, 10)])
# ======================================================================= long scythe
def long_scythe():
pts = [(0.02, 0.15, 0.108), (0.02, 0.07, 0.125), (0.0, -0.2, 0.12), (-0.022, -0.6, 0.12), (-0.012, -1.02, 0.09), (0.008, -1.34, 0.01), (0.0, -1.5, -0.055)]
r0, r1 = 0.036, 0.028
pth = SC.snath(pts, r0, r1, cuts=(8, 16), n=24)
rfun = lambda s: r0 + (r1 - r0) * s / pth.len
SC.butt(pth, r0)
for t0 in (0.335, 0.375, 0.725, 0.765): # linen bands on the snath
s = pth.len * t0
K.band(f"stripe{t0}", pth, s, 0.018, rfun(s), 0.0035, "wrap", ch=0.003)
SC.nibs_and_clamps(pth, rfun, ((0.03, -0.04), (-0.03, -0.64)), z_top=0.125)
y0, hz = -1.52, -0.098
SC.mount(pth, y0, hz)
SC.scythe_blade(y0, hz, 1.1, 0.17, 0.15, 0.27, n=26)
# the grain cradle: a post on the snath, three bent wooden fingers over the blade, an iron stay tying them to its back
S, W, tip = SC.scythe_outline(y0, 1.1, 0.17, 0.15, 0.27, n=20)
S[-1] = tip
F = SC.tilt_frame(y0, hz)
sp = pth.nearest_y(-1.22)
base = pth.at(sp)
top = Vector((0.05, -1.26, 0.262))
K.pole("cpost", K.Path([base + Vector((0, 0, 0.02)), top]), lambda t: 0.024 - 0.004 * t, "wood", n=6, cuts=())
K.clamp("c", pth, sp, rfun(sp), -1)
fingers = []
ns = len(S) - 1
for k, (lift, frac) in enumerate(((0.3, 0.84), (0.205, 0.92), (0.105, 0.98))):
Fp = []
for i in range(6):
u = i / 5
q = S[int(round(u * (ns - 2) * frac))]
Fp.append(F @ Vector((0.03 + q.x * 0.98, q.y + 0.03, hz + lift + (0.03 - 0.02 * k) * math.sin(u * 1.6))))
Fp = [base.lerp(top, (1.0, 0.68, 0.36)[k])] + Fp[2:]
K.pole(f"finger{k}", K.Path([Fp[0]] + Fp[2:]), lambda t: 0.0165 - 0.008 * t, "wood", n=12, cuts=(), sides=6)
fingers.append(Fp)
stay = [fingers[0][3], fingers[1][3], fingers[2][3], F @ Vector((S[10].x, S[10].y + 0.01, hz + 0.02))]
K.tube("cstay", stay, lambda t: 0.0095, "iron", segs=8)
K.tube("cbow", [top, fingers[0][2], fingers[0][3]], lambda t: 0.0095, "iron", segs=8)
for k in range(3):
c = fingers[k][3]
K.lathe(f"lash{k}", [(0.017 - 0.002 * k, -0.018), (0.0205 - 0.002 * k, -0.012), (0.0205 - 0.002 * k, 0.012), (0.017 - 0.002 * k, 0.018)], "wrap",
segs=10, frame=Matrix.Translation(c))
K.dome("ctop", top, (0.1, 0, 1), 0.026, 0.016, "brass", segs=12)
return dict(res=2048, ps=1.0, full={"full": (36, 150), "full_front": (34, -38)},
views=[("cradle", (0.28, -1.33, 0.08), 0.36, 32, -25), ("mount", (0.03, -1.5, -0.05), 0.17, 30, 215),
("blade_edge", (0.7, -1.45, -0.12), 0.36, 45, 165)])
# ======================================================================= wide scythe
def wide_scythe():
pts = [(0.0, 0.13, 0.136), (0.0, 0.05, 0.145), (0.0, -0.3, 0.15), (0.0, -0.8, 0.135), (0.0, -1.3, 0.07), (0.0, -1.62, -0.02), (0.0, -1.74, -0.06)]
pth = K.Path(pts)
rz = lambda t: 0.055 - 0.012 * t
sq = 0.85
# a squared ash beam, chamfered corners
K.pole("beam", pth, rz, "wood", n=30, cap0=True, cap1=True, cuts=(10, 20), sides=4, ch=0.16, sq=sq)
for k, t0 in enumerate((0.13, 0.48, 0.82)):
s = pth.len * t0
K.band(f"strap{k}", pth, s, 0.034, rz(t0), 0.007, "iron", ch=0.005, sides=4, sq=sq)
c = pth.at(s)
for sx in (-1, 1):
K.hexbolt(f"sb{k}{sx}", c + Vector((sx * (rz(t0) * sq + 0.006), 0, 0)), (sx, 0, 0), r=0.012, h=0.009, washer=0.016)
# a padded linen shoulder sleeve, lashed with brass bands
K.pole("pad", pth, lambda t: 0.07 + 0.006 * math.sin(t * PI), "wrap", n=8, s0=0.0, s1=pth.len * 0.12, sides=8, cap0=True, cap1=True, cuts=())
for k, t0 in enumerate((0.025, 0.095)):
K.band(f"lash{k}", pth, pth.len * t0, 0.012, 0.073, 0.006, "brass", ch=0.003)
# D-handles: an iron stirrup from the beam round a vertical grip
for k, (x, y) in enumerate(((0.03, -0.04), (-0.03, -0.62))):
K.nib(k, x, y, 0.1, r=0.038, stem_to=0.1)
K.tube(f"stirrup{k}", [(x - 0.052, y + 0.05, 0.13), (x - 0.074, y + 0.05, 0.03), (x - 0.074, y + 0.05, -0.1), (x - 0.03, y + 0.02, -0.135), (x, y, -0.135)],
lambda t: 0.011, "iron", segs=8)
# the blade: broad, a thick spine with brass rivets
y0, hz = -1.78, -0.11
S, W, F = SC.scythe_blade(y0, hz, 1.42, 0.3, 0.17, 0.42, n=32, thick=1.25)
for i in (2, 8, 14, 20):
t = (S[i + 1] - S[i - 1]).normalized()
nrm = Vector((-t.y, t.x))
if nrm.y < 0:
nrm = -nrm
p = S[i] + nrm * 0.018
K.dome(f"rivet{i}", F @ Vector((p.x, p.y, hz + 0.028 * (1 - 0.4 * i / 32))), F.to_3x3() @ Vector((0, 0, 1)), 0.012, 0.008, "brass")
# a broad socket with a brass strap, a wooden wedge, two big bolts
K.rbox("socket", (0.0165, -1.75, -0.069), (0.157, 0.14, 0.114), "iron", bev=0.016, segs=2)
K.rbox("sstrap", (0.0165, -1.75, -0.069), (0.167, 0.04, 0.124), "brass", bev=0.009, segs=2)
K.rbox("wedge", (0.104, -1.712, -0.05), (0.024, 0.05, 0.048), "wood", bev=0.007, segs=2)
for x in (-0.03, 0.05):
K.hexbolt(f"sbolt{x}", (x, -1.75 + (0.035 if x < 0 else -0.035), -0.007), (0, 0, 1), r=0.017, h=0.012, washer=0.022)
# braces from the beam to the blade's back, a brass turnbuckle on the second
on = lambda i, dz=0.03: F @ Vector((S[i].x, S[i].y + 0.012, hz + dz))
b1 = pth.at(pth.nearest_y(-1.36))
K.tube("strutA", [b1, on(7)], lambda t: (0.017, 0.013), "iron", segs=8)
r0_, r1_ = b1 + Vector((0, 0.02, 0.05)), on(14)
K.tube("strutB", [r0_, r1_], lambda t: 0.0125, "iron", segs=8)
K.tube("buckle", [r0_.lerp(r1_, 0.42), r0_.lerp(r1_, 0.58)], lambda t: 0.022, "brass", segs=8)
for i, p in ((7, on(7)), (14, on(14))):
K.dome(f"foot{i}", p + F.to_3x3() @ Vector((0, 0, -0.004)), F.to_3x3() @ Vector((0, 0, 1)), 0.02, 0.01, "iron")
return dict(res=2048, ps=1.0, full={"full": (36, 150), "full_front": (34, -38)},
views=[("mount", (0.03, -1.74, -0.07), 0.2, 30, 215), ("braces", (0.38, -1.6, 0.0), 0.45, 42, -12),
("grip", (-0.01, -0.06, 0.0), 0.2, 12, 120)])
# ======================================================================= garden shears (and SM_Tool_Shears)
def blade_stations(sx, py, ty, hw, he, cfn, notch=None, n=14, heel=0.03):
S, E = [], []
for i in range(n + 1):
y = (py + heel) + (ty + 0.004 - (py + heel)) * (i / n) ** 0.92
u = max(0.0, (py - y) / (py - ty))
c = cfn(u)
k = 1.0 - 0.5 * (max(0.0, y - py) / heel) ** 2
h_e = he(u) * k - (notch(u) if notch else 0.0)
S.append((c - sx * hw(u) * k, y))
E.append((c + sx * h_e, y))
tipc = (cfn(1.0) + sx * he(1.0) * 0.4, ty)
return S, E, tipc
def garden_shears():
py, ty = PV_Y, -0.62
z_in = 0.0008
tf = lambda u: 0.016 * (1 - 0.45 * u) + 0.0025
def hw(u):
k = 0.78
base = 0.041 - 0.009 * min(u, k)
return base * math.sqrt(max(0.0, 1 - ((u - k) / (1 - k)) ** 2)) + 0.002 if u > k else base
he = lambda u: 0.011 * (1 - 0.5 * u)
notch = lambda u: 0.013 * math.sin(PI * (u - 0.05) / 0.12) if 0.05 < u < 0.17 else 0.0
cfn = lambda u: 0.0
t0 = tf(0.0)
for nm, sx, sz in (("BladeA", 1, 1), ("BladeB", -1, -1)):
K.group(nm)
S, E, tipc = blade_stations(sx, py, ty, hw, he, cfn, notch if sx > 0 else None, n=16)
K.shear_blade("blade", sx, sz, S, E, z_in, tf, tip=tipc, cuts=(8,))
zc = sz * (z_in + t0 * 0.5)
hz = sz * 0.011
disc("boss", (0, py), 0.036, sz * z_in, sz * (z_in + t0), "iron", ch=0.005)
fr0 = Vector((sx * 0.031, -0.05, hz))
K.tube("tang", [Vector((sx * 0.004, py + 0.012, zc)), Vector((sx * 0.012, -0.095, zc)), Vector((sx * 0.024, -0.066, hz)), fr0],
lambda t: (0.0155 - 0.002 * t, 0.0075 + 0.004 * t), "iron", segs=8)
hp = K.Path([fr0, Vector((sx * 0.038, 0.0, hz)), Vector((sx * 0.044, 0.08, hz)), Vector((sx * 0.046, 0.168, hz))])
K.pole("handle", hp, lambda t: 0.0185 + 0.003 * math.sin(t * PI), "wood", n=14, cap0=False, cap1=False, cuts=())
K.lathe("ferrule", [(0.019, -0.016), (0.0225, -0.012), (0.0235, -0.006), (0.0235, 0.016), (0.0215, 0.022), (0.019, 0.024)], "brass", segs=12,
frame=K.frame_z(fr0, (0, 1, 0)))
for yy in (-0.036,):
K.lathe("fring", [(0.022, -0.003), (0.025, -0.002), (0.025, 0.002), (0.022, 0.003)], "iron", segs=12, frame=K.frame_z((sx * 0.0315, yy, hz), (0, 1, 0)))
# a padded linen grip in three pillows, a chunky wooden end knob
gs0, gs1 = hp.nearest_y(0.05), hp.len
gr = lambda t: 0.023 + 0.0035 * max(0.0, 1 - t / 0.08) + 0.0028 * abs(math.sin(t * PI * 3.0)) ** 0.7 * (1 if t < 0.9 else 0)
K.pole("grip", hp, gr, "wrap", n=24, s0=gs0, s1=gs1, cap0=False, cap1=False, cuts=())
end = hp.at(hp.len)
K.lathe("knob", [(0.0, -0.004), (0.022, -0.004), (0.0275, 0.004), (0.026, 0.014), (0.019, 0.021), (0.0, 0.023)], "knob", segs=12,
frame=K.frame_z(end, (0, 1, 0)))
K.lathe("bump", [(0.0, 0.0), (0.0095, 0.0), (0.0095, 0.008), (0.0065, 0.012), (0.0, 0.012)], "knob", segs=8,
frame=K.frame_z((sx * 0.019, -0.062, hz), (-sx, 0, 0)))
if sx < 0: # a linen cord loop through the end of one handle
e = end + Vector((0, 0.014, 0))
K.tube("lanyard", [e, e + Vector((-0.02, 0.022, 0)), e + Vector((-0.012, 0.056, 0)), e + Vector((0.016, 0.064, 0)), e + Vector((0.026, 0.034, 0)),
e + Vector((0.006, 0.006, 0))], lambda t: (0.0075, 0.0058), "knob", segs=8, cap0=True, cap1=True)
K.group("Body")
zt = z_in + t0
fr = Matrix.Translation((0, py, 0))
K.lathe("head", [(0.0, zt - 0.001), (0.019, zt - 0.001), (0.019, zt + 0.0035), (0.015, zt + 0.0075), (0.0, zt + 0.009)], "brass", segs=14, frame=fr)
K.lathe("nut", [(0.0, -zt + 0.001), (0.0165, -zt + 0.001), (0.0165, -zt - 0.0065), (0.013, -zt - 0.009), (0.0, -zt - 0.009)], "iron", segs=6, frame=fr,
phase=PI / 6)
disc("shaft", (0, py), 0.008, -zt, zt, "iron", segs=8)
return dict(res=2048, ps=0.6, origins={"BladeA": (0, PV_Y, 0), "BladeB": (0, PV_Y, 0)}, also=["SM_Tool_Shears"],
full={"full": (60, -12), "full_under": (-50, -12)},
views=[("pivot", (0.0, -0.145, 0.0), 0.09, 50, -25), ("grips", (0.0, 0.1, 0.0), 0.16, 45, -20)])
# ======================================================================= nail scissors
def nail_scissors():
py, ty = PV_Y, -0.455
z_in = 0.0006
tf = lambda u: 0.0115 * (1 - 0.6 * u) + 0.002
hw = lambda u: 0.0285 * (1 - u) ** 0.85 + 0.0018
he = lambda u: 0.021 * (1 - u) ** 0.95 + 0.0012
cfn = lambda u: -0.02 * u ** 2.2
t0 = tf(0.0)
for nm, sx, sz in (("BladeA", 1, 1), ("BladeB", -1, -1)):
K.group(nm)
S, E, tipc = blade_stations(sx, py, ty, hw, he, cfn, n=14, heel=0.022)
K.shear_blade("blade", sx, sz, S, E, z_in, tf, tip=tipc, cuts=(7,))
zc = sz * (z_in + t0 * 0.5)
disc("boss", (0, py), 0.024, sz * z_in, sz * (z_in + t0), "iron", ch=0.0035)
big = sx < 0
cb = Vector((sx * (0.061 if big else 0.056), 0.064 if big else 0.06, zc))
rx, ry = (0.036, 0.046) if big else (0.031, 0.04)
d = (Vector((0, py, zc)) - cb)
a_in = math.atan2(d.y / ry, d.x / rx)
entry = cb + Vector((rx * math.cos(a_in), ry * math.sin(a_in), 0))
sh = [Vector((0, py + 0.006, zc)), Vector((sx * 0.011, py + 0.05, zc)), Vector((sx * 0.03, -0.045, zc)), entry + Vector((0, -0.012, 0)), entry]
K.tube("shank", sh, lambda t: (0.0115 - 0.0022 * t, 0.0075), "iron", segs=8)
K.tube("collar", [entry + (sh[-2] - entry).normalized() * 0.014, entry + (sh[-2] - entry).normalized() * 0.002], lambda t: (0.0128, 0.0094), "brass",
segs=8)
# the bow: a brass oval loop
K.oval_ring("bow", cb, rx, ry, 0.0118, 0.0095, "brass", seg=20, rseg=8, z=zc)
if big:
a0 = DEG(150)
p0 = cb + Vector((rx * math.cos(a0), ry * math.sin(a0), 0))
spur = [p0 + Vector((0.004, -0.004, 0)), p0 + Vector((-0.012, 0.022, 0)), p0 + Vector((-0.014, 0.055, 0)), p0 + Vector((0.004, 0.075, 0))]
K.tube("spur", spur, lambda t: (0.0072 * (1 - 0.45 * t), 0.0058 * (1 - 0.3 * t)), "iron", segs=8)
K.dome("spurtip", spur[-1] + Vector((0, 0, -0.004)), (0, 0, 1), 0.0068, 0.009, "brass", segs=10)
K.group("Body")
zt = z_in + t0
fr = Matrix.Translation((0, py, 0))
K.lathe("head", [(0.0, zt - 0.001), (0.013, zt - 0.001), (0.013, zt + 0.002), (0.0098, zt + 0.0048), (0.0, zt + 0.006)], "brass", segs=14, frame=fr)
K.lathe("nut", [(0.0, -zt + 0.001), (0.0115, -zt + 0.001), (0.0115, -zt - 0.003), (0.0088, -zt - 0.0045), (0.0, -zt - 0.0045)], "iron", segs=6, frame=fr,
phase=PI / 6)
disc("shaft", (0, py), 0.006, -zt, zt, "iron", segs=8)
return dict(res=1024, ps=0.45, origins={"BladeA": (0, PV_Y, 0), "BladeB": (0, PV_Y, 0)},
full={"full": (60, -12), "full_under": (-50, -12)},
views=[("pivot", (0.0, -0.145, 0.0), 0.06, 50, -25), ("bows", (0.0, 0.03, 0.0), 0.12, 50, -15)])
# ======================================================================= hammer
def hammer():
hy = -0.56
hp = [(0.0, 0.2, 0.0), (0.012, 0.06, 0.0), (0.004, -0.14, 0.0), (0.0, -0.36, 0.0), (0.0, hy - 0.05, 0.0)]
pth = K.Path(hp)
swell = lambda t: math.exp(-((t - 0.18) / 0.22) ** 2)
flare = lambda t: max(0.0, (t - .86) / .14) ** 2
pole2("handle", pth, lambda t: (0.031 + 0.007 * swell(t) + 0.012 * flare(t), 0.022 + 0.005 * swell(t) + 0.0045 * flare(t)), "wood", n=28,
cap0=True, cap1=True, cuts=(14,))
# a padded linen grip: a flared butt, finger pillows, a lip; a brass band where it stops
g1 = 0.34 * pth.len
gr = lambda t: (1.0 + 0.22 * max(0.0, 1 - t / 0.11) ** 2 + 0.06 * max(0.0, math.sin((t - 0.2) / 0.62 * 4 * PI)) * (0.2 < t < 0.82)
+ 0.06 * max(0.0, (t - 0.93) / 0.07))
pole2("grip", pth, lambda t: (0.0415 * gr(t), 0.0305 * gr(t)), "wrap", n=28, s0=0.0, s1=g1, cap0=True, cap1=False)
pole2("gband", pth, lambda t: (0.0435 - 0.003 * t, 0.032 - 0.002 * t), "brass", n=2, s0=g1 + 0.002, s1=g1 + 0.022, cap0=True, cap1=True)
K.tube("thong", [(0, 0.206, 0), (0.042, 0.244, 0), (0.04, 0.29, 0), (0.0, 0.306, 0), (-0.034, 0.276, 0), (-0.028, 0.24, 0), (0, 0.206, 0)],
lambda t: 0.0095, "knob", segs=8, cap0=False, cap1=False)
# the head: a rounded dark iron block round the eye, a neck, a brass band, a bright striking face on +X
HT, HB, HW = 0.058, 0.056, 0.044
K.rbox("cheek", (-0.003, hy - (HT - HB) / 2, 0.0), (0.134, HT + HB, 2 * HW), "iron", bev=0.012, segs=2)
FX = K.frame_z((0, hy, 0), (1, 0, 0))
K.lathe("neck", [(0.04, 0.05), (0.037, 0.075), (0.0335, 0.098), (0.0345, 0.125), (0.04, 0.158), (0.0465, 0.185), (0.0485, 0.2), (0.0485, 0.213)],
"iron", segs=16, frame=FX)
K.lathe("face", [(0.0485, 0.213), (0.0465, 0.2245), (0.0415, 0.232), (0.0, 0.232)], "steel", segs=16, frame=FX)
K.lathe("pollband", [(0.0488, 0.19), (0.0515, 0.194), (0.0515, 0.207), (0.0488, 0.211)], "brass", segs=16, frame=FX)
# the claw: an outer curve continuing the top line, thinning as it bends back, split by a V
O = resample([(-0.05, hy - HT, 0), (-0.12, hy - 0.053, 0), (-0.185, hy - 0.032, 0), (-0.238, hy + 0.008, 0), (-0.276, hy + 0.066, 0),
(-0.296, hy + 0.128, 0)], 11)
m_ = len(O) - 1
TN = []
for i, p in enumerate(O):
t_ = (O[min(i + 1, m_)] - O[max(i - 1, 0)]).normalized()
TN.append(Vector((t_.y, -t_.x, 0)))
Zv = Vector((0, 0, 1))
th = lambda t: 0.108 * (1 - t) ** 1.2 + 0.008
W = lambda t: 0.043 - 0.01 * t
gap = lambda t: 0.0 if t < 0.3 else 0.019 * ((t - 0.3) / 0.7) ** 0.75
K.loft("clawroot", [crect(O[i], TN[i], Zv, 0.0, th(i / m_), -W(i / m_), W(i / m_), 0.011) for i in range(0, 5)], "iron", cap0=True, cap1=True)
for sz in (-1, 1):
R = []
for i in range(3, m_ + 1):
t = i / m_
g = gap(t) * 0.5 + 0.0012
wo = W(t) * (0.97 + 0.1 * max(0.0, t - 0.3)) # inside the root where they overlap, a touch proud beyond it
z0, z1 = (g, wo) if sz > 0 else (-wo, -g)
k_ = 0.985 if i <= 4 else 1.0
R.append(crect(O[i], TN[i], Zv, 0.0, th(t) * k_, z0, z1, 0.009 * (1 - 0.5 * t)))
K.loft(f"prong{sz}", R, "iron", cap0=False, cap1=True)
# the handle's end through the eye, a steel wedge across it
K.tube("eyetop", [Vector((0, hy - 0.05, 0)), Vector((0, hy - HT - 0.004, 0))], lambda t: (0.031, 0.02), "wood", segs=10, n=2)
K.rbox("wedge", (0.0, hy - HT - 0.0045, 0.0), (0.054, 0.009, 0.007), "steel", bev=0.002, segs=1)
return dict(res=2048, ps=0.6, full={"full": (64, -14), "full_back": (22, 150)},
views=[("head", (-0.03, -0.56, 0.0), 0.2, 30, -120), ("grip", (0.0, 0.1, 0.0), 0.18, 30, 40)])
BUILDERS = {"SM_Tool_Sickle": sickle, "SM_Tool_LongScythe": long_scythe, "SM_Tool_WideScythe": wide_scythe,
"SM_Tool_GardenShears": garden_shears, "SM_Tool_NailScissors": nail_scissors, "SM_Tool_Hammer": hammer}
if __name__ == "__main__":
K.run(BUILDERS)

View File

@ -0,0 +1,151 @@
"""GRASS CUTTER - more for the meadow than trees and the purple-veined spires:
SM_Boulders a cluster of round, weathered field stones (no veins), moss on the shady side
SM_SlabStones flat lilac slabs tipped up out of the ground, like an old wall gone over
SM_Crystals a clump of teal crystals growing out of a pale rock
SM_Shrooms giant alien mushrooms: cream stems, coral and teal caps with pale spots
SM_Stump a broken stump on its roots with a fallen log beside it
SM_BulbPlants fat alien bulb plants with spines and a flower on top
All stand on z = 0 with their origin at the middle of the foot; Ground places them on the ball and gives them a MeshCollider
(except the plants, which are walked through). Front = -Y (Unity +Z).
blender -b --factory-startup --python ArtSource/Blender/scripts/gc_up6_world.py -- [SM_Name ...]
"""
import sys, os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from gc_up_kit import * # noqa: F401,F403
STONE, PALE, LILAC, WET = "M_Rock", "M_RockPale", "M_RockLilac", "M_RockWet"
MOSS, BARK, WOOD = "M_LeafDark", "M_Bark", "M_Wood"
def view(**kw):
return dict(elev=14, azim=-35, bg=(0.62, 0.72, 0.84), **kw)
def finish(P, name, ms=None, ang=35):
for o in P:
apply_xform(o)
o = ffin(P, name, ang=ang, wn=False, ms=ms or {STONE: 0.6, PALE: 0.6, LILAC: 0.6, WET: 0.6})
return o
def tilted(o, rx=0.0, ry=0.0, rz=0.0, t=(0, 0, 0)):
return xf(o, rx=rx, ry=ry, rz=rz, t=t)
# ======================================================================= stones
def boulders():
rng = random.Random(61)
P = []
for (x, y, r, sc) in ((0.0, 0.0, 1.25, (1.2, 1.0, 0.8)), (1.7, 0.6, 0.75, (1.1, 1.0, 0.85)), (-1.3, 0.9, 0.6, (1.0, 1.2, 0.8)), (0.6, -1.4, 0.45, (1.2, 0.9, 0.7)), (-0.7, -1.1, 0.3, (1, 1, 0.8))):
m = PALE if r > 0.7 else STONE
P.append(rock(r, (x, y, r * sc[2] * 0.55), seed=rng.randrange(999), sc=sc, m=m, sub=2, amp=0.13, name="stone"))
# moss on the north side and the top
if r > 0.5:
P.append(rock(r * 0.62, (x - r * 0.15, y + r * 0.45, r * sc[2] * 0.95), seed=rng.randrange(999), sc=(1.3, 1.0, 0.35), m=MOSS, sub=1, amp=0.18, name="moss"))
return P
def slab_stones():
rng = random.Random(62)
P = []
for k, (x, y, w, h, lean, yaw) in enumerate(((0.0, 0.0, 1.5, 2.2, 0.18, 0.1), (1.4, 0.5, 1.1, 1.5, -0.25, 0.4), (-1.3, 0.3, 1.0, 1.2, 0.32, -0.3), (0.5, -1.2, 0.9, 0.5, 1.2, 0.8))):
o = rock(0.5, (0, 0, 0), seed=rng.randrange(999), sc=(w, 0.32, h), m=LILAC if k % 2 == 0 else WET, sub=2, amp=0.08, name="slab")
P.append(tilted(o, rx=lean, rz=yaw, t=(x, y, h * 0.36)))
for k in range(5):
a = rng.uniform(0, 2 * PI)
P.append(rock(rng.uniform(0.12, 0.22), (math.cos(a) * rng.uniform(1.2, 2.0), math.sin(a) * rng.uniform(1.0, 1.8), 0.05), seed=k + 20, sc=(1.2, 1, 0.6), m=STONE, sub=1, amp=0.2, name="pebble"))
return P
def crystals():
rng = random.Random(63)
P = [rock(0.9, (0, 0, 0.25), seed=7, sc=(1.4, 1.2, 0.6), m=PALE, sub=2, amp=0.15, name="bed")]
spec = [(0.0, 0.0, 0.3, 2.6, 0.0, 0.0), (0.45, 0.2, 0.22, 1.8, 0.35, 0.5), (-0.4, 0.25, 0.2, 1.6, -0.4, 0.2), (0.15, -0.45, 0.17, 1.2, 0.15, -0.6),
(-0.25, -0.35, 0.14, 0.9, -0.5, -0.3), (0.65, -0.3, 0.12, 0.8, 0.6, -0.2), (-0.7, -0.05, 0.11, 0.7, -0.7, 0.1)]
for k, (x, y, r, L, tx, ty) in enumerate(spec):
m = "M_CrystalDeep" if k % 3 == 0 else "M_GlassTeal" if k % 3 == 1 else "M_PaintTeal"
shaft = cz("crystal", r, 0.0, L * 0.78, 0, 0, m, v=6)
tip = cz("tip", r, L * 0.78, L, 0, 0, m, v=6, r2=0.0)
for o in (shaft, tip):
P.append(tilted(o, rx=ty * 0.6, ry=tx * 0.6, rz=rng.uniform(0, 1), t=(x, y, 0.25)))
return P
# ======================================================================= plants
def shrooms():
rng = random.Random(64)
P = []
for k, (x, y, h, cr, lean) in enumerate(((0.0, 0.0, 2.6, 1.15, 0.05), (1.3, 0.5, 1.7, 0.8, -0.18), (-1.0, 0.7, 1.3, 0.62, 0.2), (0.6, -1.0, 0.8, 0.42, 0.12), (-0.5, -0.8, 0.5, 0.3, -0.2))):
cap = "M_Coral" if k % 2 == 0 else "M_PaintTeal"
parts = [cz("stem", h * 0.085, 0.0, h, 0, 0, "M_PaintCream", v=10, r2=h * 0.06),
cz("skirt", h * 0.14, h * 0.62, h * 0.66, 0, 0, "M_PaintCream", v=10, r2=h * 0.09),
sphere("cap", cr, (0, 0, h), seg=14, rings=7, m=cap, scale=(1, 1, 0.5)),
cz("gill", cr * 0.92, h - 0.02, h + 0.02, 0, 0, "M_PaintCream", v=14)]
for s in range(5 if cr > 0.5 else 3):
a = rng.uniform(0, 2 * PI)
rr = rng.uniform(0.3, 0.75) * cr
parts.append(sphere("spot", cr * 0.12, (math.cos(a) * rr, math.sin(a) * rr, h + cr * 0.5 * math.sqrt(max(0.05, 1 - (rr / cr) ** 2))), seg=6, rings=3, m="M_PaintWhite", scale=(1, 1, 0.45)))
for o in parts:
P.append(tilted(o, rx=lean, ry=lean * 0.5, t=(x, y, 0)))
return P
def stump():
rng = random.Random(65)
P = [cz("stump", 0.55, 0.0, 0.95, 0, 0, BARK, v=12, r2=0.48),
cz("top", 0.49, 0.95, 0.99, 0, 0, WOOD, v=12)]
# a jagged break: a few splinters standing up from the top
for k in range(6):
a = k / 6 * 2 * PI + rng.uniform(-0.2, 0.2)
P.append(cyl_between("splinter", (math.cos(a) * 0.38, math.sin(a) * 0.38, 0.95), (math.cos(a) * 0.3, math.sin(a) * 0.3, 1.1 + rng.uniform(0, 0.35)), 0.09, WOOD, v=4, r2=0.01))
for k in range(5):
a = k / 5 * 2 * PI + 0.3
P.append(cyl_between("root", (math.cos(a) * 0.35, math.sin(a) * 0.35, 0.35), (math.cos(a) * 1.05, math.sin(a) * 1.05, -0.05), 0.16, BARK, v=6, r2=0.05))
# the fallen top, lying beside it
P.append(cyl_between("log", (0.8, -0.7, 0.32), (3.2, 0.4, 0.3), 0.36, BARK, v=10, r2=0.3))
P.append(cyl_between("end", (0.78, -0.71, 0.32), (0.81, -0.69, 0.32), 0.35, WOOD, v=10))
P.append(cyl_between("branch", (2.2, -0.05, 0.45), (2.6, -0.9, 1.1), 0.08, BARK, v=5, r2=0.03))
P.append(rock(0.45, (2.0, 0.15, 0.62), seed=3, sc=(1.4, 1.0, 0.35), m=MOSS, sub=1, amp=0.2, name="moss"))
return P
def bulb_plants():
rng = random.Random(66)
P = []
for k, (x, y, s) in enumerate(((0.0, 0.0, 1.0), (0.9, 0.4, 0.7), (-0.75, 0.5, 0.6), (0.3, -0.8, 0.5))):
body = "M_Plant" if k % 2 == 0 else "M_Leaves"
P.append(sphere("bulb", 0.55 * s, (x, y, 0.5 * s), seg=12, rings=8, m=body, scale=(1, 1, 1.15)))
P.append(sphere("neck", 0.3 * s, (x, y, 1.1 * s), seg=10, rings=6, m=body, scale=(1, 1, 1.2)))
# ribs of spines
for j in range(8):
a = j / 8 * 2 * PI
for z in (0.35, 0.65):
p = Vector((x + math.cos(a) * 0.55 * s * 0.95, y + math.sin(a) * 0.55 * s * 0.95, z * s + 0.1 * s))
d = Vector((math.cos(a), math.sin(a), 0.4)).normalized()
P.append(cyl_between("spine", p, p + d * 0.16 * s, 0.02 * s, "M_PaintCream", v=3, r2=0.0))
# a flower on top
top = Vector((x, y, 1.45 * s))
for j in range(6):
a = j / 6 * 2 * PI + rng.uniform(0, 0.3)
P.append(sphere("petal", 0.14 * s, (top.x + math.cos(a) * 0.13 * s, top.y + math.sin(a) * 0.13 * s, top.z), seg=6, rings=4, m="M_PaintRed" if k % 2 else "M_PaintOrange", scale=(1.3, 0.7, 0.3)))
P.append(sphere("heart", 0.08 * s, (top.x, top.y, top.z + 0.03 * s), seg=6, rings=4, m="M_PaintYellow"))
return P
def builder(fn, name, ang=35):
def build():
finish(fn(), name, ang=ang)
return view(man=(2.5, -2.0, 0.0), views=[("_close", dict(elev=10, azim=-25, dist_mul=0.8))])
return build
BUILDERS = {"SM_Boulders": builder(boulders, "SM_Boulders"), "SM_SlabStones": builder(slab_stones, "SM_SlabStones", 30), "SM_Crystals": builder(crystals, "SM_Crystals", 20),
"SM_Shrooms": builder(shrooms, "SM_Shrooms"), "SM_Stump": builder(stump, "SM_Stump"), "SM_BulbPlants": builder(bulb_plants, "SM_BulbPlants")}
BUDGET = {"SM_Boulders": 2500, "SM_SlabStones": 1500, "SM_Crystals": 800, "SM_Shrooms": 3000, "SM_Stump": 1500, "SM_BulbPlants": 3000}
if __name__ == "__main__":
build_main(BUILDERS, BUDGET)

View File

@ -12,18 +12,24 @@ from gc_up_kit import * # noqa: F401,F403
# ======================================================================= deck tile # ======================================================================= deck tile
# the opening in each fence for its ladder, in the fence's own x
GAP0, GAP1 = 1.52, 2.48
def fence(alt): def fence(alt):
"""Cream post-and-rail along the -Y edge. Corner posts differ in size so two rails sharing a corner never z-fight, and the """Cream post-and-rail along the -Y edge. Corner posts differ in size so two rails sharing a corner never z-fight, and the
E/W rails sit a little higher to lap the N/S rails. The side panels stay clear for the ladders (x = +-1.5).""" E/W rails sit a little higher to lap the N/S rails. The rails stop either side of the ladder (x = +2.0, which is where
DeckManager hangs it on every edge): an opening between two short posts, so the ladder comes up through the fence, not into it."""
yc, yr, dz = -2.86, -2.955, 0.04 if alt else 0.0 yc, yr, dz = -2.86, -2.955, 0.04 if alt else 0.0
Q = [] Q = []
for x, w in ((-2.86, 0.15), (-0.95, 0.17), (0.95, 0.17), (2.86, 0.19)): for x, w in ((-2.86, 0.15), (-0.95, 0.17), (0.95, 0.17), (GAP0 - 0.06, 0.12), (GAP1 + 0.06, 0.12), (2.86, 0.19)):
pts = [(x - w / 2, 0.02), (x + w / 2, 0.02), (x + w / 2, 0.97), (x, 1.05), (x - w / 2, 0.97)] pts = [(x - w / 2, 0.02), (x + w / 2, 0.02), (x + w / 2, 0.97), (x, 1.05), (x - w / 2, 0.97)]
Q.append(grain(prism("post", pts, "XZ", yc - w / 2, yc + w / 2, CRM, bev=0.012), (0, 0, 1))) Q.append(grain(prism("post", pts, "XZ", yc - w / 2, yc + w / 2, CRM, bev=0.012), (0, 0, 1)))
Q.append(plain(x - w / 2 - 0.022, x + w / 2 + 0.022, yc - w / 2 - 0.022, yc + w / 2 + 0.022, 0.0, 0.06, IRON, "shoe")) Q.append(plain(x - w / 2 - 0.022, x + w / 2 + 0.022, yc - w / 2 - 0.022, yc + w / 2 + 0.022, 0.0, 0.06, IRON, "shoe"))
Q.append(plain(x - w / 2 - 0.006, x + w / 2 + 0.006, yc - w / 2 - 0.006, yc + w / 2 + 0.006, 0.8, 0.83, IRON, "band")) Q.append(plain(x - w / 2 - 0.006, x + w / 2 + 0.006, yc - w / 2 - 0.006, yc + w / 2 + 0.006, 0.8, 0.83, IRON, "band"))
Q.append(beam((-2.99, yr, 0.91 + dz), (2.99, yr, 0.91 + dz), 0.055, 0.13, CRM, bev=0.012, name="rail")) for x0, x1 in ((-2.99, GAP0), (GAP1, 2.99)):
Q.append(beam((-2.99, yr, 0.52 + dz), (2.99, yr, 0.52 + dz), 0.055, 0.12, CRM, bev=0.012, name="rail")) Q.append(beam((x0, yr, 0.91 + dz), (x1, yr, 0.91 + dz), 0.055, 0.13, CRM, bev=0.012, name="rail"))
Q.append(beam((x0, yr, 0.52 + dz), (x1, yr, 0.52 + dz), 0.055, 0.12, CRM, bev=0.012, name="rail"))
# X panel in the middle, a kick board under it # X panel in the middle, a kick board under it
for s in (-1, 1): for s in (-1, 1):
Q.append(beam((-0.83 * s, -2.905 - 0.01 * s, 0.14), (0.83 * s, -2.905 - 0.01 * s, 0.84), 0.04, 0.09, CRM, bev=0, name="brace")) Q.append(beam((-0.83 * s, -2.905 - 0.01 * s, 0.14), (0.83 * s, -2.905 - 0.01 * s, 0.84), 0.04, 0.09, CRM, bev=0, name="brace"))

BIN
ArtSource/Blender/stylized/SM_Tool_GardenShears.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_Hammer.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_LongScythe.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_NailScissors.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_Scythe.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_Shears.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_Sickle.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/SM_Tool_WideScythe.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/Style_Tools_Review.blend (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_GardenShears.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_Hammer.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_LongScythe.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_NailScissors.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_Scythe.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_Shears.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_Sickle.fbx (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/fbx/SM_Tool_WideScythe.fbx (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Hammer_fpv.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Hammer_full.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Hammer_grip.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Hammer_head.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Scythe_fpv.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Scythe_full.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Scythe_mount.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Sickle_blade.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Sickle_fpv.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Sickle_full.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/previews/SM_Tool_Sickle_neck.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/ref/style_telescope.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_GardenShears_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_Hammer_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_Hammer_Painted.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_LongScythe_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_LongScythe_Painted.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_NailScissors_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_Scythe_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_Scythe_Painted.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_Sickle_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_Sickle_Painted.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_WideScythe_Mask.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Blender/stylized/textures/T_WideScythe_Painted.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Previews/SM_Boulders.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Previews/SM_BulbPlants.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Previews/SM_Crystals.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Previews/SM_DeckTile.png (Stored with Git LFS)

Binary file not shown.

BIN
ArtSource/Previews/SM_Shrooms.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Previews/SM_SlabStones.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
ArtSource/Previews/SM_Stump.png (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,107 @@
[
{
"name": "M_Scythe_Painted",
"color": "#FFFFFF",
"texture": "T_Scythe_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_Scythe_Mask.png",
"paintGlow": 0.12
},
{
"name": "M_Sickle_Painted",
"color": "#FFFFFF",
"texture": "T_Sickle_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_Sickle_Mask.png",
"paintGlow": 0.12
},
{
"name": "M_LongScythe_Painted",
"color": "#FFFFFF",
"texture": "T_LongScythe_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_LongScythe_Mask.png",
"paintGlow": 0.12
},
{
"name": "M_WideScythe_Painted",
"color": "#FFFFFF",
"texture": "T_WideScythe_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_WideScythe_Mask.png",
"paintGlow": 0.12
},
{
"name": "M_GardenShears_Painted",
"color": "#FFFFFF",
"texture": "T_GardenShears_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_GardenShears_Mask.png",
"paintGlow": 0.12
},
{
"name": "M_NailScissors_Painted",
"color": "#FFFFFF",
"texture": "T_NailScissors_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_NailScissors_Mask.png",
"paintGlow": 0.12
},
{
"name": "M_Hammer_Painted",
"color": "#FFFFFF",
"texture": "T_Hammer_Painted.png",
"metallic": 1.0,
"smoothness": 1.0,
"emission": null,
"transparent": false,
"tiling": [
1,
1
],
"mask": "T_Hammer_Mask.png",
"paintGlow": 0.12
}
]

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a09b7c8b722f99147bc024c95b8c753d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 880f777deccc4844a8010e338e12b848
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4300000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ea395dd493855cb4380e20e575fe9c7a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4300000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 04b15d5097599994ca40e5108c47d405
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4300000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a1df2dfff5eea284398aa54ea2e5a9d3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 4300000
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More