Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-21 Thread pp

Cedric Pinson wrote:

Hi pp,

Did you try to modify an osgAnimation example and add a
osgDB::writeNodeFile of the root node to see if it writes the animation
correctly in a osg file ?

Cheers,
Cedric 



  
Hi Cedric, yes I did, and this is exactly what is not working, and my 
original question.
I took the example osgAninmationNode, exchanged the main procedure to 
write out an osg file.
This was not working, no update callbacks in the file. In that file you 
create a class deriving from NodeCallback.
And that seems to be the Problem, Instead of this I need to use a class 
from osgAnimation itself, otherwise the writer can't write it.


Cheers, searching for the Pivot of my Soul, PP !!!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-21 Thread Thrall, Bryan
p...@graphics.cs.uni-sb.de wrote on Wednesday, October 21, 2009 8:05 AM:

 Cedric Pinson wrote:
 Hi pp,
 
 Did you try to modify an osgAnimation example and add a
 osgDB::writeNodeFile of the root node to see if it writes the
animation
 correctly in a osg file ? 
 
 Cheers,
 Cedric
 
 
 
 Hi Cedric, yes I did, and this is exactly what is not working, and my
 original question.
 I took the example osgAninmationNode, exchanged the main procedure to
 write out an osg file.
 This was not working, no update callbacks in the file. In that file
you
 create a class deriving from NodeCallback.
 And that seems to be the Problem, Instead of this I need to use a
class
 from osgAnimation itself, otherwise the writer can't write it.

You can look at src/osgPlugins/osgAnimation/ReaderWriter.cpp to see how
to write your own classes to .osg format, for example.

HTH,
-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-20 Thread pp

Thrall, Bryan wrote:

p...@graphics.cs.uni-sb.de wrote on Monday, October 19, 2009 3:14 AM:

  

The reason you get no update callback in the .osg file is that
osganimationnode uses a custom callback, AnimtkUpdateCallback, that
  

the
  

.osg writer doesn't know about.

  

From the OpenSceneGraph-Data .osg files that have animation (such as


robot.osg), it looks like osgAnimation::BasicAnimationManager is
supported, so you could start with using that instead of
AnimtkUpdateCallback. 


HTH,

  

Had the same guess, but did not manage to get it to work. Example Code
would be cool, so I could go on from this point, thx.



Unfortunately, I am not familiar with osgAnimation, so I don't really
know how to create one. I would recommend looking at the contents of
robot.osg and comparing it to the interface of the osgAnimation classes;
you could also look at the other osgAnimation examples
(osganimationsolid seems to use BasicAnimationManager, for example).

I tested that osgAnimation callbacks can be written to files using
'osgconv robot.osg robot2.osg' and they seemed to be written to
robot2.osg just fine.

Sorry I can't help further.
  

Thx you for your affords, but unfortunately that does not solve the problem.
I manage to convert an osg file with callbacks into an osg file with 
callbacks as well.
But I can't figure out what's happening underneath the hood, so that I 
can not reproduce from scratch.
Unfortunately there is no example which is doing this, only osg files 
with callbacks, or executables.


But this functionality is required to write an osg Exporter with 
osgAnimation support.


Cheers, searching for the Pivot of my Soul, PP !!!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-20 Thread Cedric Pinson
Hi pp,

Did you try to modify an osgAnimation example and add a
osgDB::writeNodeFile of the root node to see if it writes the animation
correctly in a osg file ?

Cheers,
Cedric 

-- 
+33 659 598 614  Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Tue, 2009-10-20 at 08:30 +0200, p...@graphics.cs.uni-sb.de wrote:
 Thrall, Bryan wrote:
  p...@graphics.cs.uni-sb.de wrote on Monday, October 19, 2009 3:14 AM:
 

  The reason you get no update callback in the .osg file is that
  osganimationnode uses a custom callback, AnimtkUpdateCallback, that

  the

  .osg writer doesn't know about.
 

  From the OpenSceneGraph-Data .osg files that have animation (such as
  
  robot.osg), it looks like osgAnimation::BasicAnimationManager is
  supported, so you could start with using that instead of
  AnimtkUpdateCallback. 
 
  HTH,
 

  Had the same guess, but did not manage to get it to work. Example Code
  would be cool, so I could go on from this point, thx.
  
 
  Unfortunately, I am not familiar with osgAnimation, so I don't really
  know how to create one. I would recommend looking at the contents of
  robot.osg and comparing it to the interface of the osgAnimation classes;
  you could also look at the other osgAnimation examples
  (osganimationsolid seems to use BasicAnimationManager, for example).
 
  I tested that osgAnimation callbacks can be written to files using
  'osgconv robot.osg robot2.osg' and they seemed to be written to
  robot2.osg just fine.
 
  Sorry I can't help further.

 Thx you for your affords, but unfortunately that does not solve the problem.
 I manage to convert an osg file with callbacks into an osg file with 
 callbacks as well.
 But I can't figure out what's happening underneath the hood, so that I 
 can not reproduce from scratch.
 Unfortunately there is no example which is doing this, only osg files 
 with callbacks, or executables.
 
 But this functionality is required to write an osg Exporter with 
 osgAnimation support.
 
 Cheers, searching for the Pivot of my Soul, PP !!!
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-19 Thread pp



The reason you get no update callback in the .osg file is that
osganimationnode uses a custom callback, AnimtkUpdateCallback, that the
.osg writer doesn't know about.

