Preserve initial outfit review and tested heel-safe gait for reference revision
This commit is contained in:
+14
-7
@@ -16,6 +16,10 @@ var initialized=false
|
||||
var moving=false
|
||||
var stride=1.55
|
||||
var last_direction=Vector3.ZERO
|
||||
var stride_min=1.25
|
||||
var stride_max=1.65
|
||||
var track_width=.065
|
||||
var swing_height=.15
|
||||
|
||||
func setup(owner_actor):
|
||||
actor=owner_actor;skeleton=actor.find_children("*","Skeleton3D",true,false)[0]
|
||||
@@ -67,7 +71,7 @@ func landing(f,progress,travel_direction):
|
||||
# Narrow catwalk track, with enough clearance for the boots to pass each other.
|
||||
var side=1.0 if f.side=="L" else -1.0
|
||||
var destination=actor.global_position+travel_direction*((1.0-progress)*stride+stride*.25)
|
||||
destination+=actor.global_basis.x.normalized()*side*.065*scale_y
|
||||
destination+=actor.global_basis.x.normalized()*side*track_width*scale_y
|
||||
destination.y=ground_height(f)
|
||||
return destination
|
||||
|
||||
@@ -81,7 +85,7 @@ func update(dt):
|
||||
var was_moving=moving;moving=distance>.00015 and dt>0
|
||||
var scale_y=actor.global_basis.get_scale().y
|
||||
# Longer steps at higher upgrade speeds; phase still follows the actual distance.
|
||||
stride=lerpf(1.25,1.65,clampf((last_speed/scale_y-1.3)/2.0,0,1))*scale_y
|
||||
stride=lerpf(stride_min,stride_max,clampf((last_speed/scale_y-1.3)/2.0,0,1))*scale_y
|
||||
walk_weight=move_toward(walk_weight,1.0 if moving else 0.0,dt*7)
|
||||
if moving:
|
||||
distance_walked+=distance;phase=fposmod(phase+distance/stride,1.0)
|
||||
@@ -103,7 +107,7 @@ func update(dt):
|
||||
var u=clampf((p-f.start_phase)/maxf(.01,1.0-f.start_phase),0,1)
|
||||
var ease=u*u*(3-2*u)
|
||||
f.target=f.start.lerp(f.landing,ease)
|
||||
f.target.y=ground_height(f)+sin(u*PI)*.15*scale_y
|
||||
f.target.y=ground_height(f)+sin(u*PI)*swing_height*scale_y
|
||||
else:
|
||||
if not f.grounded:
|
||||
f.anchor=f.landing;f.anchor.y=ground_height(f);f.yaw=actor.global_rotation.y;f.grounded=true
|
||||
@@ -146,7 +150,10 @@ func update(dt):
|
||||
skeleton.set_bone_pose_position(bones["root"],skeleton.to_local(root_position));skeleton.force_update_all_bone_transforms()
|
||||
for f in feet:
|
||||
leg(f,f.target)
|
||||
var yaw=f.yaw if f.grounded else actor.global_rotation.y
|
||||
var foot_rotation=Quaternion(Vector3.UP,yaw)*f.rotation
|
||||
if not f.grounded:foot_rotation=Quaternion(actor.global_basis.x.normalized(),sin(maxf(0,f.last_phase-.5)*TAU)*-.12)*foot_rotation
|
||||
set_rotation("foot."+f.side,foot_rotation)
|
||||
set_rotation("foot."+f.side,foot_orientation(f,dt))
|
||||
|
||||
func foot_orientation(f,_dt):
|
||||
var yaw=f.yaw if f.grounded else actor.global_rotation.y
|
||||
var orientation=Quaternion(Vector3.UP,yaw)*f.rotation
|
||||
if not f.grounded:orientation=Quaternion(actor.global_basis.x.normalized(),sin(maxf(0,f.last_phase-.5)*TAU)*-.12)*orientation
|
||||
return orientation
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# Предварительный комплект суккубы — на согласование
|
||||
|
||||
Этот первый образец сохранён для истории. После его подготовки пользователь
|
||||
дал новый основной референс с трёх сторон: чёрный комплект, высокий хвост волос
|
||||
и низкие коричневые крылья. Красный комплект не был утверждён.
|
||||
|
||||
Статус: образец для выбора, в основной игре пока остаётся `succubus_v02.glb`
|
||||
и прежняя походка. Новые модели, движения и параметры включены только в этой
|
||||
отдельной сцене. Общая модель используется героиней и помощницами после согласования.
|
||||
|
||||
- Чёрные ботфорты: острый носок, широкий высокий каблук со скошенными гранями,
|
||||
отдельная изогнутая подошва с просветом под сводом. Обувь жёстко привязана
|
||||
к стопе, исключён изгиб вместе с костями пальцев.
|
||||
- Суставы стоп подняты на 8 см в координатах модели, обновлены inverse bind
|
||||
matrices и трансляции в исходных клипах. Сустав соответствует поднятой пятке,
|
||||
а не старой босой стопе. Ходьба использует более короткий шаг, отдельные
|
||||
дорожки ног и ограничение поворота опорной стопы до 22° относительно таза.
|
||||
- Красный кожаный корсет: фигурный верх/низ, воротник с кольцами спереди и
|
||||
пряжками сзади, ремни, пояс, задняя шнуровка, небольшие наплечники-крылья.
|
||||
Края материалов разрезаны по треугольникам, вместо назначения целых граней.
|
||||
- Большие крылья: изогнутые рёбра, провисающая бордовая перепонка, гладкие
|
||||
нормали. Привязаны к имеющимся независимым `Wing.L/R`. При ходьбе вторичное
|
||||
покачивание около 2,3° с задержкой; при остановке оно затухает.
|
||||
|
||||
GIF: `walking.gif` — ходьба, поворот и остановка; `boots.gif` — обувь сбоку;
|
||||
`outfit.gif` — обзор спереди и сзади. Это рендер настоящей 3D-модели в Godot.
|
||||
|
||||
Воспроизведение из корня репозитория (Python с NumPy, Godot 4.3):
|
||||
|
||||
```powershell
|
||||
python tools/preview_succubus_heels.py
|
||||
godot --headless --editor --path Demon_v0.19 --import
|
||||
godot --path Demon_v0.19 --script res://reviews/heels_v01/review_tests.gd
|
||||
godot --path Demon_v0.19 res://reviews/heels_v01/review.tscn
|
||||
python tools/encode_succubus_review.py --ffmpeg PATH_TO_FFMPEG
|
||||
```
|
||||
|
||||
Проверены размеры героини/помощницы, четыре скорости, 30/60 fps, поворот на 90°,
|
||||
остановка, контакт с полом, достижимость IK и ограничение разворота стопы.
|
||||
Регрессия основной походки: героиня и три помощницы, пять скоростей, повороты,
|
||||
остановки, плеть, пауза и телепорт. Все проверки проходят. При импорте остаётся
|
||||
предупреждение о вырожденной нормали при генерации LOD у исходной геометрии.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 11 MiB |
@@ -0,0 +1,80 @@
|
||||
extends Node3D
|
||||
var paused=false
|
||||
var actors=[]
|
||||
var camera: Camera3D
|
||||
var folder="res://captures/heels-v01"
|
||||
var max_yaw=0.0
|
||||
var max_error=0.0
|
||||
var headers=[]
|
||||
|
||||
func _ready():call_deferred("run")
|
||||
func block(at,size,color):
|
||||
var node=MeshInstance3D.new();add_child(node);node.position=at
|
||||
node.mesh=BoxMesh.new();node.mesh.size=size
|
||||
var mat=StandardMaterial3D.new();mat.albedo_color=color;mat.roughness=.75;node.material_override=mat
|
||||
return node
|
||||
func lighting():
|
||||
var world=WorldEnvironment.new();add_child(world);world.environment=Environment.new()
|
||||
world.environment.background_mode=Environment.BG_COLOR;world.environment.background_color=Color("282d34")
|
||||
world.environment.ambient_light_source=Environment.AMBIENT_SOURCE_COLOR;world.environment.ambient_light_color=Color("b6c6d7");world.environment.ambient_light_energy=.65
|
||||
world.environment.tonemap_mode=Environment.TONE_MAPPER_FILMIC
|
||||
for at in [Vector3(-4,6,5),Vector3(5,4,-3)]:
|
||||
var light=OmniLight3D.new();add_child(light);light.position=at;light.light_energy=4;light.omni_range=24;light.shadow_enabled=true
|
||||
block(Vector3(0,-.08,12),Vector3(80,.15,80),Color("41464d"))
|
||||
camera=Camera3D.new();add_child(camera);camera.projection=Camera3D.PROJECTION_ORTHOGONAL;camera.current=true
|
||||
var layer=CanvasLayer.new();add_child(layer)
|
||||
for i in range(2):
|
||||
var label=Label.new();layer.add_child(label);label.text="СЕЙЧАС" if i==0 else "КАБЛУКИ · ОБРАЗЕЦ"
|
||||
label.position=Vector2(260+i*770,32);label.add_theme_font_size_override("font_size",28)
|
||||
headers.append(label)
|
||||
|
||||
func create_actors():
|
||||
for i in range(2):
|
||||
var carrier=Node3D.new();add_child(carrier);carrier.position=Vector3(-1.1+i*2.2,0,0)
|
||||
var actor=preload("res://succubus_actor.gd").new(preload("res://reviews/heels_v01/succubus_heels.glb") if i==1 else null)
|
||||
carrier.add_child(actor);actor.rotation=Vector3.ZERO
|
||||
if i==1:actor.gait=preload("res://reviews/heels_v01/review_gait.gd").new()
|
||||
actor.configure(self);actor.set_process(false);actors.append(actor)
|
||||
|
||||
func advance(dt,direction,speed):
|
||||
for actor in actors:
|
||||
actor.get_parent().position+=direction*speed*dt
|
||||
if direction.length_squared()>.1:actor.rotation.y=lerp_angle(actor.rotation.y,atan2(direction.x,direction.z),minf(1,dt*10))
|
||||
actor._process(dt)
|
||||
for f in actors[1].gait.feet:
|
||||
max_yaw=maxf(max_yaw,absf(wrapf(f.yaw-actors[1].global_rotation.y,-PI,PI)))
|
||||
max_error=maxf(max_error,actors[1].gait.point("foot."+f.side).distance_to(f.target))
|
||||
|
||||
func reset():
|
||||
for i in range(actors.size()):
|
||||
var actor=actors[i];actor.restore_animation_pose();actor.get_parent().position=Vector3(-1.1+i*2.2,0,0);actor.rotation=Vector3.ZERO;actor.reset_gait()
|
||||
|
||||
func shot(name,close=false):
|
||||
var focus=actors[1].get_parent().position+Vector3(0,.57 if close else 1.28,0)
|
||||
camera.size=1.65 if close else 3.15;camera.position=focus+(Vector3(5,.7,2.1) if close else Vector3(2.2,1.0,7));camera.look_at(focus)
|
||||
await RenderingServer.frame_post_draw
|
||||
var error=get_viewport().get_texture().get_image().save_png(folder+"/"+name+".png")
|
||||
assert(error==OK)
|
||||
|
||||
func run():
|
||||
DirAccess.make_dir_recursive_absolute(folder+"/full");DirAccess.make_dir_recursive_absolute(folder+"/feet");DirAccess.make_dir_recursive_absolute(folder+"/outfit")
|
||||
lighting();create_actors();await get_tree().process_frame
|
||||
actors[0].get_parent().hide();headers[0].hide();headers[1].position=Vector2(320,32);headers[1].text="ОБРАЗЕЦ · КРАСНЫЙ КОРСЕТ / ЧЁРНЫЕ БОТФОРТЫ"
|
||||
for frame in range(72):
|
||||
var direction=Vector3.BACK if frame<48 else Vector3(0.7,0,.7).normalized()
|
||||
advance(1.0/24,direction,2.5 if frame<60 else 0)
|
||||
await shot("full/%03d"%frame)
|
||||
reset()
|
||||
actors[0].get_parent().hide();headers[0].hide();headers[1].position=Vector2(500,32);headers[1].text="КАБЛУКИ · КРУПНЫЙ ПЛАН"
|
||||
for frame in range(48):
|
||||
advance(1.0/24,Vector3.BACK,2.5)
|
||||
await shot("feet/%03d"%frame,true)
|
||||
reset();headers[1].position=Vector2(410,32);headers[1].text="КОРСЕТ И КРЫЛЬЯ · ВИД СПЕРЕДИ И СЗАДИ"
|
||||
for frame in range(96):
|
||||
advance(1.0/24,Vector3.ZERO,0)
|
||||
var focus=actors[1].get_parent().position+Vector3(0,1.52,0);var angle=TAU*frame/96
|
||||
camera.size=1.95;camera.position=focus+Vector3(sin(angle)*5,.45,cos(angle)*5);camera.look_at(focus)
|
||||
await RenderingServer.frame_post_draw
|
||||
get_viewport().get_texture().get_image().save_png(folder+"/outfit/%03d.png"%frame)
|
||||
print("HEELS REVIEW METRICS ",JSON.stringify({"max_heading_twist_degrees":rad_to_deg(max_yaw),"max_ankle_target_error":max_error,"production_model_unchanged":true}))
|
||||
get_tree().quit()
|
||||
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://reviews/heels_v01/review.gd" id="1"]
|
||||
|
||||
[node name="HeelsApprovalStudio" type="Node3D"]
|
||||
script = ExtResource("1")
|
||||
@@ -0,0 +1,29 @@
|
||||
extends "res://catwalk.gd"
|
||||
# Approval-only settings: the default heroine and helpers still use catwalk.gd.
|
||||
func _init():
|
||||
stride_min=.95;stride_max=1.28;track_width=.09;swing_height=.11
|
||||
|
||||
func ground_height(f):return super.ground_height(f)-.016*actor.global_basis.get_scale().y
|
||||
|
||||
func update(dt):
|
||||
super.update(dt)
|
||||
# Secondary motion follows the travelled step cycle with a small phase delay.
|
||||
# Both wing roots remain attached to the upper back; no active flight flaps.
|
||||
for side in ["L","R"]:
|
||||
var sign_x=1 if side=="L" else -1
|
||||
rotate_world("Wing."+side,actor.global_basis.y,sign_x*sin(phase*TAU-.7)*.035*walk_weight)
|
||||
rotate_world("Wing."+side,actor.global_basis.z,sign_x*sin(phase*TAU*2-.5)*.022*walk_weight)
|
||||
|
||||
func foot_orientation(f,dt):
|
||||
var body_yaw=actor.global_rotation.y
|
||||
# The planted shoe may pivot, but the ankle must never remain twisted behind
|
||||
# a turning shin. Keep its heading within an anatomical range of the pelvis.
|
||||
var difference=wrapf(f.yaw-body_yaw,-PI,PI)
|
||||
if absf(difference)>deg_to_rad(22):f.yaw=body_yaw+clampf(difference,-deg_to_rad(22),deg_to_rad(22))
|
||||
var yaw=f.yaw if f.grounded else lerp_angle(f.yaw,body_yaw,minf(1,dt*18))
|
||||
if not f.grounded:f.yaw=yaw
|
||||
var orientation=Quaternion(Vector3.UP,yaw)*f.rotation
|
||||
# A high heel has a rigid arch. Lift the whole shoe with the leg rather than
|
||||
# sharply flexing its toe or rolling it onto the outer edge during swing.
|
||||
var roll=sin(clampf((f.last_phase-.5)*2,0,1)*PI)*-.045 if not f.grounded else 0.0
|
||||
return Quaternion(actor.global_basis.x.normalized(),roll)*orientation
|
||||
@@ -0,0 +1,33 @@
|
||||
extends SceneTree
|
||||
var failures=[]
|
||||
func _initialize():call_deferred("run")
|
||||
func check(ok,label):
|
||||
if not ok and not label in failures:failures.append(label);push_error("HEEL REVIEW QA: "+label)
|
||||
func run():
|
||||
var max_error=0.0;var max_twist=0.0;var max_wing=0.0
|
||||
for scale_y in [1.0,.82]:
|
||||
var carrier=Node3D.new();root.add_child(carrier)
|
||||
var actor=preload("res://succubus_actor.gd").new(preload("res://reviews/heels_v01/succubus_heels.glb"));carrier.add_child(actor);actor.scale=Vector3.ONE*scale_y;actor.rotation=Vector3.ZERO
|
||||
actor.gait=preload("res://reviews/heels_v01/review_gait.gd").new();actor.configure(self);actor.set_process(false)
|
||||
for speed in [1.0,2.5,3.3,5.775]:
|
||||
for fps in [30,60]:
|
||||
actor.restore_animation_pose();carrier.position=Vector3.ZERO;actor.rotation=Vector3.ZERO;actor.reset_gait()
|
||||
for frame in range(fps*3):
|
||||
var direction=Vector3.BACK if frame<fps else Vector3.RIGHT
|
||||
carrier.position+=direction*speed/fps;actor.rotation.y=lerp_angle(actor.rotation.y,atan2(direction.x,direction.z),minf(1,10.0/fps));actor._process(1.0/fps)
|
||||
for f in actor.gait.feet:
|
||||
max_error=maxf(max_error,actor.gait.point("foot."+f.side).distance_to(f.target))
|
||||
max_twist=maxf(max_twist,absf(wrapf(f.yaw-actor.global_rotation.y,-PI,PI)))
|
||||
check(actor.gait.point("foot."+f.side).y>=actor.gait.ground_height(f)-.003,"ankles above floor")
|
||||
var wi=actor.skeleton.find_bone("Wing.L");var wing=actor.skeleton.get_bone_pose_rotation(wi)
|
||||
max_wing=maxf(max_wing,wing.angle_to(actor.animation_pose[wi].basis.get_rotation_quaternion()))
|
||||
for frame in range(fps):actor._process(1.0/fps)
|
||||
for f in actor.gait.feet:check(f.grounded,"stopping settles both shoes")
|
||||
check(actor.gait.track_width>.065,"separate paths keep wide heels apart")
|
||||
carrier.queue_free();await process_frame
|
||||
check(max_error<.005,"IK reaches both shoes at both scales and four speeds")
|
||||
check(max_twist<=deg_to_rad(22.01),"ankle heading never twists more than 22 degrees")
|
||||
check(max_wing>.01 and max_wing<.10,"wings sway gently instead of active flapping")
|
||||
print("HEEL REVIEW METRICS ",JSON.stringify({"max_ik_error":max_error,"max_heading_twist_degrees":rad_to_deg(max_twist),"max_wing_pose_angle":max_wing,"failures":failures}))
|
||||
if failures.is_empty():print("ALL HEEL REVIEW TESTS PASSED: heroine/helper scales, four speeds, two frame rates, right-angle turns, stop, reach and ankle heading")
|
||||
quit(0 if failures.is_empty() else 1)
|
||||
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://b40ohu0qjf1kh"
|
||||
path="res://.godot/imported/succubus_heels.glb-400939aa4ad09f07f701f179acd4c508.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://reviews/heels_v01/succubus_heels.glb"
|
||||
dest_files=["res://.godot/imported/succubus_heels.glb-400939aa4ad09f07f701f179acd4c508.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type=""
|
||||
nodes/root_name=""
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={}
|
||||
gltf/naming_version=1
|
||||
gltf/embedded_image_handling=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dwi03n3bee5by"
|
||||
path="res://.godot/imported/succubus_heels_skin_basecolor.png-7e90812c18107351d58bd3920434c30d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "6c375995b2643c42ccbe28db0302aae3"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://reviews/heels_v01/succubus_heels_skin_basecolor.png"
|
||||
dest_files=["res://.godot/imported/succubus_heels_skin_basecolor.png-7e90812c18107351d58bd3920434c30d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.5 MiB |
@@ -9,11 +9,11 @@ var animation_pose: Array[Transform3D]=[]
|
||||
var skeleton: Skeleton3D
|
||||
|
||||
|
||||
func _init():
|
||||
func _init(review_model: PackedScene=null):
|
||||
name="ApprovedSuccubus"
|
||||
set_meta("approved_model","succubus_v01")
|
||||
set_meta("wardrobe_revision","corset_thigh_boots_v02")
|
||||
var model=preload("res://art/succubus/succubus_v02.glb").instantiate()
|
||||
var model=(review_model if review_model else preload("res://art/succubus/succubus_v02.glb")).instantiate()
|
||||
add_child(model)
|
||||
model.scale=Vector3.ONE*1.20
|
||||
for node in model.find_children("*","AnimationPlayer",true,false):
|
||||
|
||||
Reference in New Issue
Block a user