fix: Aermel-Skinning mit acht Bone-Influences
- Ursache: glTF-Export trimmte auf vier Einfluesse; Godot liess die Aermel an Schulter und Ellbogen kollabieren - export_all_influences=True fuer Produktion und Rotoscoping - v004-Asset mit JOINTS_1/WEIGHTS_1, Manifest, Sync und FTP aktualisiert - Manifest-Test prueft die 8-Bone-Gewichte (57 Assertions) - 1189 Assertions gesamt, Doku und Findings aktualisiert
This commit is contained in:
parent
894f3d950d
commit
c0cc2b29f7
10 changed files with 180 additions and 33 deletions
|
|
@ -6,7 +6,7 @@ extends SceneTree
|
|||
## xvfb-run -a godot --path rinkplanner \
|
||||
## --script res://tests/manual/capture_rig.gd -- 640 840 /tmp/opencode/godot_rig.png
|
||||
|
||||
const MODEL_PATH := "res://assets/external/characters/skater_figure_rigged_deform_v002.glb"
|
||||
const MODEL_PATH := "res://assets/external/characters/skater_figure_glide_v004.glb"
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
|
|
@ -20,6 +20,7 @@ func _capture() -> void:
|
|||
var output := args[2] if args.size() > 2 else "user://capture_rig.png"
|
||||
var model_path := args[3] if args.size() > 3 else MODEL_PATH
|
||||
var anim_time := float(args[4]) if args.size() > 4 else -1.0
|
||||
var camera_preset := args[5] if args.size() > 5 else "body"
|
||||
|
||||
var packed := load(model_path) as PackedScene
|
||||
if packed == null:
|
||||
|
|
@ -69,11 +70,19 @@ func _capture() -> void:
|
|||
var camera := Camera3D.new()
|
||||
camera.fov = 42.0
|
||||
scene.add_child(camera)
|
||||
camera.look_at_from_position(
|
||||
Vector3(2.6, 1.45, 3.9),
|
||||
Vector3(0.0, 0.95, 0.0),
|
||||
Vector3.UP
|
||||
)
|
||||
if camera_preset == "arms_back":
|
||||
camera.fov = 45.0
|
||||
camera.look_at_from_position(
|
||||
Vector3(0.0, 1.55, -3.2),
|
||||
Vector3(0.0, 1.3, 0.0),
|
||||
Vector3.UP
|
||||
)
|
||||
else:
|
||||
camera.look_at_from_position(
|
||||
Vector3(2.6, 1.45, 3.9),
|
||||
Vector3(0.0, 0.95, 0.0),
|
||||
Vector3.UP
|
||||
)
|
||||
camera.current = true
|
||||
|
||||
root.size = Vector2i(width, height)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ extends SceneTree
|
|||
## Aufruf:
|
||||
## godot --headless --path rinkplanner --script res://tests/manual/inspect_rig.gd
|
||||
|
||||
const MODEL_PATH := "res://assets/external/characters/skater_figure_rigged_deform_v002.glb"
|
||||
const MODEL_PATH := "res://assets/external/characters/skater_figure_glide_v004.glb"
|
||||
|
||||
|
||||
func _init() -> void:
|
||||
|
|
|
|||
|
|
@ -158,6 +158,9 @@ func _validate_asset(
|
|||
|
||||
_validate_synced_file(asset_id, target, sha256, size)
|
||||
|
||||
if rig is Dictionary and int(rig.get("deform_bones", 0)) > 0:
|
||||
_validate_bone_weights(asset_id, target)
|
||||
|
||||
|
||||
func _validate_placement(asset_id: String, placement: Dictionary) -> void:
|
||||
_check(
|
||||
|
|
@ -231,6 +234,32 @@ func _validate_synced_file(
|
|||
)
|
||||
|
||||
|
||||
func _validate_bone_weights(asset_id: String, target: String) -> void:
|
||||
var absolute := "res://" + target
|
||||
if not FileAccess.file_exists(absolute):
|
||||
return
|
||||
|
||||
var packed := load(absolute) as PackedScene
|
||||
_check(packed != null, "asset '%s' loads as a scene" % asset_id)
|
||||
if packed == null:
|
||||
return
|
||||
|
||||
var instance := packed.instantiate()
|
||||
var meshes := instance.find_children("*", "MeshInstance3D", true, false)
|
||||
_check(not meshes.is_empty(), "asset '%s' contains a mesh" % asset_id)
|
||||
for mesh_instance: MeshInstance3D in meshes:
|
||||
var mesh := mesh_instance.mesh
|
||||
if mesh == null or mesh.get_surface_count() == 0:
|
||||
continue
|
||||
var format: int = mesh.surface_get_format(0)
|
||||
_check(
|
||||
(format & Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS) != 0,
|
||||
"asset '%s' uses eight bone influences" % asset_id
|
||||
)
|
||||
break
|
||||
instance.free()
|
||||
|
||||
|
||||
func _is_relative_path(path: String) -> bool:
|
||||
return (
|
||||
not path.is_empty()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue