Hi,I noticed that animated transforms and Bones do update faster than osgAnimation::RigGeometry which is attached to bones. Is this a known issue ? Can this be fixed from my Side ?
This looks very odd in the case of a skinned character, and rigid ( MatrixTransform ) Eyes, as they move out of the character slightly but obviously noticeable.
Attached is a test scene, displaying the issue. The red cube is rigid transformed with 3 linear keyframes. The green cube is a RigGeometry transformed by a Bone which has the same keyframe ( z ) values . The blue cube is a child of the bone without animation or deformation.
Please note that the green cube is allways ( one frame ? ) behind. Thank you, Cheers, PP
#Ascii Scene
#Version 80
#Generator OpenSceneGraph 3.0.1
osg::Group {
UniqueID 1
Name "RigGeometry_Update"
UpdateCallback TRUE {
osgAnimation::BasicAnimationManager {
UniqueID 2
Animations 1 {
osgAnimation::Animation {
UniqueID 3
Name "No Character"
Weight 1
Channels 2 {
Type Vec3LinearChannel {
Name position
TargetName plyCube_XForm_Callback
KeyFrameContainer TRUE 3 {
0 -2 0 0
1 -2 0 4
2 -2 0 0
}
}
Type Vec3LinearChannel {
Name position
TargetName jnt_Skin_Callback
KeyFrameContainer TRUE 3 {
0 0 0 0
1 0 0 4
2 0 0 0
}
}
}
}
}
}
}
StateSet TRUE {
osg::StateSet {
UniqueID 4
ModeList 1 {
GL_NORMALIZE ON
}
}
}
Children 1 {
osg::Group {
UniqueID 5
Name "world"
Children 2 {
osg::MatrixTransform {
UniqueID 6
Name "plyCube_XForm"
DataVariance DYNAMIC
UpdateCallback TRUE {
osgAnimation::UpdateMatrixTransform {
UniqueID 7
Name "plyCube_XForm_Callback"
StackedTransforms 3 {
osgAnimation::StackedTranslateElement {
UniqueID 8
Name "position"
Translate -2 0 0
}
osgAnimation::StackedQuaternionElement {
UniqueID 9
Name "quaternion"
}
osgAnimation::StackedScaleElement {
UniqueID 10
Name "scale"
Scale 1 1 1
}
}
}
}
Children 1 {
osg::Geode {
UniqueID 11
Name "plyCube_XFormShape"
StateSet TRUE {
osg::StateSet {
UniqueID 12
ModeList 1 {
GL_CULL_FACE OFF
}
AttributeList 1 {
osg::LightModel {
UniqueID 13
AmbientIntensity 0 0 0 1
LocalViewer TRUE
TwoSided TRUE
}
Value OFF
}
}
}
Drawables 1 {
osg::Geometry {
UniqueID 14
Name "plyCube_XFormShape_lambert1"
DataVariance STATIC
UseDisplayList FALSE
UseVertexBufferObjects TRUE
PrimitiveSetList 1 {
DrawElementsUByte GL_TRIANGLES 36 {
5 16 10 10
16 21 11 22
8 8 22 19
7 18 2 2
18 13 1 12
4 4 12 15
17 14 23 23
14 20 0 3
6 6 3 9
}
}
VertexData {
Array TRUE ArrayID 1 Vec3fArray 24 {
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 1
-1 -1 1
-1 -1 1
-1 1 -1
-1 1 -1
-1 1 -1
-1 1 1
-1 1 1
-1 1 1
1 -1 -1
1 -1 -1
1 -1 -1
1 -1 1
1 -1 1
1 -1 1
1 1 -1
1 1 -1
1 1 -1
1 1 1
1 1 1
1 1 1
}
Indices FALSE
Binding BIND_PER_VERTEX
Normalize 0
}
NormalData {
Array TRUE ArrayID 2 Vec3fArray 24 {
-1 0 0
0 -1 0
0 0 -1
-1 0 0
0 -1 0
0 0 1
-1 0 0
0 0 -1
0 1 0
-1 0 0
0 0 1
0 1 0
0 -1 0
0 0 -1
1 0 0
0 -1 0
0 0 1
1 0 0
0 0 -1
0 1 0
1 0 0
0 0 1
0 1 0
1 0 0
}
Indices FALSE
Binding BIND_PER_VERTEX
Normalize 0
}
ColorData {
Array TRUE ArrayID 3 Vec4fArray 1 {
0.75 0.375 0.375 1
}
Indices FALSE
Binding BIND_OVERALL
Normalize 0
}
}
}
}
}
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
-2 0 0 1
}
}
osgAnimation::Skeleton {
UniqueID 15
Name "globalSkeleton"
UpdateCallback TRUE {
osgAnimation::UpdateSkeleton {
UniqueID 16
}
}
Children 2 {
osg::Geode {
UniqueID 17
Name "plyCube_SkinShape"
StateSet TRUE {
osg::StateSet {
UniqueID 18
ModeList 1 {
GL_CULL_FACE OFF
}
AttributeList 1 {
osg::LightModel {
UniqueID 19
AmbientIntensity 0 0 0 1
LocalViewer TRUE
TwoSided TRUE
}
Value OFF
}
}
}
Drawables 1 {
osgAnimation::RigGeometry {
UniqueID 20
DataVariance DYNAMIC
ComputeBoundingBoxCallback TRUE {
osg::ComputeBoundingBoxCallback {
UniqueID 21
}
}
SupportsDisplayList FALSE
UseVertexBufferObjects TRUE
UpdateCallback TRUE {
osg::UpdateCallback {
UniqueID 22
}
}
InfluenceMap 1 {
VertexInfluence jnt_Skin 24 {
0 1
1 1
2 1
3 1
4 1
5 1
6 1
7 1
8 1
9 1
10 1
11 1
12 1
13 1
14 1
15 1
16 1
17 1
18 1
19 1
20 1
21 1
22 1
23 1
}
}
SourceGeometry TRUE {
osg::Geometry {
UniqueID 23
Name "plyCube_SkinShape_lambert1"
DataVariance STATIC
UseDisplayList FALSE
UseVertexBufferObjects TRUE
PrimitiveSetList 1 {
DrawElementsUByte GL_TRIANGLES 36 {
5 16 10 10
16 21 11 22
8 8 22 19
7 18 2 2
18 13 1 12
4 4 12 15
17 14 23 23
14 20 0 3
6 6 3 9
}
}
VertexData {
Array TRUE ArrayID 5 Vec3fArray 24 {
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 1
-1 -1 1
-1 -1 1
-1 1 -1
-1 1 -1
-1 1 -1
-1 1 1
-1 1 1
-1 1 1
1 -1 -1
1 -1 -1
1 -1 -1
1 -1 1
1 -1 1
1 -1 1
1 1 -1
1 1 -1
1 1 -1
1 1 1
1 1 1
1 1 1
}
Indices FALSE
Binding BIND_PER_VERTEX
Normalize 0
}
NormalData {
Array TRUE ArrayID 6 Vec3fArray 24 {
-1 0 0
0 -1 0
0 0 -1
-1 0 0
0 -1 0
0 0 1
-1 0 0
0 0 -1
0 1 0
-1 0 0
0 0 1
0 1 0
0 -1 0
0 0 -1
1 0 0
0 -1 0
0 0 1
1 0 0
0 0 -1
0 1 0
1 0 0
0 0 1
0 1 0
1 0 0
}
Indices FALSE
Binding BIND_PER_VERTEX
Normalize 0
}
ColorData {
Array TRUE ArrayID 7 Vec4fArray 1 {
0.375 0.75 0.375 1
}
Indices FALSE
Binding BIND_OVERALL
Normalize 0
}
}
}
}
}
}
osgAnimation::Bone {
UniqueID 24
Name "jnt_Skin"
DataVariance DYNAMIC
UpdateCallback TRUE {
osgAnimation::UpdateBone {
UniqueID 25
Name "jnt_Skin_Callback"
StackedTransforms 3 {
osgAnimation::StackedTranslateElement {
UniqueID 26
Name "position"
}
osgAnimation::StackedQuaternionElement {
UniqueID 27
Name "quaternion"
}
osgAnimation::StackedScaleElement {
UniqueID 28
Name "scale"
Scale 1 1 1
}
}
}
}
Children 1 {
osg::MatrixTransform {
UniqueID 29
Name "plyCube_Child"
Children 1 {
osg::Geode {
UniqueID 30
Name "plyCube_ChildShape"
StateSet TRUE {
osg::StateSet {
UniqueID 31
ModeList 1 {
GL_CULL_FACE OFF
}
AttributeList 1 {
osg::LightModel {
UniqueID 32
AmbientIntensity 0 0 0 1
LocalViewer TRUE
TwoSided TRUE
}
Value OFF
}
}
}
Drawables 1 {
osg::Geometry {
UniqueID 33
Name "plyCube_ChildShape_lambert1"
DataVariance STATIC
UseDisplayList FALSE
UseVertexBufferObjects TRUE
PrimitiveSetList 1 {
DrawElementsUByte GL_TRIANGLES 36 {
5 16 10 10
16 21 11 22
8 8 22 19
7 18 2 2
18 13 1 12
4 4 12 15
17 14 23 23
14 20 0 3
6 6 3 9
}
}
VertexData {
Array TRUE ArrayID 9 Vec3fArray 24 {
-1 -1 -1
-1 -1 -1
-1 -1 -1
-1 -1 1
-1 -1 1
-1 -1 1
-1 1 -1
-1 1 -1
-1 1 -1
-1 1 1
-1 1 1
-1 1 1
1 -1 -1
1 -1 -1
1 -1 -1
1 -1 1
1 -1 1
1 -1 1
1 1 -1
1 1 -1
1 1 -1
1 1 1
1 1 1
1 1 1
}
Indices FALSE
Binding BIND_PER_VERTEX
Normalize 0
}
NormalData {
Array TRUE ArrayID 10 Vec3fArray 24 {
-1 0 0
0 -1 0
0 0 -1
-1 0 0
0 -1 0
0 0 1
-1 0 0
0 0 -1
0 1 0
-1 0 0
0 0 1
0 1 0
0 -1 0
0 0 -1
1 0 0
0 -1 0
0 0 1
1 0 0
0 0 -1
0 1 0
1 0 0
0 0 1
0 1 0
1 0 0
}
Indices FALSE
Binding BIND_PER_VERTEX
Normalize 0
}
ColorData {
Array TRUE ArrayID 11 Vec4fArray 1 {
0.375 0.375 0.75 1
}
Indices FALSE
Binding BIND_OVERALL
Normalize 0
}
}
}
}
}
Matrix {
1 0 0 0
0 1 0 0
0 0 1 0
2 0 0 1
}
}
}
}
}
}
}
}
}
}
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

