feat: 切换至滚动阻力运行模型并更新资产、编辑器与验证

- 物理规则:现行模型仅保留滚动阻力耗能与恢复系数碰撞,风力、空气阻力、静摩擦、动摩擦不再参与运行;确认三球质量 60/330/约890 kg 及水密度、流阻参数
- 定向加速改为真实顶面接触触发的一次性 +5 m/s 速度事件,模型新增渐进式 U 形导槽出口
- 更新球体、滑槽、水/冰/墙、球洞模型与 storybook 目录、物理、实体配置
- 工坊摆放、编辑器、运行适配与检查脚本同步;删除过时的 baseline 三组检查
- 新增谜题设计参考文档、关卡草稿与本轮实验产物
This commit is contained in:
Yanchen
2026-12-05 10:37:31 +08:00
parent d1141b04c7
commit bf6c355fa6
132 changed files with 13205 additions and 1838 deletions
+10 -18
View File
@@ -102,7 +102,7 @@ def build_wall(name='wall'):
faces=[(0,2,3,1),(4,5,7,6),(0,1,5,4),(2,6,7,3),(0,4,6,2),(1,3,7,5)]
return mesh_object(name,vertices,faces)
build_funnel();build_wall();build_wall('directional_boost');build_wall('water');build_wall('ice')
build_funnel();build_wall();build_wall('water');build_wall('ice')
mats['water']=mat('water','74C7D8',roughness=.25)
mats['water_surface']=mat('water_surface','63B8C5',roughness=.25)
mats['ice']=mat('ice','A8DAE0',roughness=.12)
@@ -121,9 +121,10 @@ catalog['models']['water']['flowDirectionGodot']=[1,0,0]
catalog['models']['wall']={'role':'solid','category':'nonInteractive','collisionShape':'box',
'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1],'size':[1,1,1]},
'declaredSize':[1,1,1],'geometryOrigin':'authored'}
catalog['models']['directional_boost']={'role':'boost','category':'interactive','collisionShape':'box',
'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1],'size':[1,1,1]},
'declaredSize':[1,1,1],'geometryOrigin':'authored','arrowDirectionGodot':[1,0,0]}
boost_radius=catalog['models']['straight']['grooveRadius']
catalog['models']['directional_boost']={'role':'boost','category':'interactive','collisionShape':'guidedBase',
'cellFootprint':[1,1],'boundsBlender':{'min':[-.5,-.5,0],'max':[.5,.5,1+boost_radius],'size':[1,1,1+boost_radius]},
'declaredSize':[1,1,1+boost_radius],'baseHeight':1,'geometryOrigin':'authored','arrowDirectionGodot':[1,0,0]}
catalog['models']['goal_hole']={'role':'goal','category':'nonInteractive','openingRadius':.32,
'entranceRadius':.46,'funnelDepth':.35,'depth':1.0,'cellFootprint':[1,1],
'boundsBlender':{'min':[-.5,-.5,-1],'max':[.5,.5,0],'size':[1,1,1]},
@@ -160,17 +161,6 @@ def outline(obj):
bm.free()
return lines(obj.name,segments)
def boost_arrow():
# Flat authored graphic above the top face; excluded from collision like ink outlines.
points=[(-.34,-.12),(.04,-.12),(.04,-.28),(.36,0),(.04,.28),(.04,.12),(-.34,.12)]
result=[]
for suffix,scale,z,color in [('border',1,1.002,'ink'),('fill',.82,1.003,'red')]:
arrow=mesh_object('ink_boost_arrow_'+suffix,[(x*scale,y*scale,z) for x,y in points],[tuple(range(7))])
arrow.data.materials.append(mats[color]);arrow['visual_only']=True
result.append(arrow)
return result
def asset_dir(kind):
category = 'balls' if kind == 'iron_ball' else 'goals' if kind == 'goal_hole' else 'blocks' if kind in ('wall','directional_boost','water','ice') else 'chutes'
return ROOT / 'assets' / category / kind
@@ -186,6 +176,9 @@ groups=[];report=[]
all_kinds=kinds+['iron_ball','goal_hole','wall','directional_boost','water','ice']
if ONLY_ASSET is not None and ONLY_ASSET not in all_kinds:raise ValueError(ONLY_ASSET)
for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds):
if kind=='directional_boost':
author=runpy.run_path(str(asset_dir(kind)/'source/outlet.py'))
group=author['build_outlet'](boost_radius,mesh_object,outline,mats)
obj=bpy.data.objects[snapshot_turn if kind=='turn_90' else kind]
if kind=='turn_90':
obj.name=kind
@@ -194,7 +187,7 @@ for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds):
obj.data=obj.data.copy()
before_coords=[tuple(v.co) for v in obj.data.vertices]
old_indices=[p.material_index for p in obj.data.polygons]
obj.data.materials.clear()
if kind!='directional_boost':obj.data.materials.clear()
if kind in kinds:
for key in ['body','groove','top']:obj.data.materials.append(mats[key])
for face,old in zip(obj.data.polygons,old_indices):
@@ -228,11 +221,10 @@ for kind in ([ONLY_ASSET] if ONLY_ASSET else all_kinds):
ice_style['apply_ice_surface'](obj,mats['ice'],mats['ice_top'])
group.append(outline(obj))
category='entities'
else:
elif kind!='directional_boost':
obj.data.materials.append(mats['wall']);obj.data.materials.append(mats['wall_top'])
for face in obj.data.polygons:face.material_index=1 if face.normal.z>.5 else 0
group=[obj,outline(obj)]
if kind=='directional_boost':group+=boost_arrow()
category='entities'
obj['style_family']='railbound_inspired'
obj['collision_source']='authored mesh' if kind in ('wall','goal_hole','directional_boost','water','ice') else 'unchanged source mesh'