技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
ue-mcp-animation【数据与研究】Use when creating, modifying, retargeting, rigging, constraining, or validating skeletal animation through UE-MCP. Covers native UE 5.8 IK Rig and Retargeter authoring, the Control Rig begin/read/apply/bake loop, generic contact locks, per-rig anatomical and mirrored-axis discovery, quaternion keying, deterministic bone analysis, and exact fixed-fram…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Create quality animation from measured pose constraints, not guessed control angles. Control names, local axes, palm axes, handedness, and scale are properties of the selected rig. Discover them again for every unfamiliar rig; never paste values from another rig or negate a left-side Euler pose to make a right-side pose.
Use the existing skeleton-edit actions for bone creation, removal, reparenting, and reference-pose changes. For a small, explicit skin-weight correction:
asset(action="list_skeleton_bones", assetPath=<mesh>, includeTransforms=false) and use the returned names exactly.asset(action="read_skeletal_mesh_skin_weights", assetPath=<mesh>, lodIndex=0, vertexIndices=[...]). Keep each read to the selected source
vertex IDs; the action caps a call at 256 vertices.asset(action="set_skeletal_mesh_skin_weights", assetPath=<mesh>, lodIndex=0, edits=[{vertexIndex, influences:[{boneName, weight}]}]) with the
complete replacement influence set for every selected vertex. Inspect the
returned before and after: Unreal normalizes and prunes the list, and
stores source weights as uint16 values. The render buffer may quantize again
to 8-bit unless the LOD enables high-precision skin weights.editor(action="open_asset", assetPath=<mesh>)
and capture the asset editor at the reference pose and useful preview poses.
Re-read the same selected vertices before moving on.The weight setter edits one existing source LOD and profile, saves only when a selected value changed, and leaves all unlisted vertices, LODs, and profiles alone. It does not infer bones, fit a mesh, or auto-rig a character.
To size a physics body, socket or hit volume from the mesh, call
asset(action="read_skeletal_mesh_bone_vertex_bounds", assetPath=<mesh>).
Each bone's boneSpace box is its dominant vertices in the bone's own
bind-pose frame, the frame a physics body on that bone uses; componentSpace
is the same set in the mesh's bind pose. Pass boneNames to limit the report,
or minWeight to count a vertex for every bone weighing at least that much.
project(action="get_status"); verify the intended project and editor.read_control_rig_hierarchy and read_control_rig_graph. It must have
the controls, Forward Solve, and Backward Solve required for the intended
edits. If the project or character has no suitable rig, create one first
with the bundled Epic 5.8 controlrig actions (epic_create,
epic_import_bones_from_asset, epic_add_control, deliberate Forward Solve
nodes/links, and epic_add_backward_solve_graph), then save the exact rig
with asset(epic_save_assets). epic_create alone creates no imported
bones, authored controls, or solver wiring. Run an unchanged
source-to-controls-to-bones round trip on the exact production mesh. Do not
begin production work on an unverified or merely name-compatible rig.read_ik_rig and
read_ik_retargeter first. On UE 5.8 use configure_ik_rig for validated
roots, ancestry-valid chains, concrete goals, solver connections and
effectors; use configure_ik_retargeter for the default op stack, source and
target rig assignment to every op, auto/manual mappings, preview meshes, and
a named retarget pose. Read both assets back after saving. A chain's goal
string is not proof that a goal or solver exists.begin_control_rig_edit. Use a unique
LevelSequence path and bindingTag, an end-exclusive frame range, and
onConflict="error". Use rigMode="asset" for a project rig or "fk" only
when generated FK controls are intentional. The source must be non-additive
and mesh-compatible; flatten an additive clip against its intended base
first. layered controls the session layer, not an additive source base.
A finite non-zero source RateScale is compensated in Sequencer so the raw
timeline maps once without modifying the source asset; zero is rejected.read_control_rig_edit at rest, transitions, extrema, and end in both
local and global space. Here global is rig/global (normally mesh
component) space, not actor world space.controlType, animatable, and enum metadata. Write
scalars with the matching set_bool, set_float, or set_int; enum values
must come from enumOptions. Never write animatable=false controls.analyze_animation. Probe the right side separately; mirrored parents
or negative scale can reverse anatomical meanings. Preserve the full scale
read from the control.set_keys transforms with finite normalized quaternions,
complete translation/rotationQuaternion/scale payloads, and strictly
increasing frames. Preserve translation and scale unless intentionally
editing them. If the source bake has dense keys, key every affected frame;
sparse keys will not replace the intervening source motion. Apply related
controls and scalar switches in one transaction.
For a fixed contact, use contact_lock in the same operation batch. Supply a
keyable translatable driver, optional driven bone/socket, inclusive frame
range, component-space target, optional pole/stabilizer controls, and
position/rotation tolerances. The session must contain one source animation
section. The bridge samples it per frame, writes dense smooth-edged keys, and
transactionally reads back the driver and stabilizers. A driven bone/socket
returns verification=bake_and_analyze_required; bake, analyze every
constrained frame, and reject the output if its residual misses the motion's
acceptance tolerance. To follow a moving source bone/socket, set
targetReference; omit target to preserve the first-frame relative
transform, or provide target as an explicit transform in the reference's
space. This is the generic two-hand/hand-to-prop relationship primitive. FK
contacts whose translation is ignored by skeleton
retargeting use a local rotation-chain solve and report
solver=fk_rotation_chain; that path requires a driven bone and does not
accept stabilizers. Position-only locks leave the driven control orientation
unkeyed. The bridge does not guess the driver, pole, foot roll, friction,
joint limits, or pelvis compensation.bake_control_rig_edit,
reduceKeys=false, and onConflict="error". Never overwrite source,
another iteration's session, or prior approved output assets.Run analyze_animation on source and output using the same mesh, explicit
frames, and bones. Include root, pelvis, the complete edited chain, feet,
opposite side, and any controls/bones expected to remain unchanged. Write its
native manifest.json and samples.ndjson beneath
Saved/Codex/AnimationQA.
Check numeric integrity, invalid transforms, selected-bone bounds, root displacement/speed, and loop seam metrics. Derive gesture-specific checks from component transforms: shoulder-relative wrist height, elbow-to-wrist vector, elbow angle/plane stability, probed palm-normal alignment, speed/acceleration, direction changes, and drift in untouched bones. Numeric samples are the source of truth; screenshots are the human visual gate.
Use the analyzer's rateScale, effectiveDurationSeconds, and per-notify
rawTriggerTimeSeconds / effectiveTriggerTimeSeconds fields when validating
gameplay release timing. Effective times use the asset-rate magnitude and are
null when the asset rate is zero.
For an exact native frame capture, without Computer Use or Python:
editor(action="open_asset", assetPath=<baked_anim>).editor(action="find_object") for className="AnimSingleNodeInstance",
nameContains="AnimPreviewInstance", world="any"; select the match under
the current AnimationEditorPreviewActor.editor(action="invoke_object_functions") call, invoke SetPlaying with
bIsPlaying=false, then SetPosition with
InPosition=frame*rateDenominator/rateNumerator and
bFireNotifies=false on that object path.editor(action="capture_screenshot", target="window").Keep versioned V&V fixtures for a from-scratch gesture, full-body IK authoring, a retarget between known skeletons, a copied animation modified through IK plus its pole target, a bone/socket contact with an unrelated simultaneous edit, and edge cases covering mirrored/negative scale, dense keys, additive-source rejection/flattening, layered sessions, scalar enums, root motion, loops, and short clips.
The loop generalizes beyond humanoid arms. Re-discover the rig mapping, then express legs as hip/knee-pole/foot/contact constraints; spine and head as arc/twist/aim constraints; tails, tentacles, and ropes as length-preserving chain curves with delayed phase; and props or mechanisms as pivot, attachment, contact, and clearance constraints. Only control/bone names, axes/signs, mirrored scale, limits, and motion constraints are rig-specific.
The four Control Rig session actions, configure_ik_rig,
configure_ik_retargeter, and contact_lock are UE 5.8 only and return
unsupported_engine_version on older engines; do not invent a reflected or
raw-bone fallback. Legacy IK create/read behavior is unchanged.
analyze_animation is cross-version through the native APIs in the compiled
engine. See the public
Native Control Rig Animation
guide for full call shapes and fixture guidance.
Edit ranges are [startFrame, endFrameExclusive). The bridge keeps an internal
support frame for Unreal's exact-duration export sample without making the
exclusive end authorable. Validate the last visible frame and exact-duration
sample separately. A non-looping endpoint must hold the intended final pose
without an adjacent-frame teleport or rotation jump; a looping endpoint must
pass the requested seam check. A large endpoint discontinuity fails the bake.