-
Notifications
You must be signed in to change notification settings - Fork 62
AssimpImporter: clean up STL types + update tests to 5.2.5 #130
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, this is a nice surprise cleanup. Thank you!
bool mergeSkins = false; | ||
/* For each mesh, map from mesh-relative bones to merged bone list */ | ||
std::vector<std::vector<UnsignedInt>> boneMap; | ||
std::vector<const aiBone*> mergedBones; | ||
Containers::Array<Containers::Array<UnsignedInt>> boneMap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the boneMap
is filled sequentially (if I see correctly), I was wondering if we could avoid the nested allocations by having just one array and an offset array to index into that? If it's not too much extra testing effort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea 👍 I'll check if the current tests cover this well enough, otherwise I'll extend them a bit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I extended the tests a bit and I feel like I've hit a bug either with assimp or the bone merging logic in our code. Not too much time to investigate before I leave on vacation for ~2 weeks, but I'll pick this back up afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, can you just push/rebase the remaining changes except this one? This particular optimization can wait two weeks, but I now have 5.2.5 on my system (and I expect Homebrew will soon as well) and it'd be nice to have this merged to have tests passing again.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed everything except this change. https://github.com/pezcode/magnum-plugins/tree/assimp-skin-merge-better-test has the change + extended tests that fail, if you care to look at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks :) Looked at the commit, but didn't see anything suspicious. Strange library, strange bugs.
Anyway, enjoy your vacation! 🌴
Oh, and the stupid ARM test crash is fixed in c0337ef. I was neglecting it because I expected some alignment issues deep inside |
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
==========================================
- Coverage 96.76% 96.76% -0.01%
==========================================
Files 130 130
Lines 13665 13687 +22
==========================================
+ Hits 13223 13244 +21
- Misses 442 443 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This whole ordeal was apparently already solved elsewhere
Since we always report all custom mesh attributes when a file is open regardless of whether any mesh uses them, it makes no sense to store them per scene
To make up for Array not overallocating when growing (unlike vector) and one instance of unordered_map without memory reservation
It's completely broken, reporting wrong attribute count or just wrong attribute data. For some reason it works with glTF files but that might just be a weird interaction with the other brokenness there. It got fixed right away in 5.2.5, and the importer can't really detect or handle it anyway, so no change there.
…weights from glTF Adapt the check and warning to only run on affected versions, and limit the XFAIL as well
…dling And always report them, regardless of whether a file is opened
Useless attempt to micro-optimize memory when assimp just eats it by the bucket anyway
@mosra made some nice changes to make this possible
00a7ab1
to
d5385bc
Compare
Some Linux CIs are failing because of old GCC not liking my array initialization syntax. I feel like I've fixed this before, but before I waste CI minutes on this, do you know what's wrong there? constexpr Containers::StringView objectNames[]{
"Mesh_1"_s, "Mesh_2"_s, "Plane"_s
};
constexpr Containers::StringView jointNames[][2]{
{"Node_1"_s, "Node_2"_s},
{"Node_3"_s, "Node_4"_s}
};
|
Try with just const and not constexpr? That's what usually makes it go crazy. Or maybe it doesn't like the implicit size? No idea. |
I squashed in some of the fixup commits and merged the commit series as 477cace...549486d. Now the only remaining test failure for me locally is glslang which I have to look at, Assimp is sparkling clean ✨ Thank you! |
5.2.5 just got released and finally fixes the issues with glTF and multiple sets of vertex joint weights. I just wanted to update the tests but then got caught in a cleanup session 👀
Some of these changes may not be desired so I tried to keep them as granular as possible, so they can be reverted/dropped individually.
Mostly, this removes the majority of
std
types that have equivalents inCorrade::Containers
, except forunordered_map
and a few cases ofstd::string
required by the assimp or importer API.Tests got adapted to: