Skip to content

Animation blending and root motion#1095

Open
Sezzary wants to merge 30 commits intodevelopfrom
sezz/write-baked-frames
Open

Animation blending and root motion#1095
Sezzary wants to merge 30 commits intodevelopfrom
sezz/write-baked-frames

Conversation

@Sezzary
Copy link
Copy Markdown
Member

@Sezzary Sezzary commented Dec 14, 2025

Optimises level load.

Related TEN PR: TombEngine/TombEngine#1837

@Lwmte Lwmte changed the title Write baked frames and real planes to TEN level Animation blending and root motion Mar 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates WadTool/TombLib animation data and UI to support TombEngine-specific state-change blending and root motion flags, and changes TombEngine compilation to pre-bake interpolated frames (to reduce runtime/level-load work).

Changes:

  • Extend state-change dispatch data to include frame-range mapping + blend parameters, plus UI tooling for editing blend curves.
  • Add blend preview playback state in the animation editor and expose root motion toggles for TEN.
  • Update TombEngine WAD compilation to bake interpolated frames and serialize new root motion/settings metadata.

Reviewed changes

Copilot reviewed 22 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
WadTool/WadToolClass.cs Extends state-change editor event payload to include blend frames + curve.
WadTool/WadActions.cs Updates TRW import to renamed dispatch field (NextLowFrame).
WadTool/Forms/FormStateChangesEditor.resx Removes redundant designer metadata entries.
WadTool/Forms/FormStateChangesEditor.cs Adds TEN-only columns and blend curve editing via a dedicated editor form + in-grid preview.
WadTool/Forms/FormStateChangesEditor.Designer.cs Reworks state-change grid columns to include next frame range + blend settings and a curve “button” column.
WadTool/Forms/FormBlendCurveEditor.resx New: resources for the blend curve editor dialog.
WadTool/Forms/FormBlendCurveEditor.cs New: modal editor for choosing/editing a Bezier blend curve preset/shape.
WadTool/Forms/FormBlendCurveEditor.Designer.cs New: UI layout for the blend curve editor dialog.
WadTool/Forms/FormAnimationFixer.cs Renames state-change “next frame low” fixer option to new field name.
WadTool/Forms/FormAnimationEditor.cs Enables TEN blending/root motion UI; integrates blend preview state + root motion persistence to animations.
WadTool/Forms/FormAnimationEditor.Designer.cs UI updates for root motion panel and blending section; introduces drawSkinToolStripMenuItem instance.
WadTool/Controls/PanelRenderingAnimationEditor.cs Adds DisablePicking to prevent picking during blend preview.
WadTool/AnimBlendPreviewState.cs New: encapsulates blend-preview state, pose building, and keyframe interpolation for preview.
TombLib/TombLib/Wad/WadAnimation.cs Adds WadAnimRootMotionSettings to store TEN root motion settings.
TombLib/TombLib/Wad/WadAnimDispatch.cs Renames dispatch fields and adjusts defaults for next-frame range + blending.
TombLib/TombLib/Wad/Wad2Writer.cs Writes renamed dispatch fields and adds a new chunk for root motion settings.
TombLib/TombLib/Wad/Wad2Loader.cs Reads renamed dispatch fields and new root motion settings chunk.
TombLib/TombLib/Wad/Wad2Chunks.cs Adds a new chunk id for root motion settings.
TombLib/TombLib/Wad/TrLevels/TrLevelOperations.cs Updates conversion logic for renamed dispatch field (NextLowFrame).
TombLib/TombLib/Wad/Tr4Wad/Tr4WadOperations.cs Updates conversion logic for renamed dispatch field (NextLowFrame).
TombLib/TombLib/Types/BezierCurve2.cs Minor whitespace cleanup near operator overload.
TombLib/TombLib/LevelData/Compilers/Wad.cs Updates compiler mapping to renamed dispatch field (NextLowFrame).
TombLib/TombLib/LevelData/Compilers/TombEngine/Wad.cs Adds baking of interpolated frames and passes root motion settings into TEN animation structs.
TombLib/TombLib/LevelData/Compilers/TombEngine/Structs.cs Writes pre-baked frames; updates state change field names; writes root motion bitmask and adds bbox helpers.
TombLib/TombLib.Forms/Controls/BezierCurveEditor.cs Adds a static curve preview renderer for use in grid cells.
Files not reviewed (3)
  • WadTool/Forms/FormAnimationEditor.Designer.cs: Language not supported
  • WadTool/Forms/FormBlendCurveEditor.Designer.cs: Language not supported
  • WadTool/Forms/FormStateChangesEditor.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@Lwmte Lwmte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually eyeballed, addressed all Copilot comments, tested root motion flags and blending feature, it works correctly. Needs one extra testing pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants