[osg-users] OSG 2.9.11 and Delta3D

2011-02-13 Thread Ken English
Hi,
I searched a bit on this and no luck - so apologies if this has already been 
discussed and handled.  I am trying to spin up Delta3D and OSG 2.9.11.  I am 
getting errors in the DatabasePager class.  

It appears some functionality required for D3D was removed from OSG in commit 
11994 (e.g., setMaximumNumOfObjectsToCompilePerFrame).  I know that this is 
more of a Delta3D problem, but was wondering if that change in functionality 
was purposeful as far as the disconnect from D3D.  I know that 2.9 is a 
developer release - but eager to pick up on the latest and greatest (e.g., iPad 
support, COLLADA improvements).

Sort term no big deal for me - just going to step back to osg 2.9.10, but 
thought you might want to know.  
... 
Thank you!

Ken


/delta3d-2.5.0/src/dtCore/databasepager.cpp: In function ‘void 
ReadDBPagerConfig(osgDB::DatabasePager, dtUtil::ConfigProperties*)’:
/delta3d-2.5.0/src/dtCore/databasepager.cpp:70: error: ‘class 
osgDB::DatabasePager’ has no member named 
‘setMaximumNumOfObjectsToCompilePerFrame’
/delta3d-2.5.0/src/dtCore/databasepager.cpp:77: error: ‘class 
osgDB::DatabasePager’ has no member named 
‘setMinimumTimeAvailableForGLCompileAndDeletePerFrame’
/delta3d-2.5.0/src/dtCore/databasepager.cpp:84: error: ‘class 
osgDB::DatabasePager’ has no member named ‘setTargetFrameRate’
/delta3d-2.5.0/src/dtCore/databasepager.cpp:145: error: ‘class 
osgDB::DatabasePager’ has no member named ‘setExpiryDelay’
/delta3d-2.5.0/src/dtCore/databasepager.cpp: In member function ‘void 
dtCore::DatabasePager::SetTargetFrameRate(double)’:
/delta3d-2.5.0/src/dtCore/databasepager.cpp:179: error: ‘class 
osgDB::DatabasePager’ has no member named ‘setTargetFrameRate’
/delta3d-2.5.0/src/dtCore/databasepager.cpp: In member function ‘double 
dtCore::DatabasePager::GetTargetFrameRate() const’:
/delta3d-2.5.0/src/dtCore/databasepager.cpp:185: error: ‘class 
osgDB::DatabasePager’ has no member named ‘getTargetFrameRate’
/delta3d-2.5.0/src/dtCore/databasepager.cpp: In member function ‘virtual void 
dtCore::DatabasePager::CompileGLObjects(osg::State, double) const’:
/delta3d-2.5.0/src/dtCore/databasepager.cpp:216: error: ‘class 
osgDB::DatabasePager’ has no member named ‘compileGLObjects’

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36583#36583





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


Re: [osg-users] unexecpted result with SetHomePosition

2011-02-13 Thread PC John
Hi Vincent,

void CameraManipulator::setHomePosition(const osg::Vec3d eye, const 
osg::Vec3d center, const osg::Vec3d up, bool autoComputeHomePosition=false)

takes eye parameter as a position of the camera.
Center is any position that camera is looking at, giving the orientation of 
the camera.
However, for orientation of the camera, you have to provide even up vector, 
that is given as a third parameter. You can not orient the camera without up 
vector.
The last parameter is a flag whether to recompute home position when you for 
instance, change the scene.

You may be interested to take a look at
void CameraManipulator::computeHomePosition(const osg::Camera *camera, bool 
useBoundingBox)

method as well to automatically set home position for your scene.
John

  Original message 
 From:  vincent sauvage sauv...@iut.u-clermont1.fr
 Subject:  [osg-users] unexecpted result with SetHomePosition
 Date:  11. 2. 2011  17:04:12
 
 Hi,
 
 my question concern setHomePosition of MatrixManipulator and subclasses.
 
 Parameters are quite explicite and in therory first one indicate position
 of camera, the seond parametre = target of camera ? Am i wrong... i surely
 forget some detail since  : in practice, position and direction of camera
 do not corespond to the parameter given to that method .
 
 I read old topic and some source example. .. but results are sometimes so
 strange when changing the parameters values, that make me think i should
 konw some important thing or tip about this method 
 
 Thank you for your help !
 
 Cheers,
 vincent
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36563#36563
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] unexecpted result with SetHomePosition

2011-02-13 Thread Ulrich Hertlein
Hi guys,

On 13/02/11 20:17 , PC John wrote:
 void CameraManipulator::setHomePosition(const osg::Vec3d eye, const 
 osg::Vec3d center, const osg::Vec3d up, bool autoComputeHomePosition=false)
 
 takes eye parameter as a position of the camera.
... 
 You may be interested to take a look at
 void CameraManipulator::computeHomePosition(const osg::Camera *camera, bool 
 useBoundingBox)

I believe the actually issue that the original poster has is that not all
CameraManipulators actually use these values.  E.g. the SphericalManipulator 
uses the
center but does it's own calculation for eye position, whereas the 
DriveManipulator uses
all three. (From memory.)

The individual behaviour is unfortunately not documented.

Cheers,
/ulrich

 my question concern setHomePosition of MatrixManipulator and subclasses.

 Parameters are quite explicite and in therory first one indicate position
 of camera, the seond parametre = target of camera ? Am i wrong... i surely
 forget some detail since  : in practice, position and direction of camera
 do not corespond to the parameter given to that method .

 I read old topic and some source example. .. but results are sometimes so
 strange when changing the parameters values, that make me think i should
 konw some important thing or tip about this method 
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] compiler errors

2011-02-13 Thread Mathias Buhr

Hi Gianni,

can you post the declarations of class A and class B? My guess is that 
you are missing a semicolon after your class declaration.


Regards
Mathias

On 11.02.2011 19:01, Gianni Ambrosio wrote:

Hi All,
I added #include Widget/Canvas in a header file and I have a bunch of compiler 
errors in every other header which includes it.

To solve the problem I have to include osgWidget/Canvas again in the second 
header file.

Example:

In ClassA.h I have
#include osgWidget/Canvas

In ClassB.h I use
#include ClassA.h

Compiling ClassB.h I get:

1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(231) : error 
C2143: syntax error : missing '}' before 'string'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(231) : error 
C2059: syntax error : 'string'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(236) : error 
C2143: syntax error : missing ';' before '}'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(236) : error 
C2238: unexpected token(s) preceding ';'
1x:\3rd_party\osg\OpenSceneGraph-2.8.3\include\osgDB/ReaderWriter(238) : error 
C2061: syntax error : identifier 'ReadStatus'
...

If I add
#include osgWidget/Canvas
to ClassB.h I don't have the errors compiling ClassB.

Any idea?

Regards
Gianni

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36570#36570





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



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


Re: [osg-users] Camera control in osgvisual

2011-02-13 Thread Torben Dannhauer
Hi Tedzini,

I'm not very familiar with CIGI, but it seem to be a communication library for 
communication with the sim-host.

I'm quite sure you can use CIGI not only for managing the camera but also for 
managing objects you want to display.

Currently osgVisuals cluster module is used to transport objects or camera 
modifications from the master to all slaves, but maybe that UDP implementation 
could be replaced by CIGI - it mainly depends on the performance.



Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36587#36587





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


Re: [osg-users] Main frame buffer corruption when using a slave camera to POST_RENDER to a FBO

2011-02-13 Thread Robert Osfield
Hi Roger,

Removing a camera while it's still being rendered might do some odd
things...  So stopping threading and adding and removing the camera is
the right thing to do.

However, I would add that I really wouldn't go dynamically adding and
removing slaves cameras like this, it'll be awful for performance and
generally awkward.   Camera's can be turned off by using the NodeMask
- just set it to 0, so I'd add slave Camera before your realize the
viewer then just switch it on when you need it.   Alternatively you
could place the Camera into the scene graph and then using the
NodeMask or a Switch above it to turn it on and off.

Robert.



On Sat, Feb 12, 2011 at 12:19 PM, Roger James
ro...@beardandsandals.co.uk wrote:
 Hi,

 I am seeing a a strange corruption of the main frame buffer when I use a 
 slave camera to render to a frame buffer object and set the camera render 
 order to POST_RENDER. The camera is set up like this.


 Code:
        pCamera-setClearColor(pViewer-getCamera()-getClearColor());
        pCamera-setViewport(0, 0, Width, Height);
        pCamera-setRenderOrder(osg::Camera::POST_RENDER);
        
 pCamera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT, 
 osg::Camera::FRAME_BUFFER);
        pCamera-setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR);
        pCamera-attach(osg::Camera::COLOR_BUFFER, pImage.get());
        
 pCamera-setGraphicsContext(pViewer-getCamera()-getGraphicsContext());


 //      pViewer-stopThreading(); It seems to work without this, but Robert 
 says it is needed, maybe it is not always needed for simple setups

        pViewer-addSlave(pCamera.get());
        pViewer-frame();
        pViewer-removeSlave(pViewer-findSlaveIndexForCamera(pCamera.get()));

 //      pViewer-startThreading();



 Immediately aftere this code has executed and before the next frame the the 
 main frame buffer scene has had a white half circle painted over it in 
 approximately the top third of the viewport. If I don't remove the slave 
 camera and allow it to render in following frames the white half circle still 
 dissappears on the following frames.

 I can fix this by setting the slave camera to PRE_RENDER in this case. But I 
 am really puzzled by this behaviour. Does anyone have any idea on what is 
 happening here? Why should a camera that has been set to render to a FBO be 
 causing things to be drawn in the real frame buffer?

 Roger

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36577#36577





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

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


Re: [osg-users] OSG 2.9.11 and Delta3D

2011-02-13 Thread Robert Osfield
Hi Ken,

This particular functionality has been from osg::DatabasePager into
the osgUtil::IncrementalCompileOperation.  For your build you could
probably get away with just commenting out the line, as it's just a
hint to the incremental compile system.

Robert.

On Sun, Feb 13, 2011 at 5:35 AM, Ken English kwengl...@gmail.com wrote:
 Hi,
 I searched a bit on this and no luck - so apologies if this has already been 
 discussed and handled.  I am trying to spin up Delta3D and OSG 2.9.11.  I am 
 getting errors in the DatabasePager class.

 It appears some functionality required for D3D was removed from OSG in commit 
 11994 (e.g., setMaximumNumOfObjectsToCompilePerFrame).  I know that this is 
 more of a Delta3D problem, but was wondering if that change in functionality 
 was purposeful as far as the disconnect from D3D.  I know that 2.9 is a 
 developer release - but eager to pick up on the latest and greatest (e.g., 
 iPad support, COLLADA improvements).

 Sort term no big deal for me - just going to step back to osg 2.9.10, but 
 thought you might want to know.
 ...
 Thank you!

 Ken


 /delta3d-2.5.0/src/dtCore/databasepager.cpp: In function ‘void 
 ReadDBPagerConfig(osgDB::DatabasePager, dtUtil::ConfigProperties*)’:
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:70: error: ‘class 
 osgDB::DatabasePager’ has no member named 
 ‘setMaximumNumOfObjectsToCompilePerFrame’
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:77: error: ‘class 
 osgDB::DatabasePager’ has no member named 
 ‘setMinimumTimeAvailableForGLCompileAndDeletePerFrame’
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:84: error: ‘class 
 osgDB::DatabasePager’ has no member named ‘setTargetFrameRate’
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:145: error: ‘class 
 osgDB::DatabasePager’ has no member named ‘setExpiryDelay’
 /delta3d-2.5.0/src/dtCore/databasepager.cpp: In member function ‘void 
 dtCore::DatabasePager::SetTargetFrameRate(double)’:
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:179: error: ‘class 
 osgDB::DatabasePager’ has no member named ‘setTargetFrameRate’
 /delta3d-2.5.0/src/dtCore/databasepager.cpp: In member function ‘double 
 dtCore::DatabasePager::GetTargetFrameRate() const’:
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:185: error: ‘class 
 osgDB::DatabasePager’ has no member named ‘getTargetFrameRate’
 /delta3d-2.5.0/src/dtCore/databasepager.cpp: In member function ‘virtual void 
 dtCore::DatabasePager::CompileGLObjects(osg::State, double) const’:
 /delta3d-2.5.0/src/dtCore/databasepager.cpp:216: error: ‘class 
 osgDB::DatabasePager’ has no member named ‘compileGLObjects’

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36583#36583





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

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


Re: [osg-users] NodetrackerManipulator crashes on activation if no Node is tracked.

2011-02-13 Thread Torben Dannhauer
Hi Robert,

your changes are working as expected.

Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36590#36590





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


Re: [osg-users] [3rdparty] NodeTrackerManipulator for a globe Earth (Geocentric coordinate system)

2011-02-13 Thread Torben Dannhauer
Hi Lv (is that your realname?),

what in detail does not work with the manipulator together with a round earh 
database?

Do you mean the up-vector of the camera, which is not updated and lead to an 
misalligned orientation relativ to the tracked node?


Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36591#36591





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


Re: [osg-users] OSG 2.9.11 and Delta3D

2011-02-13 Thread Ken English
Thanks for the assist - the errors related to SetTargetFrameRate sent me down a 
false path.
-Ken

[quote=robertosfield]Hi Ken,

This particular functionality has been from osg::DatabasePager into
the osgUtil::IncrementalCompileOperation.  For your build you could
probably get away with just commenting out the line, as it's just a
hint to the incremental compile system.

Robert.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36592#36592





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


[osg-users] TextureAtlasBuilder

2011-02-13 Thread Pumipat Doungklang
Hi all,

I am very new in openscenegraph, I just want to know how to use
MergeGeometryVisitor  TextureAtlasBuilder for improving my scenegraph.
Could someone give me please an explanation and the example of source code
for using these two classes.

Thank you very much

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


Re: [osg-users] Camera control in osgvisual

2011-02-13 Thread ted morris
yes... I'll have to have a closer look at this when I have some time. Thanks
for spending to the to
develop an interface for this functionality; I think it will be very useful.

-t


On Sun, Feb 13, 2011 at 5:48 AM, Torben Dannhauer tor...@dannhauer.infowrote:

 Hi Tedzini,

 I'm not very familiar with CIGI, but it seem to be a communication library
 for communication with the sim-host.

 I'm quite sure you can use CIGI not only for managing the camera but also
 for managing objects you want to display.

 Currently osgVisuals cluster module is used to transport objects or
 camera modifications from the master to all slaves, but maybe that UDP
 implementation could be replaced by CIGI - it mainly depends on the
 performance.



 Cheers,
 Torben

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=36587#36587





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

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


Re: [osg-users] TextureAtlasBuilder

2011-02-13 Thread Jean-Sébastien Guay

Hello Phummipat,


I am very new in openscenegraph, I just want to know how to use
MergeGeometryVisitor  TextureAtlasBuilder for improving my scenegraph.
Could someone give me please an explanation and the example of source
code for using these two classes.


You can in fact use them without writing any code. Just set the 
OSG_OPTIMIZER emvironment variable to 
MERGE_GEOMETRY|TEXTURE_ATLAS_BUILDER and run


osgconv infile outfile

For example osgconv somemodelfile.osg optimizedfile.ive

You may want to experiment with other optimizer options, run osgconv 
--help-env to see all the available options.


This will also embed the textures into the .ive file, and .ive is a more 
efficient binary format which loads quickly. OSG SVN trunk also has the 
.osgb format which is even better.


If you want to write your own optimizing program, though, look at the 
source for the osgUtil::Optimizer to learn how to use the 
MergeGeometryVisitor and TextureAtlasBuilder.


Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Controlling animations in FBX models

2011-02-13 Thread Thomas Hogarth
Hi Renato / others

I've finished my animation splitting system, seems to do the job for me. I
used osgDB XmlPaser to allow an xml file to be used for config and have
successfully loaded my original long animation file and split it
into separate 'takes'.

Attached is the cpp and an example config file. I think it's pretty straight
forward.

Let me know if you get stuck
Cheers
Tom

PS
At the moment exporting to .osgb seems to be the only format that works.
Source file can be whatever you previously had e.g. fbx
//
//Simple animation split util, will load an xml config file from ./splitConfig.xml and
//use it to specify a source file, output/destination file and a set of new split animations
//key use of this tool is to split one long animatiob from 3ds max into multiple 'takes'
//

#include osgDB/ReadFile
#include osgDB/WriteFile
#include osgDB/FileUtils
#include osgDB/XmlParser

#include osgAnimation/BasicAnimationManager
#include osgAnimation/AnimationManagerBase

//
//finds and returns the fist AnimationManagerBase in the subgraph
struct AnimationManagerFinder : public osg::NodeVisitor
{
osg::ref_ptrosgAnimation::BasicAnimationManager _am;
AnimationManagerFinder() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
void apply(osg::Node node) {
if (_am.valid())
return;
if (node.getUpdateCallback()) {
osgAnimation::AnimationManagerBase* b = dynamic_castosgAnimation::AnimationManagerBase*(node.getUpdateCallback());
if (b) {
_am = new osgAnimation::BasicAnimationManager(*b);
node.setUpdateCallback(_am.get());
return;
}
}
traverse(node);
}
};

//
//Finds an Animation by name, returning a pointer to the animation
//and a pointer to the manager it was found in
struct FindOsgAnimationByName : public osg::NodeVisitor
{
	//the name of the source animation we are looking for
	std::string _sourceAnimationName;

	//used to return the animation and the manager it was stored in
	osgAnimation::Animation* p_ani;
	osgAnimation::AnimationManagerBase* p_manager;

	FindOsgAnimationByName(std::string sourceAnimationName) 
		: osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
		p_ani(NULL),
		p_manager(NULL),
		_sourceAnimationName(sourceAnimationName)
	{
	}
	void apply(osg::Node node) {

		if (node.getUpdateCallback()) {
			osgAnimation::AnimationManagerBase* b = dynamic_castosgAnimation::AnimationManagerBase*(node.getUpdateCallback());
			if (b) {
//we have found a valid osgAnimation manager, now look for the single long animation inside with the desired name
osgAnimation::AnimationList aniList = b-getAnimationList();
for(unsigned int i=0; ianiList.size(); i++){
	if(aniList[i]-getName() == _sourceAnimationName){
		p_manager = b;
		p_ani = aniList[i].get();
		return;
	}
}
			}
		}
		traverse(node);
	}
};

class AnimationUtils
{
public:

	//returns the index of the keyframe closest to the passed time
	//returns -1 if the time is out of range of the key container
	template typename ContainerType
	static int GetNearestKeyFrameIndex(ContainerType* keyContainer, double time)
	{
		if(!keyContainer){return -1;}

		int closestFrame = -1;
		double closestDiff = 9.99f;

		//loop all the keys
		for(unsigned int i=0; ikeyContainer-size(); i++)
		{
			double diff = fabs(time - (*keyContainer)[i].getTime());
			if( diff  closestDiff){
closestFrame = i;
closestDiff = diff;
			}
		}
		return closestFrame;
	}

