Additional Cubic Bezier Key Framer Implementation (Animation)
|Target version:||-||Estimated time:||0.25 hour|
In order to write exporters for other modeling packages NeL requires a bezier curve key framer. The current implementation has been simplified so that the tangent length seems to be a third of the distance between the key frames, making it basically similar to the hermite interpolation mentioned in the COLLADA documentation. Using this technique means that artists do not have control over the tangents and any editing of tangents is lost at export. NeL requires a Cubic Bezier key framer in order to support additional modeling packages such as Blender, Maya, XSI and COLLADA. This will also fix the loss of tangent control.
For more information on cubic bezier key framers please see:
In the COLLADA specification document the math that COLLADA (and all major modeling packages) use for cubic bezier curves is listed on page 34.
A new keyframer will have to be a template subclass of:
With specializations for:
template <CKeyT> NL3D::ITrackKeyFramer
- int (specifically sint32)
- Any other value types which may need to be handled specially with a bezier curve.
A corresponding unit test should be written.
#1 Updated by sfb about 4 years ago
- Estimated time set to 0.25
In addition to a ITrackKeyFramer class we will need a Cubic Bezier variant of CKey. For a good example look at include/nel/3d/track_tcb.h - the definitions in src/3d/key.cpp are merely to enforce compilation of the template specializations.
I believe that most of the work will occur in the CKey variants.