Discussion:
[osg-users] osganimationhardware example
Giuseppe Donvito
2018-10-24 12:21:07 UTC
Permalink
Does anyone recently tested osganimationhardware example in OpenSceneGraph-3.6 branch?
I'm running it with usual nathan.osg model and seems to be broken.
Is there something wrong with osganimationhardware or it's a backward compatibility issue?

Thanks
G

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75113#75113
Julien Valentin
2018-10-24 18:52:36 UTC
Permalink
Hi,
It comes from a know bug:
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom

Code:


rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);



Thank you!

Cheers,
Julien

------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75116#75116
Giuseppe Donvito
2018-10-25 07:39:22 UTC
Permalink
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75123#75123
Julien Valentin
2018-10-25 13:10:02 UTC
Permalink
You'reright,
there is a diff between my git and the release 3.6

the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work

If you can validate this change, i would make a pr to fix it
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75126#75126
Giuseppe Donvito
2018-10-25 14:28:40 UTC
Permalink
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G
Post by Julien Valentin
You'reright,
there is a diff between my git and the release 3.6
the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work
If you can validate this change, i would make a pr to fix it
https://github.com/openscenegraph/OpenSceneGraph/pull/650
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75127#75127
Julien Valentin
2018-10-25 15:13:49 UTC
Permalink
Mmmh I compiled 3.6 only to pr and checked the results...
Are you sure you apply the hack to avoid ss sharing?
You need both the correction AND the in order this to work
Post by Giuseppe Donvito
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G
Post by Julien Valentin
You'reright,
there is a diff between my git and the release 3.6
the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work
If you can validate this change, i would make a pr to fix it
https://github.com/openscenegraph/OpenSceneGraph/pull/650
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75129#75129
Giuseppe Donvito
2018-10-25 15:47:30 UTC
Permalink
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G
Post by Julien Valentin
Mmmh I compiled 3.6 only to pr and checked the results...
Are you sure you've applied the hack to avoid ss sharing?
You need both the source correction AND the example hack in order this to work
Post by Giuseppe Donvito
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G
Post by Julien Valentin
You'reright,
there is a diff between my git and the release 3.6
the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work
If you can validate this change, i would make a pr to fix it
https://github.com/openscenegraph/OpenSceneGraph/pull/650
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75131#75131
Julien Valentin
2018-10-25 16:03:11 UTC
Permalink
I have checked and it seals to work.
you also must launch the example in a directory containing skinning.vert
Did you do that?
check error outputs
...
Post by Giuseppe Donvito
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G
Post by Julien Valentin
Mmmh I compiled 3.6 only to pr and checked the results...
Are you sure you've applied the hack to avoid ss sharing?
You need both the source correction AND the example hack in order this to work
Post by Giuseppe Donvito
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G
Post by Julien Valentin
You'reright,
there is a diff between my git and the release 3.6
the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work
If you can validate this change, i would make a pr to fix it
https://github.com/openscenegraph/OpenSceneGraph/pull/650
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75132#75132
Julien Valentin
2018-10-25 17:14:48 UTC
Permalink
Hi
In fact the mapvisitor was not involves, I react to soon to a maybe-bug.
i closed the pr...
The answer to your problem is my first post
...or that you forgot the shader...

Cheers
I have checked and it seems to work.
you also must launch the example from a directory containing skinning.vert
Did you do that?
check error outputs
...
Post by Giuseppe Donvito
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G
Post by Julien Valentin
Mmmh I compiled 3.6 only to pr and checked the results...
Are you sure you've applied the hack to avoid ss sharing?
You need both the source correction AND the example hack in order this to work
Post by Giuseppe Donvito
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G
Post by Julien Valentin
You'reright,
there is a diff between my git and the release 3.6
the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work
If you can validate this change, i would make a pr to fix it
https://github.com/openscenegraph/OpenSceneGraph/pull/650
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75135#75135
Giuseppe Donvito
2018-10-26 07:45:30 UTC
Permalink
I confirm, it was the shaders. if you use openscenegraph-data repo you have to modify the example adding the proper shader path.
Moreover in the pre-osganimation refactoring version, the example worked well without shaders too, falling back to "software" implementation.

Anyway you can post the fix for osganimationhardware that actually solves the issue.

Thanks!

Cheers,
Giuseppe
Post by Julien Valentin
Hi
In fact the mapvisitor was not involves, I react to soon to a maybe-bug.
i closed the pr...
The answer to your problem is my first post
...or that you forgot the shader file in launch directory...
Cheers
I have checked and it seems to work.
you also must launch the example from a directory containing skinning.vert
Did you do that?
check error outputs
...
Post by Giuseppe Donvito
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G
Post by Julien Valentin
Mmmh I compiled 3.6 only to pr and checked the results...
Are you sure you've applied the hack to avoid ss sharing?
You need both the source correction AND the example hack in order this to work
Post by Giuseppe Donvito
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G
Post by Julien Valentin
You'reright,
there is a diff between my git and the release 3.6
the problem seams to be in osgAnmiation/BoneMapVisitor
by removing apply(Node&) function make all work
If you can validate this change, i would make a pr to fix it
https://github.com/openscenegraph/OpenSceneGraph/pull/650
Post by Giuseppe Donvito
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...
Thanks
Giuseppe
Post by Julien Valentin
Hi,
HardwareTransform doesn't support RigGeometry sharing StateSet.
One day, I may correct the exampple myHardwareTransform in order to use one overall bonemap common to multiple rigs...
You can make example work adding this line before copyFrom
rig.getSourceGeometry()->setStateSet( (osg::StateSet*) rig.getSourceGeometry()->getStateSet()->clone(osg::CopyOp::SHALLOW_COPY));
// copy shallow from source geometry to rig
rig.copyFrom(source);
Thank you!
Cheers,
Julien
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75139#75139

Loading...