Skip to content

custom class for osgAnimation::RigGeometry, Collada animated deforming body parts

Nelsson Huotari requested to merge unelsson/openmw:riggeoosgaext into master

Partially addresses issue #5701 (closed) by converting the osgAnimation::RigGeometry class with a static datavariance to the double buffered custom version. The new class is similar to SceneUtil::RigGeometry, but instead of handling all of the transforms and deformations it hands over the deep animation work to osgAnimation classes.

This is WIP, but as of 20.2.2022, commit 59f1cae9, it has working deforming animations for creatures. Npc and character body part animations are functional, but if the body parts has the same rig as the base model, merging of the weights from the body part to the character model isn't implemented yet (attempting to do that currently results in broken wonky character animations).

This is ready for review. The MR features deforming animations for collada body parts and optimizations for collada animations (static datavariance). (edit 18.6.2022: Still needs work. There are a few regressions in the master, and maybe related, needs some research) edit 18.6.2022: Resolved. This MR seems good (The issue of disappearing body parts was that old openmw-cs had corrupted test omwaddon record flags, and another openmw update made those issues visible, fix is just to make new test omwaddon with new openmw-cs).

Static models for bodyparts are unchanged and will be set at their respective places. Skinned models will be also inserted at the bodypart slot, but under inverse MatrixTransform to the root node, which will move the skinned models to the skeleton origin. This allows using a single model in Blender, modeling equipment on top of that character model, and editing and exporting all bodypart models from the same origin (0, 0, 0). This also allows exporting both sides (left and right) at once, and whole body models too. Left side slots may or may not work (needs testing or further work that can be left to later MRs). Screenshot_2022-03-29_20-58-24

Edited by Nelsson Huotari

Merge request reports