-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Refactor: SkinningControl optimization + javadoc #2504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: SkinningControl optimization + javadoc #2504
Conversation
🖼️ Screenshot tests have failed. The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests. 📄 Where to find the report:
✅ If you did mean to change things: ✨ If you are creating entirely new tests: Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar". See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information |
I don't understand why the Screenshot Test fails ... |
I looked at the screenshots again, and one set of them does actually show some slightly more visibly noticeable differences: It looks this one expects the model from testOgreConvert() to be stepping its right foot forward in the middle of a walking pose, but the new changes are generating a screenshot where the model is still in its bind pose. |
@yaRnMcDonuts Edit: If you want the minimal size, write the floats directly as binary data. If you serialize objects, expect additional overhead. |
It may be possible this is a false-positive and can be ignored, but the screenshot test are still new so I'm not sure how probable that is. Maybe @richardTingle has some insight he can offer on this since he created them. Have you also run the TestOgreConvert example and confirmed that it still works all the same on your branch as it does on master? (I believe that example specifically uses an old model with an AnimControl that gets converted to the newer animation system, so you may not have experienced the error if your models weren't converted this way. I haven't looked too much into jme's animations system but I do know it handles joint transforms different for a model that's been converted from the old system compared to a fresh one converted from gltf, so its always important to test with both type of armatures) |
Running TestOgreConvert locally (the one in jme3-examples, not the screenshot test one) I can see the model walking. If I check out the capdevon-SkinningControl branch and run TestOgreConvert I can see the model standing still (ignoring the walk animation). Something is definitely really broken, it isn't a false positive |
Thanks for the feedback, guys! I'm looking into it. Edit: |
I can confirm I can now see the walking animation correctly in TestOgreConvert (and the screenshot tests pass) |
These changes aim to make the
SkinningControl
more understandable, maintainable, and robust.Here’s a short description of the changes made between the original and new version of the file:
The
SkinningControl
class has undergone significant refactoring and modernization. Key changes include:wasMeshUpdated
→meshUpdateRequired
,switchToHardware
→enableHardwareSkinning
, etc.), and class/method Javadocs have been rewritten for clarity, providing more detailed explanations of software vs. hardware skinning.collectAnimatedGeometries
, replacing the older, less flexiblefindTargets
methods.MatParamOverride
parameters for bone data is streamlined, with initialization moved to field declarations and simplified serialization logic.Overall, the changes enhance readability, maintainability, and clarity while maintaining the original functionality.