From the OpenSceneGraph-Data .osg files that have animation (such as
robot.osg), it looks like osgAnimation::BasicAnimationManager is
supported, so you could start with using that instead of
AnimtkUpdateCallback.

HTH,
  
Had the same guess, but did not manage to get it to work. Example Code 
would be cool, so I could go on from this point, thx.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-19 Thread pp

Cedric Pinson wrote:

Hi pp,
What is the function setupAnimtkNode ? and which version of
OpenSceneGraph are you using ?
  

Hi Cedric, we always use the current stable release, currently osg 2.8.2.

I am also referring the example osganimationnode from this version, so I 
am using class AnimtkUpdateCallback : public osg::NodeCallback without 
change.
I tried to derive from osgAnimation::BasicAnimationManager but did not 
get it working.


Cheers, searching for the Pivot of my Soul, PP !!!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-19 Thread Thrall, Bryan
p...@graphics.cs.uni-sb.de wrote on Monday, October 19, 2009 3:14 AM:

 The reason you get no update callback in the .osg file is that
 osganimationnode uses a custom callback, AnimtkUpdateCallback, that
the
 .osg writer doesn't know about.
 
 From the OpenSceneGraph-Data .osg files that have animation (such as
 robot.osg), it looks like osgAnimation::BasicAnimationManager is
 supported, so you could start with using that instead of
 AnimtkUpdateCallback. 
 
 HTH,
 
 Had the same guess, but did not manage to get it to work. Example Code
 would be cool, so I could go on from this point, thx.

Unfortunately, I am not familiar with osgAnimation, so I don't really
know how to create one. I would recommend looking at the contents of
robot.osg and comparing it to the interface of the osgAnimation classes;
you could also look at the other osgAnimation examples
(osganimationsolid seems to use BasicAnimationManager, for example).

I tested that osgAnimation callbacks can be written to files using
'osgconv robot.osg robot2.osg' and they seemed to be written to
robot2.osg just fine.

Sorry I can't help further.
-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-16 Thread Cedric Pinson
Hi pp,
What is the function setupAnimtkNode ? and which version of
OpenSceneGraph are you using ?


Cheers,
Cedric

-- 
+33 659 598 614  Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Fri, 2009-10-16 at 11:31 +0200, p...@graphics.cs.uni-sb.de wrote:
 Please, anybody, point me to a piece on informationt, thx.
 
 I try to write osgAnimation Callbacks into an osg file but don't get it to 
 work.
 All available osgAnimation examples create executables, but no osg files. 
 
 When I use osgDB::writeNodeFile( *someScene , someScene.osg ) ;
 
 instead of creating a viewer, the code block between UpdateCallbacks 
 parenthesis stays empty in the resulting osg file, but this is where I 
 would expect keyframe and channel data. The Blender Exporter is also not 
 helpful, as it uses its own mechanism to write out osg files through 
 Python.
 
 Can anybody explain / post / create an example that writes a simple 
 osgAnimation into an osg file, please or point to information on that ?
 
 
 Problem reconstruction :
 
 osgAnimation Example osganimationnode, exchange the main proc. Instead 
 of creating a viewer write out a file, as this.
 
 int main( int , char** )
 {
 osg::ref_ptr osg::Group  root = new osg::Group ;
 root-setInitialBound(osg::BoundingSphere(osg::Vec3(10,0,10), 30));
 root-addChild(createAxis());
 
 osg::MatrixTransform* node = setupAnimtkNode();
 root-addChild(node);
 
 if ( !root.valid() )
 osg::notify( osg::FATAL )  Failed in createSceneGraph() !  
 std::endl ;
 bool arg = false;
 
 bool  result = osgDB::writeObjectFile( * ( root.get() ) , 
 animNode.osg ) ;
 if ( !result )
 osg::notify( osg::FATAL )  Failed in osgDB::writeNodeFile() 
 !  std::endl ;
 }
 
 
 
 Cheers, searching for the Pivot of my Soul, PP !!!
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Write osgAnimation callbacks into osg files - no Information available ?

2009-10-16 Thread Thrall, Bryan
p...@graphics.cs.uni-sb.de wrote on Friday, October 16, 2009 4:32 AM:
 Problem reconstruction :
 
 osgAnimation Example osganimationnode, exchange the main proc. Instead
 of creating a viewer write out a file, as this.
 
 int main( int , char** )
 {
 osg::ref_ptr osg::Group  root = new osg::Group ;
 root-setInitialBound(osg::BoundingSphere(osg::Vec3(10,0,10),
30));
 root-addChild(createAxis());
 
 osg::MatrixTransform* node = setupAnimtkNode();
 root-addChild(node);
 
 if ( !root.valid() )
 osg::notify( osg::FATAL )  Failed in createSceneGraph() !

 std::endl ;
 bool arg = false;
 
 bool  result = osgDB::writeObjectFile( * ( root.get() ) ,
 animNode.osg ) ;
 if ( !result )
 osg::notify( osg::FATAL )  Failed in osgDB::writeNodeFile()
 !  std::endl ;
 }

The reason you get no update callback in the .osg file is that
osganimationnode uses a custom callback, AnimtkUpdateCallback, that the
.osg writer doesn't know about.

From the OpenSceneGraph-Data .osg files that have animation (such as
robot.osg), it looks like osgAnimation::BasicAnimationManager is
supported, so you could start with using that instead of
AnimtkUpdateCallback.

HTH,
-- 
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org