	 Helper method for resampling channels
	template typename ChannelType, typename ContainerType
	static osg::ref_ptrChannelType ResampleChannel(ChannelType* sourceChannel, unsigned int startFrame, unsigned int endFrame, int fps)
	{
		osg::ref_ptrChannelType newChannel = NULL;
		if(!sourceChannel){
			return newChannel;
		}

		//get the key frame container from the source channel
		ContainerType* sourceKeyCont  = sourceChannel-getSamplerTyped()-getKeyframeContainerTyped();

		if (sourceKeyCont)
		{
			OSG_INFO  OsgAnimationTools ResampleChannel INFO: Resampling source channel '  sourceChannel-getName() 
	  ', from startFrame '  startFrame  ' to endFrame '  endFrame  . Total frames in source channel '  sourceKeyCont-size()  '.  std::endl;
			
			if(startFrame = sourceKeyCont-size() || endFrame = sourceKeyCont-size())
			{
OSG_WARN  OsgAnimationTools ResampleChannel ERROR: startFrame or endFrame is out of range,  std::endl
		   startFrame '  startFrame  ', endFrame '  endFrame  . Total frames in source channel '  sourceKeyCont-size()  '.  std::endl;

return newChannel;
			}

			//determine the copy direction, i.e. lets see if we can copy frames in reverse as could come in handy
			unsigned int from=startFrame;
			unsigned int to=endFrame;
			if(startFrame  endFrame){
from = endFrame;
to = startFrame;
			}

			//get our frames as a times 
			double fromTime = from == 0 ? 0.0f : 

Re: [osg-users] osgart 2.0 with osg2.9.8 video blinking

2011-02-13 Thread Thomas Hogarth
Hi Michele

That looks to be a problem with osgArt, think it is saying that you have a 
function called setSize in a header file but no implementation in the cpp.

Have a look for the implementation

Cheers
Tom

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36597#36597





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


Re: [osg-users] Controlling animations in FBX models

2011-02-13 Thread Thomas Hogarth
Attached is the cpp and an example config file. I think it's pretty
straight forward.

Looks like the forum blocked my xml config so here is a copy in the post
below

?xml version=1.0 encoding=ISO-8859-15?
OsgAnimationTools sourceFile='./Data/Models/Terrorist/terrorist.FBX'
destinationFile='./splitExport.osgb' fps='30'
AnimationSplit sourceAnimation='Take 001'
NewAnimation name='staying' startFrame='0' endFrame='49'/
NewAnimation name='fire_standing' startFrame='50' endFrame='89'/
NewAnimation name='running' startFrame='90' endFrame='111'/
NewAnimation name='walking' startFrame='112' endFrame='147'/
NewAnimation name='grenade_throw' startFrame='148' endFrame='187'/
NewAnimation name='hide_behind_wall' startFrame='188' endFrame='213'/
NewAnimation name='from_standing_to_squat' startFrame='214'
endFrame='241'/
NewAnimation name='fire_sguating' startFrame='242' endFrame='291'/
NewAnimation name='from_sguating_to_stand' startFrame='292'
endFrame='313'/
NewAnimation name='jump_down' startFrame='314' endFrame='359'/
NewAnimation name='fire_lying' startFrame='360' endFrame='379'/
NewAnimation name='stand_up' startFrame='380' endFrame='425'/
NewAnimation name='dying_on_belt' startFrame='426' endFrame='532'/
NewAnimation name='dying_on_spin' startFrame='533' endFrame='568'/
NewAnimation name='jump' startFrame='569' endFrame='614'/
/AnimationSplit
/OsgAnimationTools
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Camera control in osgvisual

2011-02-13 Thread Philip Taylor
Last time I downloaded the CIGI source code it came with an OSG application
 MPV aka Multi-Purpose Viewer

 

http://cigi.sourceforge.net/

 

Looking at the WIKI page at the above site, it states that it requires OSG
2.4 but will work with 2.6 - that makes it quite an old implementation but
MPV is only supposed to be an example, with limited functionality. It would
be real cool to have an updated version ...

 

PhilT

 

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ted morris
Sent: 13 February 2011 20:14
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Camera control in osgvisual

 

 

yes... I'll have to have a closer look at this when I have some time. Thanks
for spending to the to

develop an interface for this functionality; I think it will be very useful.

 

-t

 

On Sun, Feb 13, 2011 at 5:48 AM, Torben Dannhauer tor...@dannhauer.info
wrote:

Hi Tedzini,

I'm not very familiar with CIGI, but it seem to be a communication library
for communication with the sim-host.

I'm quite sure you can use CIGI not only for managing the camera but also
for managing objects you want to display.

Currently osgVisuals cluster module is used to transport objects or camera
modifications from the master to all slaves, but maybe that UDP
implementation could be replaced by CIGI - it mainly depends on the
performance.




Cheers,
Torben

--
Read this topic online here:

http://forum.openscenegraph.org/viewtopic.php?p=36587#36587






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

 

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


Re: [osg-users] Controlling animations in FBX models

2011-02-13 Thread Renato Silveira
Thank you very mutch!
I will check it.

Renato

On Sun, Feb 13, 2011 at 7:06 PM, Thomas Hogarth thomas.hoga...@gmail.comwrote:

 Attached is the cpp and an example config file. I think it's pretty
 straight forward.

 Looks like the forum blocked my xml config so here is a copy in the post
 below

 ?xml version=1.0 encoding=ISO-8859-15?
 OsgAnimationTools sourceFile='./Data/Models/Terrorist/terrorist.FBX'
 destinationFile='./splitExport.osgb' fps='30'
  AnimationSplit sourceAnimation='Take 001'
 NewAnimation name='staying' startFrame='0' endFrame='49'/
  NewAnimation name='fire_standing' startFrame='50' endFrame='89'/
 NewAnimation name='running' startFrame='90' endFrame='111'/
  NewAnimation name='walking' startFrame='112' endFrame='147'/
 NewAnimation name='grenade_throw' startFrame='148' endFrame='187'/
  NewAnimation name='hide_behind_wall' startFrame='188' endFrame='213'/
 NewAnimation name='from_standing_to_squat' startFrame='214'
 endFrame='241'/
  NewAnimation name='fire_sguating' startFrame='242' endFrame='291'/
 NewAnimation name='from_sguating_to_stand' startFrame='292'
 endFrame='313'/
  NewAnimation name='jump_down' startFrame='314' endFrame='359'/
 NewAnimation name='fire_lying' startFrame='360' endFrame='379'/
  NewAnimation name='stand_up' startFrame='380' endFrame='425'/
 NewAnimation name='dying_on_belt' startFrame='426' endFrame='532'/
  NewAnimation name='dying_on_spin' startFrame='533' endFrame='568'/
 NewAnimation name='jump' startFrame='569' endFrame='614'/
  /AnimationSplit
 /OsgAnimationTools




-- 
Renato Silveira (Ph. D. Student)

Informatics Institute - UFRGS
Porto Alegre - RS - Brazil
http://www.inf.ufrgs.br/~rsilveira
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Camera control in osgvisual

2011-02-13 Thread Torben Dannhauer
Hi Philip,

MPV ist OSG based? very interesting! That pushes CIGI a little bit closer to 
the top of my stack  :)


Thank you!

Cheers,
Torben

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36603#36603





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


[osg-users] Transparent Viewers/Close Viewer

2011-02-13 Thread Andrew Kos
Hello,

I am currently building an application that uses multiple viewers within a 
composite viewer. Is there a way to make a viewer semi-transparent? Also, is 
there a way to temporarily close/reopen a viewer?

Thanks

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=36602#36602





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