OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

osganimationhardware example


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
donvito
Newbie


Joined: 23 Jun 2011
Posts: 16

PostPosted: Wed Oct 24, 2018 12:21 pm    Post subject:
osganimationhardware example
Reply with quote

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
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Wed Oct 24, 2018 6:52 pm    Post subject:
Reply with quote

Hi,
It comes from a know bug:
HardwareTransform doesn't support RigGeometries sharing the same 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:

     
        source.setStateSet( (osg::StateSet*)  source.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


Last edited by mp3butcher (Julien Valentin) on Thu Oct 25, 2018 1:52 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
donvito
Newbie


Joined: 23 Jun 2011
Posts: 16

PostPosted: Thu Oct 25, 2018 7:39 am    Post subject:
Reply with quote

Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Thu Oct 25, 2018 1:09 pm    Post subject:
Reply with quote

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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message Visit poster's website
donvito
Newbie


Joined: 23 Jun 2011
Posts: 16

PostPosted: Thu Oct 25, 2018 2:28 pm    Post subject:
Reply with quote

Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G

mp3butcher wrote:
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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Thu Oct 25, 2018 3:13 pm    Post subject:
Reply with quote

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

donvito wrote:
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G

mp3butcher wrote:
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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message Visit poster's website
donvito
Newbie


Joined: 23 Jun 2011
Posts: 16

PostPosted: Thu Oct 25, 2018 3:47 pm    Post subject:
Reply with quote

sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G


mp3butcher wrote:
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

donvito wrote:
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G

mp3butcher wrote:
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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Thu Oct 25, 2018 4:03 pm    Post subject:
Reply with quote

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
...

donvito wrote:
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G


mp3butcher wrote:
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

donvito wrote:
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G

mp3butcher wrote:
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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message Visit poster's website
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 484
Location: France

PostPosted: Thu Oct 25, 2018 5:14 pm    Post subject:
Reply with quote

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
mp3butcher wrote:
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
...

donvito wrote:
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G


mp3butcher wrote:
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

donvito wrote:
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G

mp3butcher wrote:
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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message Visit poster's website
donvito
Newbie


Joined: 23 Jun 2011
Posts: 16

PostPosted: Fri Oct 26, 2018 7:45 am    Post subject:
Reply with quote

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

mp3butcher wrote:
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
mp3butcher wrote:
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
...

donvito wrote:
sure I made both changes of course.
Please run the example by yourself and you will see the same issue.
G


mp3butcher wrote:
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

donvito wrote:
Nope, the same result sorry.
Do you have a chance to test the example on your side?
Thanks
G

mp3butcher wrote:
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
donvito wrote:
Uhmm, actually it seems not enough.
As you can see in this screenshot the nathans are still in T-pose while playing...

Thanks
Giuseppe

mp3butcher wrote:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts osganimationhardware does not seem to... DrPowers General 0 Tue May 05, 2015 9:52 pm View latest post
No new posts osganimationhardware example osg 3.0.1 tomhog General 4 Thu Sep 29, 2011 2:27 am View latest post
No new posts osganimationhardware Cedric Pinson Submission 1 Fri Nov 13, 2009 1:45 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP