[osg-users] [osgPlugins] Problems building plugin fbx - osg-3.0.1

2013-07-31 Thread Flavien Du Peloux
Hi,

I know there is a lot of topics dealing with this subject and i'm pretty sure i 
read the most of them, but i still don't succeed to build my fbx plugin...

I am using OpenSceneGraph-3.0.1 with Visual Studio 2010, and i checked in 
ReaderWriterFBX.h that i need the FBX SDK version 2012.1.

The problem is the FBX SDK 2012.1 is not avalaible anymore to download on the 
website of autodesk.
So i downloaded the 2012.2 version to try with it, changed the security line in 
ReaderWriterFBX.h to make sure the problem wasn't there:


Code:

#if FBXSDK_VERSION_MAJOR != 2012 || FBXSDK_VERSION_MINOR != 1
#error Wrong FBX SDK version



TO

Code:

#if FBXSDK_VERSION_MAJOR != 2012 || FBXSDK_VERSION_MINOR != 2
#error Wrong FBX SDK version




I saw in a topic that i needed to cmake osg with good directory of fbx plugin, 
and i finally tried to build osg.
I have now some link errors like: 

Code:

fbxRAnimation.obj : error LNK2019: unresolved external symbol private: static 
void (__cdecl* fbxsdk_2012_2::KFbxAnimCurveKey::mDeallocatorFct)(class 
fbxsdk_2012_2::KFbxAnimCurveKeyImpl *) 
(?mDeallocatorFct@KFbxAnimCurveKey@fbxsdk_2012_2@@0P6AXPAVKFbxAnimCurveKeyImpl@2@@ZA)
 referenced in function public: virtual __thiscall 
fbxsdk_2012_2::KFbxAnimCurveKey::~KFbxAnimCurveKey(void) 
(??1KFbxAnimCurveKey@fbxsdk_2012_2@@UAE@XZ)
fbxRMesh.obj : error LNK2001: unresolved external symbol private: static void 
(__cdecl* fbxsdk_2012_2::KFbxAnimCurveKey::mDeallocatorFct)(class 
fbxsdk_2012_2::KFbxAnimCurveKeyImpl *) 
(?mDeallocatorFct@KFbxAnimCurveKey@fbxsdk_2012_2@@0P6AXPAVKFbxAnimCurveKeyImpl@2@@ZA)
fbxRMesh.obj : error LNK2001: unresolved external symbol public: static class 
fbxsdk_2012_2::kFbxClassId fbxsdk_2012_2::KFbxAnimStack::ClassId 
(?ClassId@KFbxAnimStack@fbxsdk_2012_2@@2VkFbxClassId@2@A)




I have a total of 17 unresolved external link errors like those ones, and now i 
don't know what to do.
I also checked that fbxsdk-2012.2.dll and fbxsdk-2012.2d.dll are present in my 
project bin directory

So my question is: is there a solution to build fbx plugin for osg-3.0.1 (using 
sdk 2012.1 or not, i don't care), or maybe someone has osgdb_fbx.dll already 
compiled ?
And if not, what can i do ? Upgrade to a newer osg version in wich fbx plugin 
can be built ?

Hope you guys can help me in this problem,
Thank you very much,
Flavien[/code]

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





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


Re: [osg-users] Particles problem

2013-07-31 Thread Flavien Du Peloux
Hi,

I am 4 years late but maybe it will help someone else.
I had a problem wich was similar to yours: i wanted to hide/show a node who had 
a particleSystemUpdater attached, and the accumulation problem came to me there.

So that's what i did to get around:
We should not hide/show the node (or ParticleSystemUpdater) attached to the 
ParticleSystem, but the Emitter. In my case, it was a ModularEmitter but it's 
the same.
And then you have 2 solutions, both work:

Code:

//hide or show the modular emitter
emitter-setNodeMask(0 or 1);





Code:

//set the counter of the emitter to 0. It's a little trick but it works.
//if you do this, remember that you have to have to set back the real counter 
of the emitter when you want to show again your particles
counter = new osgParticle::RandomRateCounter;
counter-setRateRange( osgParticle::rangef(0,0) );
emitter-setCounter(counter);




This solution might not be the best, but that's the only one i found for now.

Cheers,
Flavien

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





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