Add toggleable per-frame bounding-volume updates for animated models (SkinningControl)#2665
Open
Add toggleable per-frame bounding-volume updates for animated models (SkinningControl)#2665
Conversation
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/47f6b3d5-00bd-4253-a800-382c8b76d5ad Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix animated models to have proper model bound
Fix animated model bounding volumes not updating during animation
Mar 28, 2026
Member
|
@copilot make this toggleable, off by default, add a visual example in jme3-examples |
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/1528c7f1-8585-400f-9b82-851054cf0408 Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Contributor
Author
Done in commit f4661dc.
|
Copilot
AI
changed the title
Fix animated model bounding volumes not updating during animation
Add toggleable per-frame bounding-volume updates for animated models
Mar 28, 2026
Member
|
@copilot undo the changes to the deprecated SkeletonControl, lets implement and test this only for the new SkinningControl |
…ontrol Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/87b0376a-f5e4-4caf-bab1-6bb85e219ddf Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Add toggleable per-frame bounding-volume updates for animated models
Add toggleable per-frame bounding-volume updates for animated models (SkinningControl)
Mar 28, 2026
riccardobl
requested changes
Mar 28, 2026
| } | ||
| // setModelBound() updates the mesh bound and triggers a world-bound refresh. | ||
| geometry.setModelBound(bbox); | ||
| } |
Member
There was a problem hiding this comment.
This partially defeats the point of having hardware skinning, can you distribute the bbox update in multiple frames by allowing the developer to set a maximum boundingUpdateBudget to decide how many vertices are considered per frame when updating the bounds?
Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/0b0ee217-37c6-4d49-9616-3c58c9350a06 Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
…n SkinningControl Agent-Logs-Url: https://github.com/jMonkeyEngine/jmonkeyengine/sessions/3d4465a6-f250-44fe-b834-04690fbb77f2 Co-authored-by: riccardobl <4943530+riccardobl@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Animated models retained their bind-pose bounding volumes throughout animation, causing incorrect frustum culling when poses extended beyond bind-pose extents.
SkinningControlchangessetUpdateBounds(boolean)— opt-in flag (defaultfalse); no cost unless enabled.geometry.updateModelBound()after each CPU skin pass.BindPosePositionupdates theBoundingBoxin-place each frame without touching GPU buffers.setBoundingUpdateBudget(int)— caps vertices processed per frame; work resumes from a per-geometry cursor the next frame, committing the bbox only once a full pass completes. Default isInteger.MAX_VALUE(all at once, preserving previous behaviour). Values ≤ 0 are normalised toMAX_VALUE.Both flags are serialised in
write()/read()for J3O persistence. The deprecatedSkeletonControlis unchanged.Test & example
testIssue343()added toPreventCoreIssueRegressions: software-skinned Elephant,legUpanimation, asserts world bound shifts from bind pose.jme3test/animation/TestAnimatedModelBound.javainjme3-examples: Elephant with yellow wireframe bbox overlay; press B to toggleupdateBoundsat runtime.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.