Compare commits
2 Commits
49cf962945
...
e3a85d8dec
| Author | SHA1 | Date | |
|---|---|---|---|
| e3a85d8dec | |||
| b28f15eec8 |
@@ -1,5 +1,13 @@
|
||||
# Succubus model credits
|
||||
|
||||
## Iron maiden v01 (2026-10-28)
|
||||
|
||||
Generated using Meshy from the user-approved project concept art. Resource:
|
||||
multi-image-to-3d; task 01a1845b-d214-7150-8267-02bdbab6abd8. Game geometry,
|
||||
independent hinged doors and smooth interior prepared locally in Blender.
|
||||
Source, reference, provenance and reproduction commands:
|
||||
tools/model_sources/iron_maiden_v01/README.md. PBR textures are retained.
|
||||
|
||||
Anatomical base, morphs, skeleton and weights: MakeHuman Community, CC0.
|
||||
https://www.makehumancommunity.org/about/license.html
|
||||
https://github.com/makehumancommunity/makehuman/tree/master/makehuman/data
|
||||
|
||||
@@ -44,6 +44,10 @@ func setup(game,development):
|
||||
var n=queue.pop_back()
|
||||
for c in n.get_children():queue.append(c)
|
||||
if n is MeshInstance3D and n!=d.flame:
|
||||
if d.device.get_meta("apparatus_model","")=="iron_maiden_v01":
|
||||
var glow=ShaderMaterial.new();glow.shader=preload("res://maiden_heat.gdshader")
|
||||
n.material_overlay=glow;heat_materials.append(glow)
|
||||
continue
|
||||
var mat=ShaderMaterial.new();mat.shader=preload("res://forged.gdshader")
|
||||
if n.material_override is StandardMaterial3D:mat.set_shader_parameter("tint",n.material_override.albedo_color)
|
||||
n.material_override=mat;heat_materials.append(mat)
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://c4pu3eygt6e4y"
|
||||
path="res://.godot/imported/iron_maiden.glb-becc2a15b0689d3fd809e932ed47a928.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/equipment/iron_maiden_v01/iron_maiden.glb"
|
||||
dest_files=["res://.godot/imported/iron_maiden.glb-becc2a15b0689d3fd809e932ed47a928.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=false
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=true
|
||||
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
|
||||
|
After Width: | Height: | Size: 15 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dx0sqfg38ks84"
|
||||
path="res://.godot/imported/iron_maiden_Image_0.jpg-f6ee579cc3c55dbc17f6bfbca1b8dae5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "abc55db7df710ef5a99ca62f55de62bb"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/equipment/iron_maiden_v01/iron_maiden_Image_0.jpg"
|
||||
dest_files=["res://.godot/imported/iron_maiden_Image_0.jpg-f6ee579cc3c55dbc17f6bfbca1b8dae5.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
|
||||
|
After Width: | Height: | Size: 2.3 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://c7u0kec30jl02"
|
||||
path="res://.godot/imported/iron_maiden_Image_1.jpg-d51c196e2c01c86d3db2645e99535ca7.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "7269fcd31a2b122b8c924eadc56822f7"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/equipment/iron_maiden_v01/iron_maiden_Image_1.jpg"
|
||||
dest_files=["res://.godot/imported/iron_maiden_Image_1.jpg-d51c196e2c01c86d3db2645e99535ca7.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
|
||||
|
After Width: | Height: | Size: 11 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dv2tn24mj4s58"
|
||||
path="res://.godot/imported/iron_maiden_Image_2.jpg-da441b4b500293093b6aec87e40a7f71.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "97940641db71c7ef90df2e4c5be83693"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/equipment/iron_maiden_v01/iron_maiden_Image_2.jpg"
|
||||
dest_files=["res://.godot/imported/iron_maiden_Image_2.jpg-da441b4b500293093b6aec87e40a7f71.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
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"source_task": "01a1845b-d214-7150-8267-02bdbab6abd8",
|
||||
"resource": "multi-image-to-3d",
|
||||
"height_m": 3.1,
|
||||
"hinges_blender": {
|
||||
"LeftDoor": [
|
||||
-0.8125486969947815,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"RightDoor": [
|
||||
0.8134756684303284,
|
||||
0.0,
|
||||
0.0
|
||||
]
|
||||
},
|
||||
"door_height": [
|
||||
0.25,
|
||||
2.48
|
||||
],
|
||||
"construction": "Closed source partitioned once; two front quadrants, separate smooth lining, recomputed normals.",
|
||||
"triangles": 92228
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# Active Meshy succubus v02
|
||||
|
||||
Approved painted source: tools/model_sources/meshy_v01/painted_v02/succubus_painted.glb.
|
||||
Meshy parent generation multi-image-to-3d / 01a18440-82d5-70e3-bd4f-720763eae473;
|
||||
paint retexture / 01a18454-81f3-762f-b9b7-57b5e54af4a9. No new paid stages for integration.
|
||||
|
||||
Prepared locally with tools/build_meshy_succubus.py (Blender 5.0). Inputs include
|
||||
existing tools/model_sources/infernal_game.blend and the committed skin ownership mask.
|
||||
Run Blender with --background --python-exit-code 1 --python tools/build_meshy_succubus.py.
|
||||
The optimized mesh keeps original face-corner UVs and PBR maps, receives the existing
|
||||
166-bone rig, Idle/Walk/Whip tracks and the animated whip. Shoes and sculpture contacts
|
||||
are separated. Exposed arm ownership uses the approved skin mask, rather than proximity
|
||||
to a wing; arm geometry stays intact. Coincident shoulder seam weights are equalized
|
||||
and smoothed so the forearm strips and shoulder tears do not reappear on movement.
|
||||
Build checks finite animated coordinates, normalized weights and edge growth <0.12m.
|
||||
Measured results are in manifest.json.
|
||||
|
||||
Runtime: succubus_actor.gd uses this GLB for heroine and helpers. meshy_gait.gd extends
|
||||
the approved grounded gait: smooth 4.8s breathing, relaxed arm/head motion, existing
|
||||
wing/tail secondary motion; idle fades on walking/striking and freezes on pause.
|
||||
Foot anchors remain fixed. No lip-sync added.
|
||||
|
||||
QA: --test-gait PASS including idle movement, grounded idle feet and paused idle,
|
||||
heroine + three helpers, five speeds, turns, strikes, stopping, pause and teleport.
|
||||
Intro test PASS with the model and idle. Local in-game idle/walk/strike captures inspected.
|
||||
The final Windows EXE also passes --test-gait without SCRIPT ERROR/ERROR.
|
||||
|
||||
Windows build was made from a snapshot of 49cf962 plus this task's runtime changes,
|
||||
because equipment/main scripts were concurrently being edited in the working checkout.
|
||||
Those uncommitted equipment changes were not included or overwritten. Build output:
|
||||
Demon_v0.19_Windows/Demon.exe (local only). Full rebuild command after the working tree
|
||||
is ready: tools/build_v19.ps1 with the Godot 4.3 console executable path.
|
||||
|
||||
Generated staging sources, editable checkpoint, frames and logs stay under ignored
|
||||
Demon_v0.19/captures/meshy-integration. Original high-poly painted Meshy source stays
|
||||
in tools/model_sources/meshy_v01/painted_v02 for future texture/geometry edits.
|
||||
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"source_triangles": 1351422,
|
||||
"game_vertices": 80237,
|
||||
"game_triangles": 100405,
|
||||
"bones": 166,
|
||||
"clips": [
|
||||
"Idle",
|
||||
"Walk",
|
||||
"Whip"
|
||||
],
|
||||
"max_nearest_source_distance": 0.27485957741737366,
|
||||
"textures": [
|
||||
[
|
||||
8192,
|
||||
8192
|
||||
],
|
||||
[
|
||||
4096,
|
||||
4096
|
||||
],
|
||||
[
|
||||
4096,
|
||||
4096
|
||||
],
|
||||
[
|
||||
4096,
|
||||
4096
|
||||
],
|
||||
[
|
||||
4096,
|
||||
4096
|
||||
],
|
||||
[
|
||||
4096,
|
||||
4096
|
||||
]
|
||||
],
|
||||
"source_task": "01a18454-81f3-762f-b9b7-57b5e54af4a9",
|
||||
"deformation_checks": {
|
||||
"Idle": {
|
||||
"max_edge_growth_m": 2.2243854526371454e-07
|
||||
},
|
||||
"Walk": {
|
||||
"max_edge_growth_m": 2.385202800929409e-07
|
||||
},
|
||||
"Whip": {
|
||||
"max_edge_growth_m": 0.05535165758474635
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://b4jx0om4p8tqk"
|
||||
path="res://.godot/imported/succubus_game.glb-371cf14b682e8237a655f82acd3ceb7b.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/succubus/meshy_v02/succubus_game.glb"
|
||||
dest_files=["res://.godot/imported/succubus_game.glb-371cf14b682e8237a655f82acd3ceb7b.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
|
||||
|
After Width: | Height: | Size: 21 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://lgtbfpkpxokg"
|
||||
path="res://.godot/imported/succubus_game_Image_0.jpg-cec9ee0b6063a4ed57257d2acf1b244b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "3bda756cc39262596720cd6398cdb83c"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/succubus/meshy_v02/succubus_game_Image_0.jpg"
|
||||
dest_files=["res://.godot/imported/succubus_game_Image_0.jpg-cec9ee0b6063a4ed57257d2acf1b244b.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
|
||||
|
After Width: | Height: | Size: 3.3 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://df5dubp7tpa2d"
|
||||
path="res://.godot/imported/succubus_game_Image_1.jpg-c8a69432c00266d27fb55ac429807b82.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "17b15cb310d64a13af5c439cb855c271"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/succubus/meshy_v02/succubus_game_Image_1.jpg"
|
||||
dest_files=["res://.godot/imported/succubus_game_Image_1.jpg-c8a69432c00266d27fb55ac429807b82.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
|
||||
|
After Width: | Height: | Size: 4.7 MiB |
@@ -0,0 +1,37 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d15nujrupbplf"
|
||||
path="res://.godot/imported/succubus_game_Image_2.jpg-618758e2eaa20e2547d077b691b3c6ef.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
generator_parameters={
|
||||
"md5": "d569dc1c1ba7ab16f41c0115ff63134e"
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/succubus/meshy_v02/succubus_game_Image_2.jpg"
|
||||
dest_files=["res://.godot/imported/succubus_game_Image_2.jpg-618758e2eaa20e2547d077b691b3c6ef.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
|
||||
@@ -24,6 +24,9 @@ func build(game,d):
|
||||
preload("res://new_equipment.gd").new().build(g,d)
|
||||
return
|
||||
var root=d.device
|
||||
if d.selected==3:
|
||||
preload("res://iron_maiden.gd").new().build(g,d)
|
||||
return
|
||||
if d.selected==0:
|
||||
preload("res://pillory.gd").new().build(g,d)
|
||||
return
|
||||
|
||||
@@ -10,6 +10,18 @@ func run(g):
|
||||
var actors=[g.avatar]
|
||||
for h in g.workshop.helpers:actors.append(h.model)
|
||||
for actor in actors:
|
||||
actor.reset_gait()
|
||||
for frame in range(10):actor._process(1.0/60)
|
||||
var hand_start=actor.gait.point("wrist.L")
|
||||
var feet_start=[actor.gait.point("foot.L"),actor.gait.point("foot.R")]
|
||||
var idle_motion=0.0
|
||||
for frame in range(240):
|
||||
actor._process(1.0/60)
|
||||
idle_motion=maxf(idle_motion,actor.gait.point("wrist.L").distance_to(hand_start))
|
||||
check(idle_motion>.004,"idle breathing and relaxed arm motion")
|
||||
for i in range(2):check(actor.gait.point("foot."+actor.gait.feet[i].side).distance_to(feet_start[i])<.003,"idle feet stay grounded")
|
||||
var idle_time=actor.gait.idle_time
|
||||
g.paused=true;actor._process(.05);check(is_equal_approx(actor.gait.idle_time,idle_time),"pause freezes idle animation");g.paused=false
|
||||
for speed in [1.0,2.5,3.3,4.375,5.775]:
|
||||
actor.get_parent().position=Vector3.ZERO;actor.rotation=Vector3.ZERO;actor.striking=false;actor.refresh();actor.animator.advance(0);actor.reset_gait()
|
||||
var max_slide=0.0;var max_error=0.0;var max_lift=0.0;var min_contact=10.0;var planted_frames=0
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
extends RefCounted
|
||||
# Meshy shell is split locally at the actual hinge plane, not from the open concept.
|
||||
const MODEL=preload("res://art/equipment/iron_maiden_v01/iron_maiden.glb")
|
||||
func build(g,d):
|
||||
var root=d.device
|
||||
var model=MODEL.instantiate();root.add_child(model)
|
||||
root.set_meta("apparatus_model","iron_maiden_v01")
|
||||
d.door=model.find_child("LeftDoor",true,false)
|
||||
d.second_door=model.find_child("RightDoor",true,false)
|
||||
assert(d.door!=null and d.second_door!=null,"Iron maiden requires two independent hinge nodes")
|
||||
d.door.rotation.y=-1.8;d.second_door.rotation.y=1.8
|
||||
d.flame=g.ball(root,Vector3(0,.20,0),Vector3(1.15,.25,.85),Color("ff8735"))
|
||||
d.flame.material_override=g.mat(Color("ff8735"),true);d.flame.hide()
|
||||
@@ -0,0 +1,49 @@
|
||||
extends RefCounted
|
||||
var failures=0
|
||||
func check(ok,label):
|
||||
if not ok:failures+=1;push_error("IRON MAIDEN QA: "+label)
|
||||
func shot(g,name):
|
||||
await RenderingServer.frame_post_draw
|
||||
g.get_viewport().get_texture().get_image().save_png("res://captures/iron-maiden/"+name+".png")
|
||||
func run(g):
|
||||
await g.get_tree().create_timer(.3).timeout
|
||||
g.start_game();g.set_process(false);g.reset_shift();g.game_started=true;g.paused=false
|
||||
g.hud.hide();g.menu.show_page("")
|
||||
DirAccess.make_dir_recursive_absolute("res://captures/iron-maiden")
|
||||
var w=g.workshop;var d=w.add_station(3,Vector3(3,0,0))
|
||||
check(d.device.get_meta("apparatus_model","")=="iron_maiden_v01","Meshy model selected")
|
||||
check(d.door!=d.second_door and d.door.get_child_count()>0 and d.second_door.get_child_count()>0,"independent populated doors")
|
||||
check(d.door.position.x<0 and d.second_door.position.x>0,"opposite side hinges")
|
||||
var surfaces=d.device.find_children("*","MeshInstance3D",true,false)
|
||||
var textured=0
|
||||
for mesh in surfaces:
|
||||
if mesh==d.flame:continue
|
||||
for i in range(mesh.mesh.get_surface_count()):
|
||||
var mat=mesh.mesh.surface_get_material(i)
|
||||
if mat is StandardMaterial3D and mat.albedo_texture!=null:textured+=1
|
||||
check(mesh.material_override==null,"original surface material preserved")
|
||||
check(mesh.material_overlay is ShaderMaterial,"independent heat overlay")
|
||||
check(textured>0,"Meshy textures present")
|
||||
g.camera.position=Vector3(5.8,3.5,3);g.camera.look_at(d.device.position+Vector3(0,1.5,0));g.camera.size=4.5
|
||||
await shot(g,"open")
|
||||
for k in range(19):
|
||||
d.door.rotation.y=-1.8+float(k)*.1;d.second_door.rotation.y=1.8-float(k)*.1
|
||||
check(d.door.transform.is_finite() and d.second_door.transform.is_finite(),"finite hinge sweep")
|
||||
if k==9:await shot(g,"half")
|
||||
check(absf(d.door.rotation.y)<.0001 and absf(d.second_door.rotation.y)<.0001,"both doors reach closed pose")
|
||||
await shot(g,"closed")
|
||||
# Exercise the actual station state machine and heat without replacing PBR.
|
||||
w.unlock=3;g.uid=0;w.spawn();var s=g.souls.back();s.required=[3];s.entering=false;s.entry_time=1
|
||||
g.set_soul_reveal(s.visual,1);w.attach(s,0);w.step_station(d,.9,false)
|
||||
for k in range(35):w.step_station(d,.1,true)
|
||||
check(d.stage==1,"station advances through closure into heat")
|
||||
check(d.motion.heat>0,"heat advances")
|
||||
await shot(g,"heated")
|
||||
for k in range(100):
|
||||
w.step_station(d,.1,true)
|
||||
if d.soul<0:break
|
||||
check(d.soul<0 and g.done==1,"completion releases soul and rewards once")
|
||||
for k in range(40):w.step_station(d,.1,false)
|
||||
check(is_equal_approx(d.door.rotation.y,-1.8) and is_equal_approx(d.second_door.rotation.y,1.8),"doors reopen after cooldown")
|
||||
print("IRON MAIDEN QA ","PASSED" if failures==0 else "FAILED",": textured model, hinges, sweep, close/heat/reward/reopen")
|
||||
g.get_tree().quit(1 if failures else 0)
|
||||
@@ -0,0 +1,10 @@
|
||||
shader_type spatial;
|
||||
render_mode blend_add, depth_draw_never, unshaded, shadows_disabled;
|
||||
uniform float heat=0.0;
|
||||
varying float model_height;
|
||||
void vertex(){ model_height=VERTEX.y; }
|
||||
void fragment(){
|
||||
float warmth=heat*(.35+.65*(1.0-smoothstep(0.0,2.8,model_height)));
|
||||
ALBEDO=vec3(1.0,.07,.003)*warmth*warmth*.22;
|
||||
ALPHA=heat*.45;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ var quips = ["Ещё один. Наверху сегодня скидки на
|
||||
|
||||
func _ready():
|
||||
var args=OS.get_cmdline_user_args()
|
||||
test_mode="--test-intro" in args or "--test-room-decor" in args or "--test-camera-controls" in args or "--test-rubies" in args or "--test-runtime-burn" in args or "--test-single-punishment" in args or "--test-expansion" in args or "--test-imps" in args or "--test-flight-camera" in args or "--test-maintenance" in args or "--test-castle" in args or "--test-building" in args or "--test-workflow" in args or "--test-roster" in args or "--test-priority" in args or "--test-mesh" in args or "--test-economy" in args or "--test-posture" in args or "--test-gait" in args or "--test-visuals" in args or "--test-mode" in args or "--test-exit" in args or "--test-ui" in args or "--test-audio" in args or "--test-sentences" in args or "--test-hud" in args
|
||||
test_mode="--test-iron-maiden" in args or "--test-intro" in args or "--test-room-decor" in args or "--test-camera-controls" in args or "--test-rubies" in args or "--test-runtime-burn" in args or "--test-single-punishment" in args or "--test-expansion" in args or "--test-imps" in args or "--test-flight-camera" in args or "--test-maintenance" in args or "--test-castle" in args or "--test-building" in args or "--test-workflow" in args or "--test-roster" in args or "--test-priority" in args or "--test-mesh" in args or "--test-economy" in args or "--test-posture" in args or "--test-gait" in args or "--test-visuals" in args or "--test-mode" in args or "--test-exit" in args or "--test-ui" in args or "--test-audio" in args or "--test-sentences" in args or "--test-hud" in args
|
||||
capture_mode="--capture-workflow" in args or "--capture-roster" in args or "--capture-economy" in args or "--capture-posture" in args or "--capture-gait" in args or "--capture" in args or "--capture-workshop" in args
|
||||
if FileAccess.file_exists("res://build_info.json"):
|
||||
var stamp=JSON.parse_string(FileAccess.get_file_as_string("res://build_info.json"))
|
||||
@@ -144,7 +144,8 @@ func _ready():
|
||||
say("Первый день. Последняя надежда на отпуск.")
|
||||
refresh_ui()
|
||||
if automatic: build_auto_arm()
|
||||
if "--test-intro" in args:call_deferred("run_intro_tests")
|
||||
if "--test-iron-maiden" in args:call_deferred("run_iron_maiden_tests")
|
||||
elif "--test-intro" in args:call_deferred("run_intro_tests")
|
||||
elif "--test-exit" in args: call_deferred("test_exit")
|
||||
elif "--test-audio" in args: call_deferred("run_audio_tests")
|
||||
elif "--test-ui" in args: call_deferred("run_ui_tests")
|
||||
@@ -1011,3 +1012,6 @@ func run_room_decor_tests():
|
||||
|
||||
func run_intro_tests():
|
||||
await preload("res://intro_tests.gd").new().run(self)
|
||||
|
||||
func run_iron_maiden_tests():
|
||||
await preload("res://iron_maiden_tests.gd").new().run(self)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
extends "res://infernal_gait.gd"
|
||||
# Grounded idle breathing layered after the approved locomotion.
|
||||
var idle_time=0.0
|
||||
var idle_weight=0.0
|
||||
|
||||
func update(dt):
|
||||
super.update(dt)
|
||||
idle_time+=dt
|
||||
var target=(1.0-walk_weight) if not actor.striking else 0.0
|
||||
idle_weight=move_toward(idle_weight,target,dt*3.0)
|
||||
var breath=sin(idle_time*TAU/4.8)
|
||||
var drift=sin(idle_time*TAU/7.2)
|
||||
rotate_world("spine02",actor.global_basis.x,breath*.010*idle_weight)
|
||||
rotate_world("spine01",actor.global_basis.z,drift*.006*idle_weight)
|
||||
rotate_world("head",actor.global_basis.x,-breath*.006*idle_weight)
|
||||
rotate_world("head",actor.global_basis.y,drift*.012*idle_weight)
|
||||
for side in ["L","R"]:
|
||||
var sign_x=1.0 if side=="L" else -1.0
|
||||
rotate_world("upperarm01."+side,actor.global_basis.z,-sign_x*(.075+breath*.007)*idle_weight)
|
||||
rotate_world("lowerarm01."+side,actor.global_basis.x,sin(idle_time*TAU/6.4+sign_x*.4)*.010*idle_weight)
|
||||
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
@@ -5,16 +5,16 @@ var cinematic_idle=false
|
||||
var walking=false
|
||||
var striking=false
|
||||
var clips={}
|
||||
var gait=preload("res://infernal_gait.gd").new()
|
||||
var gait=preload("res://meshy_gait.gd").new()
|
||||
var animation_pose: Array[Transform3D]=[]
|
||||
var skeleton: Skeleton3D
|
||||
|
||||
|
||||
func _init(review_model: PackedScene=null):
|
||||
name="ApprovedSuccubus"
|
||||
set_meta("approved_model","infernal_v01")
|
||||
set_meta("wardrobe_revision","infernal_sculpt_painted_v01")
|
||||
var model=(review_model if review_model else preload("res://art/succubus/infernal_v01/infernal_game.glb")).instantiate()
|
||||
set_meta("approved_model","meshy_v02")
|
||||
set_meta("wardrobe_revision","meshy_reference_painted_v02")
|
||||
var model=(review_model if review_model else preload("res://art/succubus/meshy_v02/succubus_game.glb")).instantiate()
|
||||
add_child(model)
|
||||
model.scale=Vector3.ONE*1.20
|
||||
for node in model.find_children("*","AnimationPlayer",true,false):
|
||||
|
||||
@@ -15,6 +15,34 @@
|
||||
|
||||
## Последние выполненные задачи
|
||||
|
||||
- **Актуальная суккуба: Meshy v02 включена в игру и Windows-билд.**
|
||||
Красная кожа, чёрный комплект/волосы/крылья; исправлены полосы на руках,
|
||||
добавлен плавный айдл. Подробности — в последнем разделе этого handoff
|
||||
и `art/succubus/meshy_v02/README.md`. Предыдущая Infernal сохранена.
|
||||
|
||||
- **Железная дева Meshy v01 (2026-10-28):** по утверждённому арту создана и
|
||||
включена вместо процедурной модели. `art/equipment/iron_maiden_v01/`:
|
||||
GLB, три PBR-карты 4K, manifest и import sidecars. Высота 3,10 м, 92 228
|
||||
треугольников, отдельные Body / LeftDoor / RightDoor и гладкая внутренняя
|
||||
обшивка без шипов. Створки получены из закрытого корпуса, а не ошибочного
|
||||
открытого ракурса арта; нулевые углы собирают исходный закрытый силуэт.
|
||||
`iron_maiden.gd` подключает модель через equipment.gd. В apparatus_motion
|
||||
нагрев новой модели использует material_overlay, сохраняя PBR-текстуры.
|
||||
- Исходник Meshy: multi-image-to-3d `01a1845b-d214-7150-8267-02bdbab6abd8`,
|
||||
фактический расход 30 кредитов, одна генерация. `tools/model_sources/
|
||||
iron_maiden_v01/` содержит исходный GLB, утверждённый арт, превью и Blender.
|
||||
Воспроизводимые команды: build_iron_maiden.py / review_iron_maiden.py.
|
||||
Ранний локальный вариант выглядел расплавленным: устранены неверные
|
||||
custom normals после разрезания и Solidify мелких декоративных деталей.
|
||||
Окончательный вариант пересчитывает нормали и использует отдельную обшивку.
|
||||
- Проверки девы: Godot 4.3 import PASS без ошибок; `--test-iron-maiden` PASS:
|
||||
PBR, две независимые петли, 19 промежуточных положений, закрытие/нагрев/
|
||||
награда/повторное открытие. `--test-single-punishment` PASS для всех шести
|
||||
устройств, мужской/женской души, сгорания и однократной награды. Рендеры
|
||||
открытого/промежуточного/закрытого состояния и игровые кадры просмотрены.
|
||||
Сохранённый обзор: `reviews/iron_maiden_v01/preview.png` и `in-game.png`.
|
||||
Изменены исходники; Windows EXE не пересобирался.
|
||||
|
||||
- **Вступление (готово):** новая смена запускает облёт главной героини.
|
||||
Через 2 секунды проигрывается целиком пользовательская запись Serafina
|
||||
(`audio/intro_serafina.mp3`, исходный ElevenLabs MP3 от 2026-10-28 18:59:40,
|
||||
@@ -307,3 +335,40 @@ Retexture `01a18454-81f3-762f-b9b7-57b5e54af4a9`, родитель — преж
|
||||
GLB структурно проверен: прежние 1 351 422 треугольника, скелета/анимаций нет.
|
||||
В runtime не включён, игровые тесты не повторялись. Подробности и путь
|
||||
Meshy-проекта — в README рядом с моделью; временные ссылки не публикуются.
|
||||
|
||||
|
||||
## Meshy: включение в билд, руки и айдл, 2026-10-28
|
||||
|
||||
По просьбе пользователя покрашенная Meshy-суккуба включена для героини и помощниц:
|
||||
`art/succubus/meshy_v02/succubus_game.glb`, `succubus_actor.gd`, `meshy_gait.gd`.
|
||||
Сетка локально уменьшена с 1 351 422 до 100405 треугольников;
|
||||
сохранены UV/PBR и карта 8K, перенесены 166 костей, Idle/Walk/Whip и плеть.
|
||||
Новых платных задач Meshy нет. Воспроизводимая подготовка —
|
||||
`tools/build_meshy_succubus.py`; исходный painted GLB, старый Infernal BLEND
|
||||
и производная маска кожи сохранены в tools/model_sources.
|
||||
|
||||
Исправлен видимый графический дефект рук: часть предплечья ошибочно получала
|
||||
веса крыла, а частичная коррекция позы создавала раздвоение. Теперь форма рук
|
||||
цельная, назначены анатомические веса; совпадающие вершины плечевого шва
|
||||
получают одинаковые сглаженные веса. Разделены печатные контакты ног/хвоста.
|
||||
Максимальный рост ребра в пробах удара 0.05535 м, веса нормализованы.
|
||||
Айдл: дыхание 4,8 с, мягкие движения рук/головы/плеч, крылья и хвост;
|
||||
плавное затухание при ходьбе и ударе, пауза замораживает, стопы закреплены.
|
||||
|
||||
Проверки: повторный импорт PASS без ошибок; --test-gait PASS (героиня и
|
||||
три помощницы, пять скоростей, повороты, остановки, удар, пауза, телепорт;
|
||||
добавлены проверки движения айдла, неподвижных стоп и заморозки времени).
|
||||
--test-intro PASS, полная запись, 2+2 с, блокировка ввода и возврат камеры.
|
||||
Просмотрены крупные планы idle/walk/whip в игре после исправлений.
|
||||
Собран `Demon_v0.19_Windows/Demon.exe`; сам EXE проходит --test-gait,
|
||||
запущен для пользователя (PID 51680, лог captures/meshy-running.log).
|
||||
|
||||
Важная особенность текущего запуска: во время работы другой чат изменял
|
||||
main.gd/equipment.gd и добавлял iron_maiden.gd, ссылающийся на ещё не готовый
|
||||
ресурс. Их незавершённое состояние не перезаписывалось и не коммитилось
|
||||
вместе с этой задачей. Для проверок/EXE использован изолированный снимок
|
||||
49cf962 + изменения суккубы/айдла в captures/meshy-integration/build_source.
|
||||
Первый импорт снимка сообщал о ещё не импортированных шрифтах и старом LOD;
|
||||
повторный импорт и игровые/EXE-проверки проходят без SCRIPT ERROR/ERROR.
|
||||
После завершения параллельной работы общий EXE следует пересобрать из checkout.
|
||||
Билд и технические кадры/логи локальные; исходники и игровой ассет отправляются в Git.
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
"""Prepare the approved Meshy cabinet with independently hinged, matching doors.
|
||||
|
||||
Blender 5: blender -b --python tools/build_iron_maiden.py
|
||||
The closed source is the single source of truth for both door silhouettes.
|
||||
"""
|
||||
import bpy, bmesh, json, math
|
||||
from pathlib import Path
|
||||
from mathutils import Vector
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
SOURCE = ROOT / 'tools/model_sources/iron_maiden_v01/source.glb'
|
||||
OUT = ROOT / 'Demon_v0.19/art/equipment/iron_maiden_v01'
|
||||
OUT.mkdir(parents=True, exist_ok=True)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
bpy.ops.import_scene.gltf(filepath=str(SOURCE))
|
||||
meshes = [o for o in bpy.context.scene.objects if o.type == 'MESH']
|
||||
bpy.ops.object.select_all(action='DESELECT')
|
||||
for obj in meshes:
|
||||
obj.select_set(True)
|
||||
bpy.context.view_layer.objects.active = meshes[0]
|
||||
bpy.ops.object.convert(target='MESH')
|
||||
bpy.ops.object.join()
|
||||
source = bpy.context.object
|
||||
bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
|
||||
verts = [v.co for v in source.data.vertices]
|
||||
lo = Vector(tuple(min(v[i] for v in verts) for i in range(3)))
|
||||
hi = Vector(tuple(max(v[i] for v in verts) for i in range(3)))
|
||||
factor = 3.10 / (hi.z - lo.z)
|
||||
center = (lo + hi) * .5
|
||||
for v in source.data.vertices:
|
||||
v.co = Vector(((v.co.x-center.x)*factor, (v.co.y-center.y)*factor, (v.co.z-lo.z)*factor))
|
||||
if len(source.data.polygons)>80000:
|
||||
decimate=source.modifiers.new('Game triangle budget','DECIMATE')
|
||||
decimate.ratio=80000/len(source.data.polygons)
|
||||
bpy.ops.object.modifier_apply(modifier=decimate.name)
|
||||
|
||||
# Blender -Y is Godot +Z (the existing station approach direction).
|
||||
# Cut the closed surface once. Each triangle then belongs to exactly one part.
|
||||
bm = bmesh.new(); bm.from_mesh(source.data)
|
||||
door_bottom, door_top, hinge_y = .25, 2.48, 0.0
|
||||
for point, normal in [((0,0,door_bottom),(0,0,1)),((0,0,door_top),(0,0,1)),((0,hinge_y,0),(0,1,0)),((0,0,0),(1,0,0))]:
|
||||
bmesh.ops.bisect_plane(bm, geom=list(bm.verts)+list(bm.edges)+list(bm.faces),
|
||||
dist=1e-6, plane_co=point, plane_no=normal)
|
||||
bm.to_mesh(source.data);bm.free()
|
||||
|
||||
def group_for(face):
|
||||
c=face.calc_center_median()
|
||||
if door_bottom+1e-5 < c.z < door_top-1e-5 and c.y < hinge_y-1e-5:
|
||||
return 'LeftDoor' if c.x < 0 else 'RightDoor'
|
||||
return 'Body'
|
||||
|
||||
parts={}
|
||||
for name in ['Body','LeftDoor','RightDoor']:
|
||||
mesh=source.data.copy();bm=bmesh.new();bm.from_mesh(mesh)
|
||||
discard=[f for f in bm.faces if group_for(f)!=name]
|
||||
bmesh.ops.delete(bm,geom=discard,context='FACES')
|
||||
loose=[v for v in bm.verts if not v.link_faces]
|
||||
bmesh.ops.delete(bm,geom=loose,context='VERTS')
|
||||
bm.to_mesh(mesh);bm.free();mesh.update()
|
||||
obj=bpy.data.objects.new(name+'Surface',mesh);bpy.context.collection.objects.link(obj)
|
||||
parts[name]=obj
|
||||
bpy.data.objects.remove(source,do_unlink=True)
|
||||
|
||||
# Separate smooth lining preserves the source exterior and central closing seam.
|
||||
inner=bpy.data.materials.new('Smooth interior iron');inner.diffuse_color=(.055,.065,.075,1)
|
||||
inner.use_nodes=True
|
||||
inner.node_tree.nodes.clear()
|
||||
principled=inner.node_tree.nodes.new('ShaderNodeBsdfPrincipled')
|
||||
material_output=inner.node_tree.nodes.new('ShaderNodeOutputMaterial')
|
||||
inner.node_tree.links.new(principled.outputs['BSDF'],material_output.inputs['Surface'])
|
||||
principled.inputs['Base Color'].default_value=(.055,.065,.075,1)
|
||||
principled.inputs['Metallic'].default_value=.78;principled.inputs['Roughness'].default_value=.50
|
||||
for name,obj in parts.items():
|
||||
custom=obj.data.attributes.get('custom_normal')
|
||||
if custom:obj.data.attributes.remove(custom)
|
||||
for polygon in obj.data.polygons:polygon.use_smooth=True
|
||||
|
||||
# Do not solidify the source's tiny rivets and decorative folds: inward offsets
|
||||
# on those details produce self-intersections. A separate smooth lining defines
|
||||
# the cavity, while the original outer surfaces stay untouched.
|
||||
profile=[(.25,.73,.54),(.5,.75,.56),(1.0,.75,.56),(1.7,.75,.56),(2.15,.72,.54),(2.35,.55,.40),(2.43,.35,.25)]
|
||||
liners={}
|
||||
for name,start,end in [('Body',0,math.pi),('LeftDoor',math.pi,math.pi*1.5),('RightDoor',math.pi*1.5,math.pi*2)]:
|
||||
count=48 if name=='Body' else 24
|
||||
vertices=[];faces=[]
|
||||
for z,rx,ry in profile:
|
||||
for k in range(count+1):
|
||||
a=start+(end-start)*k/count
|
||||
vertices.append((math.cos(a)*rx*.86,math.sin(a)*ry*.70,z))
|
||||
for j in range(len(profile)-1):
|
||||
for k in range(count):
|
||||
a=j*(count+1)+k;b=a+count+1
|
||||
faces.append((a,b,b+1,a+1))
|
||||
data=bpy.data.meshes.new(name+'Lining');data.from_pydata(vertices,[],faces);data.materials.append(inner)
|
||||
liner=bpy.data.objects.new(name+'Lining',data);bpy.context.collection.objects.link(liner)
|
||||
for p in data.polygons:p.use_smooth=True
|
||||
liners[name]=liner
|
||||
|
||||
hinges={}
|
||||
for name,sign in [('LeftDoor',-1),('RightDoor',1)]:
|
||||
obj=parts[name]
|
||||
edge=[v.co.x for v in obj.data.vertices if abs(v.co.y-hinge_y)<.045 and .45<v.co.z<2.20]
|
||||
hx=(min(edge) if sign<0 else max(edge)) if edge else sign*.72
|
||||
pivot=Vector((hx,hinge_y,0))
|
||||
empty=bpy.data.objects.new(name,None);bpy.context.collection.objects.link(empty);empty.location=pivot
|
||||
for v in obj.data.vertices:v.co-=pivot
|
||||
obj.parent=empty;obj.location=(0,0,0)
|
||||
liner=liners[name]
|
||||
for v in liner.data.vertices:v.co-=pivot
|
||||
liner.parent=empty
|
||||
hinges[name]=list(pivot)
|
||||
parts['Body'].name='Body'
|
||||
|
||||
# Embedded glTF images already have packed_file. Repacking those from their
|
||||
# virtual filenames can discard the embedded bytes in Blender 5.
|
||||
for image in bpy.data.images:
|
||||
if image.source=='FILE' and not image.packed_file and image.size[0]>0:image.pack()
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(ROOT/'tools/model_sources/iron_maiden_v01/iron_maiden.blend'))
|
||||
bpy.ops.export_scene.gltf(filepath=str(OUT/'iron_maiden.glb'),export_format='GLB',export_yup=True,export_animations=False)
|
||||
for obj in parts.values():obj.data.calc_loop_triangles()
|
||||
manifest={'source_task':'01a1845b-d214-7150-8267-02bdbab6abd8','resource':'multi-image-to-3d',
|
||||
'height_m':3.10,'hinges_blender':hinges,'door_height':[door_bottom,door_top],
|
||||
'construction':'Closed source partitioned once; two front quadrants, separate smooth lining, recomputed normals.',
|
||||
'triangles':sum(len(o.data.loop_triangles) for o in parts.values())+sum(len(o.data.polygons)*2 for o in liners.values())}
|
||||
(OUT/'manifest.json').write_text(json.dumps(manifest,indent=2),encoding='utf-8')
|
||||
print('IRON_MAIDEN_EXPORTED',json.dumps(manifest))
|
||||
@@ -0,0 +1,186 @@
|
||||
"""Adapt approved Meshy paint to the existing Infernal rig without paid services.
|
||||
Blender 5.0: --background --python-exit-code 1 --python tools/build_meshy_succubus.py
|
||||
"""
|
||||
import bpy,bmesh,json,math
|
||||
from pathlib import Path
|
||||
from mathutils import Vector
|
||||
from mathutils.kdtree import KDTree
|
||||
import numpy as np
|
||||
ROOT=Path(__file__).resolve().parent.parent
|
||||
OUT=ROOT/'Demon_v0.19/art/succubus/meshy_v02';OUT.mkdir(parents=True,exist_ok=True)
|
||||
QA=ROOT/'Demon_v0.19/captures/meshy-integration';QA.mkdir(parents=True,exist_ok=True)
|
||||
def log(*v):print('MESHY_GAME',*v,flush=True)
|
||||
def active(o):
|
||||
bpy.ops.object.select_all(action='DESELECT');o.select_set(True);bpy.context.view_layer.objects.active=o
|
||||
bpy.ops.wm.open_mainfile(filepath=str(ROOT/'tools/model_sources/infernal_game.blend'))
|
||||
scene=bpy.context.scene;source=bpy.data.objects['Infernal_Game_Mesh'];rig=bpy.data.objects['INFERNAL_RIG']
|
||||
rig.animation_data.action=None
|
||||
for tr in rig.animation_data.nla_tracks:tr.mute=True
|
||||
for bone in rig.pose.bones:bone.matrix_basis.identity()
|
||||
bpy.context.view_layer.update()
|
||||
regions=source.data.attributes['SemanticRegion'].data
|
||||
samples=[v.co.copy() for v in source.data.vertices]
|
||||
source_weights=[[(source.vertex_groups[g.group].name,g.weight) for g in v.groups if g.weight>1e-6] for v in source.data.vertices]
|
||||
tree=KDTree(len(samples))
|
||||
for i,v in enumerate(samples):tree.insert(v,i)
|
||||
tree.balance()
|
||||
parts={}
|
||||
for role in range(6):
|
||||
ids=[i for i in range(len(samples)) if regions[i].value==role];kd=KDTree(len(ids))
|
||||
for i in ids:kd.insert(samples[i],i)
|
||||
kd.balance();parts[role]=kd
|
||||
leg_trees={}
|
||||
for sign in [-1,1]:
|
||||
ids=[i for i in range(len(samples)) if regions[i].value==0 and samples[i].x*sign>0 and any(w>.01 and not n.endswith('.R' if sign>0 else '.L') for n,w in source_weights[i])]
|
||||
kd=KDTree(len(ids))
|
||||
for i in ids:kd.insert(samples[i],i)
|
||||
kd.balance();leg_trees[sign]=kd
|
||||
bpy.ops.import_scene.gltf(filepath=str(ROOT/'tools/model_sources/meshy_v01/painted_v02/succubus_painted.glb'))
|
||||
obj=next(o for o in bpy.context.selected_objects if o.type=='MESH');obj.name='Meshy_Succubus_Game'
|
||||
active(obj);bpy.ops.object.transform_apply(location=True,rotation=True,scale=True)
|
||||
lo=min(v.co.z for v in obj.data.vertices);hi=max(v.co.z for v in obj.data.vertices);scale=2.050177/(hi-lo)
|
||||
for v in obj.data.vertices:v.co=Vector((v.co.x*scale,v.co.y*scale,(v.co.z-lo)*scale))
|
||||
modifier=obj.modifiers.new('Realtime topology preserving UV','DECIMATE');modifier.ratio=100000/1351422;modifier.use_collapse_triangulate=True
|
||||
bpy.ops.object.modifier_apply(modifier=modifier.name)
|
||||
# Remove any fused shoe contact, retaining interpolated UVs on the cut.
|
||||
bm=bmesh.new();bm.from_mesh(obj.data)
|
||||
faces=[f for f in bm.faces if all(v.co.z<.98 for v in f.verts)]
|
||||
geom=set(faces)
|
||||
for f in faces:geom.update(f.verts);geom.update(f.edges)
|
||||
result=bmesh.ops.bisect_plane(bm,geom=list(geom),plane_co=(0,0,0),plane_no=(1,0,0),dist=1e-7)
|
||||
cut=[e for e in result['geom_cut'] if isinstance(e,bmesh.types.BMEdge)]
|
||||
if cut:bmesh.ops.split_edges(bm,edges=cut)
|
||||
for sign in [-1,1]:
|
||||
boundary=[e for e in bm.edges if e.is_boundary and all(abs(v.co.x)<1e-6 and v.co.z<.98 for v in e.verts) and e.link_faces and e.link_faces[0].calc_center_median().x*sign>0]
|
||||
if boundary:bmesh.ops.holes_fill(bm,edges=boundary,sides=0)
|
||||
bmesh.ops.triangulate(bm,faces=list(bm.faces));bm.to_mesh(obj.data);bm.free();obj.data.update()
|
||||
# Establish surface ownership before posing, so wings cannot receive hand weights.
|
||||
roles=[];distances=[]
|
||||
# Classify exposed arm surfaces using the approved red skin texture, including
|
||||
# the rear of the forearm; spatial nearest-source alone confuses these with wings.
|
||||
mask_data=np.load(ROOT/'tools/model_sources/meshy_v01/painted_v02/skin_mask.npz')
|
||||
image=mask_data['skin'];uv=obj.data.uv_layers.active.data
|
||||
skin=np.zeros(len(obj.data.vertices),dtype=bool)
|
||||
for loop in obj.data.loops:
|
||||
u,v=uv[loop.index].uv
|
||||
if image[int((1-v)%1*(image.shape[0]-1)),int(u%1*(image.shape[1]-1))]:skin[loop.vertex_index]=True
|
||||
arm_ids=[]
|
||||
for v in obj.data.vertices:
|
||||
x,y,z=v.co;minimum=float(np.interp(z,[.75,1.0,1.25,1.42,1.58],[.25,.21,.18,.15,.14]))
|
||||
if skin[v.index] and .72<z<1.58 and abs(x)>minimum and y<.13:arm_ids.append(v.index)
|
||||
arm_tree=KDTree(len(arm_ids))
|
||||
for i in arm_ids:arm_tree.insert(obj.data.vertices[i].co,i)
|
||||
arm_tree.balance()
|
||||
for v in obj.data.vertices:
|
||||
p=v.co;_,index,d=tree.find(p);role=regions[index].value
|
||||
_,_,arm_distance=arm_tree.find(p)
|
||||
if arm_distance<.018:role=4 if p.x>0 else 5
|
||||
elif role in [4,5]:role=0 if abs(p.x)<.20 else (1 if p.x>0 else 2)
|
||||
roles.append(role);distances.append(d)
|
||||
log('red arm seeds',len(arm_ids),'arm surface vertices',sum(r in [4,5] for r in roles))
|
||||
# Duplicate vertices per surface owner while copying every face-corner UV.
|
||||
old=obj.data;vertices=[];faces=[];mapping={};new_roles=[];uvs=[]
|
||||
for face in old.polygons:
|
||||
labels=[roles[i] for i in face.vertices];role=max(set(labels),key=labels.count);indices=[]
|
||||
for index in face.vertices:
|
||||
key=(role,index)
|
||||
if key not in mapping:
|
||||
mapping[key]=len(vertices);vertices.append(tuple(old.vertices[index].co));new_roles.append(role)
|
||||
indices.append(mapping[key])
|
||||
faces.append(indices)
|
||||
if old.uv_layers.active:uvs.extend([tuple(old.uv_layers.active.data[i].uv) for i in face.loop_indices])
|
||||
mesh=bpy.data.meshes.new('Meshy separated anatomical surfaces');mesh.from_pydata(vertices,[],faces);mesh.update()
|
||||
for material in old.materials:mesh.materials.append(material)
|
||||
if uvs:
|
||||
uv=mesh.uv_layers.new(name='UVMap')
|
||||
for entry,value in zip(uv.data,uvs):entry.uv=value
|
||||
obj.data=mesh;roles=new_roles
|
||||
for bone in rig.data.bones:obj.vertex_groups.new(name=bone.name)
|
||||
for face in mesh.polygons:assert len({roles[i] for i in face.vertices})==1
|
||||
for v,role in zip(obj.data.vertices,roles):
|
||||
p=v.co.copy();x,y,z=p;sign=1 if x>0 else -1
|
||||
if abs(x)<.00001 and z<.95:
|
||||
face_x=sum(f.center.x for f in obj.data.polygons if v.index in f.vertices)
|
||||
sign=1 if face_x>=0 else -1
|
||||
x=sign*.0003;p.x=x;v.co=p
|
||||
if role in [4,5] and z<1.54:
|
||||
old_x=float(np.interp(z,[.81,.93,1.09,1.25,1.42,1.54],[.275,.257,.228,.194,.170,.153]))
|
||||
new_x=float(np.interp(z,[.81,.95,1.10,1.25,1.42,1.54],[.38,.355,.31,.265,.205,.16]))
|
||||
p.x-=sign*(new_x-old_x) # Query only: never move a subset of the visible arm.
|
||||
if role in [4,5]:
|
||||
side='L' if role==4 else 'R'
|
||||
wrist=float(np.clip((1.02-z)/.08,0,1));upper=float(np.clip((z-1.21)/.12,0,1));shoulder=float(np.clip((z-1.47)/.09,0,1))
|
||||
weights={'wrist.'+side:wrist,'lowerarm01.'+side:(1-wrist)*(1-upper),'upperarm01.'+side:upper*(1-shoulder),'spine02':upper*shoulder}
|
||||
total=sum(weights.values());weights={n:w/total for n,w in weights.items() if w>1e-6}
|
||||
elif role==0 and z<.18:
|
||||
weights={'foot.L' if sign>0 else 'foot.R':1.0}
|
||||
else:
|
||||
weights={}
|
||||
kd=leg_trees[sign] if role==0 and z<.95 else parts[role]
|
||||
for _,index,distance in kd.find_n(p,8):
|
||||
factor=1/max(.002,distance)**2
|
||||
for name,w in source_weights[index]:
|
||||
if role==0 and z<.95 and name.endswith('.R' if sign>0 else '.L'):continue
|
||||
weights[name]=weights.get(name,0)+w*factor
|
||||
pairs=sorted(weights.items(),key=lambda kv:-kv[1])[:4];total=sum(w for _,w in pairs);weights={n:w/total for n,w in pairs}
|
||||
assert weights and all(math.isfinite(w) for w in weights.values()),(v.index,tuple(p),role)
|
||||
for n,w in weights.items():obj.vertex_groups[n].add([v.index],w,'REPLACE')
|
||||
# Keep coincident shoulder seam vertices on the same continuous skin field.
|
||||
names=[g.name for g in obj.vertex_groups];name_to_index={n:i for i,n in enumerate(names)}
|
||||
weights_array=np.zeros((len(obj.data.vertices),len(names)),dtype=np.float32)
|
||||
coords=np.array([tuple(v.co) for v in obj.data.vertices]);shoulder=(np.abs(coords[:,0])>.105)&(np.abs(coords[:,0])<.34)&(coords[:,2]>1.34)&(coords[:,2]<1.65)&(coords[:,1]<.13)&np.isin(np.array(roles),[0,4,5])
|
||||
seams={}
|
||||
for v in obj.data.vertices:
|
||||
for g in v.groups:weights_array[v.index,g.group]=g.weight
|
||||
if shoulder[v.index] and roles[v.index] in [0,4,5]:seams.setdefault(tuple(np.round(v.co,5)),[]).append(v.index)
|
||||
edges=np.array([tuple(e.vertices) for e in obj.data.edges],dtype=np.int32)
|
||||
mask=shoulder[edges[:,0]]&shoulder[edges[:,1]]&np.isin(np.array(roles)[edges[:,0]],[0,4,5])&np.isin(np.array(roles)[edges[:,1]],[0,4,5]);smooth=edges[mask]
|
||||
first=np.concatenate((smooth[:,0],smooth[:,1]));second=np.concatenate((smooth[:,1],smooth[:,0]));counts=np.maximum(np.bincount(first,minlength=len(coords)),1)
|
||||
for iteration in range(10):
|
||||
average=np.zeros_like(weights_array)
|
||||
for column in range(len(names)):average[:,column]=np.bincount(first,weights=weights_array[second,column],minlength=len(coords))/counts
|
||||
weights_array[shoulder]=weights_array[shoulder]*.4+average[shoulder]*.6
|
||||
for indices in seams.values():
|
||||
if len(indices)>1:weights_array[indices]=weights_array[indices].mean(axis=0)
|
||||
for v in obj.data.vertices:
|
||||
if not shoulder[v.index]:continue
|
||||
w=weights_array[v.index];indices=np.argsort(w)[-4:];total=float(w[indices].sum())
|
||||
if total<1e-8:continue
|
||||
for g in list(v.groups):obj.vertex_groups[g.group].remove([v.index])
|
||||
for i in indices:
|
||||
if w[i]/total>1e-6:obj.vertex_groups[int(i)].add([v.index],float(w[i])/total,'REPLACE')
|
||||
for f in obj.data.polygons:f.use_smooth=True
|
||||
modifier=obj.modifiers.new('Approved animation skeleton','ARMATURE');modifier.object=rig;obj.parent=rig
|
||||
# UV and all PBR textures from Meshy remain attached to the optimized surface.
|
||||
obj.data.update();bpy.context.view_layer.update()
|
||||
report={'source_triangles':1351422,'game_vertices':len(obj.data.vertices),'game_triangles':sum(len(f.vertices)-2 for f in obj.data.polygons),'bones':len(rig.data.bones),'clips':[t.name for t in rig.animation_data.nla_tracks],'max_nearest_source_distance':max(distances),'textures':[list(i.size) for i in bpy.data.images if i.size[0]>0 and i.users>0],'source_task':'01a18454-81f3-762f-b9b7-57b5e54af4a9'}
|
||||
for v in obj.data.vertices:assert abs(sum(g.weight for g in v.groups)-1)<1e-4
|
||||
edges=np.array([tuple(e.vertices) for e in obj.data.edges],dtype=np.int32)
|
||||
base=np.array([tuple(v.co) for v in obj.data.vertices]);rest_lengths=np.linalg.norm(base[edges[:,0]]-base[edges[:,1]],axis=1)
|
||||
checks={}
|
||||
for track in rig.animation_data.nla_tracks:
|
||||
track.mute=False;values=[]
|
||||
for frame in range(1,int(track.strips[0].frame_end)+1,8):
|
||||
scene.frame_set(frame);bpy.context.view_layer.update();evaluated=obj.evaluated_get(bpy.context.evaluated_depsgraph_get());mesh=evaluated.to_mesh();coords=np.array([tuple(v.co) for v in mesh.vertices]);evaluated.to_mesh_clear()
|
||||
assert np.isfinite(coords).all()
|
||||
growth=np.linalg.norm(coords[edges[:,0]]-coords[edges[:,1]],axis=1)-rest_lengths
|
||||
values.append(float(np.max(growth)))
|
||||
if values[-1]>.12:
|
||||
ix=int(np.argmax(growth));log('EDGE',track.name,frame,values[-1],[list(base[j]) for j in edges[ix]],[roles[j] for j in edges[ix]])
|
||||
checks[track.name]={'max_edge_growth_m':max(values)};track.mute=True
|
||||
report['deformation_checks']=checks
|
||||
assert all(c['max_edge_growth_m']<.12 for c in checks.values()),checks
|
||||
log(json.dumps(report))
|
||||
for o in list(scene.objects):
|
||||
if o not in [obj,rig] and o.name!='Infernal animated whip':bpy.data.objects.remove(o,do_unlink=True)
|
||||
for tr in rig.animation_data.nla_tracks:tr.mute=False
|
||||
rig.animation_data.action=None;scene.frame_set(1)
|
||||
for bone in rig.pose.bones:bone.matrix_basis.identity()
|
||||
active(obj);rig.select_set(True)
|
||||
whip=bpy.data.objects.get('Infernal animated whip')
|
||||
if whip:whip.select_set(True)
|
||||
bpy.ops.export_scene.gltf(filepath=str(OUT/'succubus_game.glb'),export_format='GLB',use_selection=True,export_animations=True,export_animation_mode='NLA_TRACKS',export_nla_strips=True,export_force_sampling=True,export_frame_range=False,export_skins=True,export_materials='EXPORT',export_yup=True)
|
||||
(OUT/'manifest.json').write_text(json.dumps(report,indent=2),encoding='utf-8')
|
||||
bpy.context.preferences.filepaths.save_version=0
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(QA/'meshy_game.blend'))
|
||||
log('EXPORT READY',OUT/'succubus_game.glb')
|
||||
@@ -0,0 +1,35 @@
|
||||
extends SceneTree
|
||||
# Manual visual regression capture against the active game scene.
|
||||
func _initialize():
|
||||
call_deferred("run")
|
||||
|
||||
func run():
|
||||
AudioServer.set_bus_mute(0,true)
|
||||
var g=load("res://main.tscn").instantiate()
|
||||
root.add_child(g)
|
||||
await process_frame
|
||||
g.test_mode=true;g.capture_mode=true;g.start_game();g.set_process(false)
|
||||
g.avatar.set_process(false);g.hud.hide()
|
||||
g.player.position=Vector3(-1,0,-1)
|
||||
for imp in g.life.imps:imp.root.hide();g.avatar.rotation=Vector3.ZERO;g.avatar.reset_gait()
|
||||
var folder=ProjectSettings.globalize_path("res://captures/meshy-review")
|
||||
DirAccess.make_dir_recursive_absolute(folder)
|
||||
for i in range(3):
|
||||
for frame in range(30):g.avatar._process(1.0/24)
|
||||
await snap(g,folder+"/idle-%d.png"%i)
|
||||
for i in range(3):
|
||||
for frame in range(8):
|
||||
g.player.position+=Vector3.BACK*2.5/24;g.avatar._process(1.0/24)
|
||||
await snap(g,folder+"/walk-%d.png"%i)
|
||||
g.avatar.strike(.7)
|
||||
for i in range(3):
|
||||
for frame in range(5):g.avatar._process(1.0/24)
|
||||
await snap(g,folder+"/whip-%d.png"%i)
|
||||
print("MESHY REVIEW CAPTURE COMPLETE")
|
||||
quit()
|
||||
|
||||
func snap(g,path):
|
||||
var target=g.player.position+Vector3(0,1.35,0)
|
||||
g.camera.size=3.4;g.camera.position=target+Vector3(.15,.15,2.8);g.camera.look_at(target)
|
||||
await RenderingServer.frame_post_draw
|
||||
assert(g.get_viewport().get_texture().get_image().save_png(path)==OK)
|
||||
@@ -0,0 +1,31 @@
|
||||
# Iron maiden — approved concept, Meshy generation and game preparation
|
||||
|
||||
Reference: `concept.png`, approved in chat on 2026-10-28. Only the three closed
|
||||
front/side/back crops were sent to Meshy. The open drawing is deliberately not
|
||||
used for construction: its door silhouettes do not close consistently.
|
||||
|
||||
Meshy resource: `multi-image-to-3d`.
|
||||
Task: `01a1845b-d214-7150-8267-02bdbab6abd8`.
|
||||
Reported consumption: **30 credits**. Textured GLB with PBR, 4K.
|
||||
Original bytes: `source.glb`, SHA256
|
||||
`1cd971b887f682be8da72507472965c45c806932c2fafaab90c68e586a7fc190`.
|
||||
`meshy-preview.png` is the service's render of the original closed model.
|
||||
|
||||
Reproduce the game asset using Blender 5:
|
||||
|
||||
```powershell
|
||||
& 'C:\Program Files\Blender Foundation\Blender 5.0\blender.exe' -b --python tools/build_iron_maiden.py
|
||||
& 'C:\Program Files\Blender Foundation\Blender 5.0\blender.exe' -b --python tools/review_iron_maiden.py
|
||||
```
|
||||
|
||||
The local build reduces the source mesh, partitions its closed surface at the
|
||||
hinge and center planes, adds a separate smooth interior lining, and exports
|
||||
`Body`, `LeftDoor`, `RightDoor`. The doors' zero rotations reconstruct the closed
|
||||
source; their rotations in game reuse the existing station state machine.
|
||||
Custom normals are cleared after cutting and recalculated on the new topology;
|
||||
this prevents the incorrect melted-looking shading seen in the first local draft.
|
||||
The edited Blender source is `iron_maiden.blend`.
|
||||
|
||||
Game output: `Demon_v0.19/art/equipment/iron_maiden_v01/iron_maiden.glb`.
|
||||
Run the game with `-- --test-iron-maiden` to exercise the station and capture its
|
||||
open, intermediate, closed and heated poses. Technical captures remain local.
|
||||
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 192 KiB |
@@ -15,3 +15,5 @@
|
||||
- Raw task responses/signed asset URLs remain outside Git.
|
||||
|
||||
SHA256 model: `c870597ddd835e4026365b501c887d54687707f439e4eaa8a9c72093ebbda263`
|
||||
|
||||
Skin ownership input for game rig transfer: skin_mask.npz. Derived from the embedded base-color image resized to 1024 square: R>65, R>1.5G, R>1.3B (sRGB bytes). Contains the boolean skin mask and source GLB SHA256; no geometry or texture modification.
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
"""Render source/game prop in Blender for orientation and hinge review.
|
||||
blender -b --python tools/review_iron_maiden.py -- [--source]
|
||||
"""
|
||||
import bpy, math, sys, json
|
||||
from pathlib import Path
|
||||
from mathutils import Vector
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
source='--source' in sys.argv
|
||||
path=ROOT/('tools/model_sources/iron_maiden_v01/source.glb' if source else 'Demon_v0.19/art/equipment/iron_maiden_v01/iron_maiden.glb')
|
||||
out=ROOT/'Demon_v0.19/captures/iron-maiden';out.mkdir(parents=True,exist_ok=True)
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
bpy.ops.import_scene.gltf(filepath=str(path))
|
||||
mesh=[o for o in bpy.context.scene.objects if o.type=='MESH']
|
||||
points=[o.matrix_world@v.co for o in mesh for v in o.data.vertices]
|
||||
lo=Vector([min(v[i] for v in points) for i in range(3)]);hi=Vector([max(v[i] for v in points) for i in range(3)])
|
||||
center=(lo+hi)/2;size=max(hi-lo)
|
||||
print('MODEL_BOUNDS',list(lo),list(hi),'POLYGONS',sum(len(o.data.polygons) for o in mesh))
|
||||
scene=bpy.context.scene;scene.render.engine='CYCLES';scene.cycles.samples=16
|
||||
scene.render.resolution_x=900;scene.render.resolution_y=900;scene.render.resolution_percentage=100
|
||||
scene.world=bpy.data.worlds.new('Studio');scene.world.use_nodes=True
|
||||
nodes=scene.world.node_tree.nodes;nodes.clear()
|
||||
background=nodes.new('ShaderNodeBackground');background.inputs[0].default_value=(.12,.14,.18,1);background.inputs[1].default_value=.5
|
||||
output=nodes.new('ShaderNodeOutputWorld');scene.world.node_tree.links.new(background.outputs[0],output.inputs[0])
|
||||
for name,location,power,scale in [('Key',(3,-4,5),700,4),('Fill',(-3,-2,2),450,3),('Rim',(1,3,4),900,3)]:
|
||||
lamp=bpy.data.lights.new(name,'AREA');lamp.energy=power;lamp.shape='DISK';lamp.size=scale
|
||||
obj=bpy.data.objects.new(name,lamp);scene.collection.objects.link(obj);obj.location=center+Vector(location)*size/3
|
||||
obj.rotation_euler=(center-obj.location).to_track_quat('-Z','Y').to_euler()
|
||||
camera=bpy.data.objects.new('Camera',bpy.data.cameras.new('Camera'));scene.collection.objects.link(camera);scene.camera=camera
|
||||
camera.data.type='ORTHO';camera.data.ortho_scale=size*1.30
|
||||
views=[('source-front' if source else 'studio-closed',(0,-6,1.0)),('source-back' if source else 'studio-back',(0,6,1.0))]
|
||||
if not source:views += [('studio-half',(4,-6,2.0)),('studio-open',(4,-6,2.0))]
|
||||
for name,direction in views:
|
||||
if name in ('studio-half','studio-open'):
|
||||
angle=.9 if name=='studio-half' else 1.8
|
||||
bpy.data.objects['LeftDoor'].rotation_mode='XYZ'
|
||||
bpy.data.objects['RightDoor'].rotation_mode='XYZ'
|
||||
bpy.data.objects['LeftDoor'].rotation_euler.z=-angle
|
||||
bpy.data.objects['RightDoor'].rotation_euler.z=angle
|
||||
camera.location=center+Vector(direction)*size
|
||||
camera.rotation_euler=(center-camera.location).to_track_quat('-Z','Y').to_euler()
|
||||
scene.render.filepath=str(out/(name+'.png'));bpy.ops.render.render(write_still=True)
|
||||