-
Notifications
You must be signed in to change notification settings - Fork 41
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
Hotfix for removing scene node #410
Conversation
Hotfix for removing scene node by creating dummy skeleton for meshes without bones. Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
Signed-off-by: Onur Berk Tore <[email protected]>
This PR results with failing MergeBoxWithDoubleSkeleton test. I am looking for a mesh where there are two children right after Scene Node to represent this test in real life, however I can not find such mesh. Even PatientWalkingCane.dae, which you mentioned have two skeletons, only have one child. So maybe we should delete MergeBoxWithDoubleSkeleton test? Secondly, this is currently a hotfix, I can spend time to create a better patch, or we can update our code to work with the new skeleton. What do you think is the best way? |
Do you have any details of which type of meshes exhibit wrong behavior when the scene node is not removed and works when this patch is added? |
I did a bit more investigation and I guess this goes back to the issues with actor.sdf segfaulting? I wonder if instead of removing the root and hardcoding a "root is equal to the first child" logic we could just fix the scene node by assigning it a dummy animation that is just an identity (zero translation, unit quaternion) for the whole time, so children are preserved and their animations unchanged. I'm not familiar enough with actor animations and exporting software to know whether the hardcoding 0 would have any side effects or not but it feels a bit dangerous if a root scene node was to have more than one child for any reason. |
Yes it's related to actor.sdf segfault. This idea might work if this is also merged. Otherwise interpolateX flag for the animation will be always negative with dummy animation. This is the only code that I found checks root node properties for setting the animation properties, however if there is more, then this approach create problem. But I think it is bad to set the whole animation properties by just looking root node? And if such thing exist we should remove them? |
Hi @luca-della-vedova,
Actor.sdf
Here, however I dont think thats a good idea. What is the best way to proceed with this, we still cant load actors with assimp. |
@luca-della-vedova can we close this PR? There hasn't been any progress in a long time. |
🦟 Bug fix
Summary
Directly removing scene node from the skeleton creates problem for meshes without childs. This bugfix creates a dummy skeleton for this type of meshes.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.