Re: [osg-users] [osgPlugins] FBX: skinned mesh messed up

2011-08-15 Thread Michael Platings
Hi Alessandro, thanks for the example.
osgAnimation only allows one skeleton per RigGeometry, and the FBX importer
assumes that no more than one skeleton will be attached to a mesh, hence the
messed up results.
Can you explain why multiple skeletons are attached? If the importer merged
the skeletons into one would that be OK?

Apologies for the delayed response btw, I've switched jobs so I don't have
much time to spend on this any more but I'll still try to help occasionally.
Cheers
-Michael

On 17 July 2011 11:31, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi
 I finally managed to make a simple model that shows an issue I usually
 experience with skinned characters, ie the mesh is messed up when imported
 in OSG.

 I'm attaching a very simple FBX model: 1 mesh, 2 bones systems and a dummy
 object used to control one of the bones systems, no animations at all.

 I created the model in 3dsMax and noticed that the problem appears if there
 are 2 bones systems (4 bones) attached to the same mesh and one system is
 also linked to a dummy object (see the example I'm attaching) - if there is
 just one system (2 bones) and it is linked to a dummy then the problem does
 not appear.

 QuickTime displays the mesh correctly while osgviewer does not (OSG v3.0.0
 - FBX 2012 and 2011).

 Please (Michael P. or anyone with expertise in osgAnimation) can you have a
 look at the model and let me know if I can provide more examples or help to
 solve the issue?

 Thanks.
 Alessandro

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




 Attachments:

 http://forum.openscenegraph.org//files/osgviewer_2011_07_17_12_21_22_84_209.png
 http://forum.openscenegraph.org//files/test_284.zip


 ___
 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] Fixes FBX plugin warnings

2011-06-21 Thread Michael Platings
Hi Robert,
thanks for the warning list. I believe I've now fixed them but please let me
know if any remain.

On 16 June 2011 19:48, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi FBX users/developers,

 I have been doing a warnings purge of the OSG in prep for the OSG-3.0
 branch to be made tomorrow, and one area that is generating the bulk
 of the remaining warnings is the FBX plugin.  These warnings might not
 be appearing on all platforms so I've included them below for others
 to review.  I've fixed the warnings that I can do without knowing
 anything about the spefics of the FBX SDK, to fix the remaining
 warnings I really need those with some expertise in the FBX SDK to
 work out how best to resolve these warnings - some of the warnings
 look like they may well be highlighting potential bugs so I believe
 it'd be valuable to clean up before 3.0.

 Warnigns are:


 [ 95%] Building CXX object
 src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRAnimation.o
 [ 95%] Building CXX object
 src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRCamera.o
 [ 95%] Building CXX object
 src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRLight.o
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRLight.cpp: In
 member function ‘osgDB::ReaderWriter::ReadResult
 OsgFbxReader::readFbxLight(fbxsdk_2012_1::KFbxNode*, int)’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRLight.cpp:57:16:
 warning: enumeration value ‘eNONE’ not handled in switch
 [100%] Building CXX object
 src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRMesh.o
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘int getVertexIndex(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*, const
 fbxsdk_2012_1::KFbxMesh*, int, int, int) [with T =
 fbxsdk_2012_1::KFbxVector4]’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:556:81:
 instantiated from here
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:77:5:
 warning: enumeration value ‘eNONE’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:77:5:
 warning: enumeration value ‘eBY_EDGE’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:77:5:
 warning: enumeration value ‘eALL_SAME’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘bool layerElementValid(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*) [with T =
 fbxsdk_2012_1::KFbxVector4]’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:701:39:
 instantiated from here
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:60:5:
 warning: enumeration value ‘eINDEX’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘bool layerElementValid(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*) [with T =
 fbxsdk_2012_1::KFbxColor]’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:702:38:
 instantiated from here
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:60:5:
 warning: enumeration value ‘eINDEX’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘bool layerElementValid(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*) [with T =
 fbxsdk_2012_1::KFbxVector2]’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:704:43:
 instantiated from here
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:60:5:
 warning: enumeration value ‘eINDEX’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘int getPolygonIndex(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*, int) [with T =
 fbxsdk_2012_1::KFbxSurfaceMaterial*]’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:739:61:
 instantiated from here
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:104:9:
 warning: enumeration value ‘eINDEX’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘int getVertexIndex(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*, const
 fbxsdk_2012_1::KFbxMesh*, int, int, int) [with T =
 fbxsdk_2012_1::KFbxVector2]’:
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:122:68:
 instantiated from ‘FbxT getElement(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*, const
 fbxsdk_2012_1::KFbxMesh*, int, int, int) [with FbxT =
 fbxsdk_2012_1::KFbxVector2]’
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:572:113:
 instantiated from here
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:77:5:
 warning: enumeration value ‘eNONE’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:77:5:
 warning: enumeration value ‘eBY_EDGE’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp:77:5:
 warning: enumeration value ‘eALL_SAME’ not handled in switch
 /home/robert/OpenSceneGraph/src/osgPlugins/fbx/fbxRMesh.cpp: In
 function ‘int getVertexIndex(const
 fbxsdk_2012_1::KFbxLayerElementTemplateT*, const
 

Re: [osg-users] Fixes FBX plugin warnings

2011-06-21 Thread Michael Platings
 Did the warnings highlight any bugs?


The warnings about unhandled enumerators weren't bugs so I just put in some
empty default: statements, but the warning about comparing different types
of enums looked like a genuine bug.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] OSG 2.9.12 fbx 2011.3.1 static compile issue

2011-06-10 Thread Michael Platings
I think you misunderstood that other thread, you don't need to copy any DLL
files.

The latest FBX SDK (2012.1) makes everything much simpler so I recommend you
install that and get the latest OpenSceneGraph and hopefully this hassle
will be avoided


On 9 June 2011 15:55, Julius Tiemann julius.tiem...@img.fh-mainz.de wrote:

 Hi @ all,

 I'm trying to compile OSG 2.9.12 SVN with FBX 2011.3.1 static
 on Win7 x64 using Visual Studio 2010 Ultimate.

 FBX-Root: C:\Program Files\Autodesk\FBX\FbxSdk\2011.3.1
 FBX-Include: C:\Program Files\Autodesk\FBX\FbxSdk\2011.3.1\include
 FBX-lib:C:\Program
 Files\Autodesk\FBX\FbxSdk\2011.3.1\lib\fbxsdk_20113_1.dll
 FBX-libd:  C:\Program
 Files\Autodesk\FBX\FbxSdk\2011.3.1\lib\fbxsdk_20113_1d.dll

 I copied the .dll files from
 C:\Program Files\Autodesk\FBX\FbxSdk\2011.3.1\lib\vs2010
 because of another thread (viewtopic.php?t=7691highlight=fbx+2011.3.1)
 to
 C:\Program Files\Autodesk\FBX\FbxSdk\2011.3.1\lib


 Everytime I try to compile, I get the following error:

 Code:
 error LNK1107: Ungültige oder beschädigte Datei: Lesen bei 0x2A8 nicht
 möglich.
 C:\Program Files\Autodesk\FBX\FbxSdk\2011.3.1\lib\fbxsdk_20113_1.dll



 In english it's like:

 Code:
 error LNK1107: invalid or corrupt file: cannot read at location 0x2A8.
 C:\Program Files\Autodesk\FBX\FbxSdk\2011.3.1\lib\fbxsdk_20113_1.dll



 I tried to compile other OSG and FBX versions with similar probs ...

 Does anybody has an idea ( or two ) to solve this problem or to sho me my
 mistake ???

 ___
 yours sincerely

 Julius Tiemann

 University of Applied Sciences
 Institut fuer Mediengestaltung
 Wallstraße 11
 D-55122 Mainz


 [/url]

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





 ___
 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] [osgPlugins] Error compiling fbx plugin

2011-05-10 Thread Michael Platings
Looks like you're using 2010.*0*.2, not 2010.2

On 9 May 2011 14:23, Andrea Martini martini.and...@gmail.com wrote:

 Hi Michael,
 i have installed fbx sdk 2010.2 and i'm using openscenegraph 2.8.4
 But, unfortunally, i have the same error during compile time :

 ..\..\..\..\src\osgPlugins\fbx\ReaderWriterFBX.cpp(233) :
 'fbxsdk_201002::KFbxImporter::Initialize' : no overloaded function takes 2
 arguments

 Maybe, i'm doing something wrong, but i don't understand what.


 Andrea

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





 ___
 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] [osgPlugins] Error compiling fbx plugin

2011-05-09 Thread Michael Platings
I've now updated
http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/Pluginsto
give the definitive answer on this.
In summary:
OpenSceneGraph 2.8.x - FBX 2010.2
OpenSceneGraph 2.9.x - Whatever FBX version it tells you in
ReaderWriterFBX.h, latest is 2012.1


On 5 May 2011 01:24, tim paige tim.pa...@cox.net wrote:

 Hi,

 I too have had these same kinds of problems with the FBX SDK...

 I got the sdk from Autodesk and found those same kinds of complaints...
 like this function is not a member of so and so... and yes... they do
 indeed play games with the members of certaiin classes (they can't make up
 their minds about where to house certain funtional capabilities).  I read
 one comment regarding the software you love to hate due to their
 uncompassionate departures from maintaining backwards compatibility... but
 then again, we sometimes complain about the problems maintaining backwards
 compatibility can cause --- So... the next time i downloaded a different
 SDK, I downloaded them all from the top down into separate version
 directories to within a reasonable time period given what had worked with
 osg before.

 I went through three iterations starting with the most recent FBS SDK and
 merely changed the references to the include files until I got a hit
 (meaning membership was finally matching the class of interest) and then
 followed through to change library files and such to the appropriate SDK.
 I am using 2.9.11 and sometimes 13, and I had to go backwards (with the FBX
 SDK (2.11.3.1)) until compatibility occurred.

 Cheers,
 tim

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





 ___
 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] FindFBX.cmake broken on WIn32/Cmake 2.6?

2011-05-04 Thread Michael Platings
If I read that file correctly, for x64 builds it would execute both
SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)
as well as
SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
which would be incorrect.

The attached file gives the correct behaviour without the nested
parentheses.
-Michael


On 4 May 2011 09:29, Stephan Maximilian Huber ratzf...@digitalmind.dewrote:

 Hi Robert,

 As I don't use the FBX-plugin I can't test my modifications, they
 satisfy cmake 2.6 though. See attached file.

 cheers,
 Stephan

 Am 04.05.11 10:08, schrieb Robert Osfield:
  Hi Stephan,
 
  Could the use of a nested () section with the enclosing ELSEIF() be the
 problem?
 
  Perhaps this test coulde be separated out into several separate lines
  that decide whether 64bit is required or not.  Could you experiment
  with getting this to work, it'd be good to keep the OSG working with
  older versions of cmake.
 
  Thanks,
  Robert.
 
  On Wed, May 4, 2011 at 9:01 AM, Stephan Maximilian Huber
  ratzf...@digitalmind.de wrote:
  Hi,
 
  my automated build system fails with the new FindFBX.cmake (plain
  vanilla osg from trunk). CMake complains:
 
 
   8 snip 8 
  CMake Error: Error in cmake code at
  C:/Program
  Files/Jenkins/jobs/osg/workspace/osg/CMakeModules/FindFBX.cmake:25:
  Parse error.  Function missing ending ).  Instead found left paren
  with text (.
  CMake Error at CMakeLists.txt:454 (FIND_PACKAGE):
   find_package Error reading CMake code from C:/Program
   Files/Jenkins/jobs/osg/workspace/osg/CMakeModules/FindFBX.cmake.
 
   8 snip 8 
 
  What cmake-version is required on win32? I am using 2.6
 
  cheers,
  Stephan
  ___
  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


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




FindFBX.cmake
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] New FBX SDK

2011-04-27 Thread Michael Platings
The attached FindFBX.cmake should now find the Linux paths as well, however
I'm unable to test it.

On 26 April 2011 09:26, Michael Platings mplati...@gmail.com wrote:

 Thanks Alessandro, now we only need the file locations for Linux :)


 On 22 April 2011 15:41, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'm just going to try the new FBX plugin, by now I've updated the
 FindFBX.cmake file. Please see the attachment, hope it works fine for you
 too.

 Alessandro

 On Fri, Apr 22, 2011 at 2:05 PM, Sukender suky0...@free.fr wrote:

 I think I'm going to hang myself... I just hope there will not be too
 much problems.
 Unfortunately, I will not be able to test your sumbission right now, I'm
 sorry. I'll tell you when I can.

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Michael Platings mplati...@gmail.com a écrit :

  Hello FBX plugin users,
  Autodesk have released version 2012.1 of the FBX SDK, and I've now
  updated the plugin to work with it - source attached.
  The new SDK has deprecated/removed several features used by the plugin
  so to get it working again I've had to make non-trivial changes that
  may break loading/saving some files. I've tested with a wide range of
  files but more testing will be appreciated :)
  The SDK's directory structure and library names have changed and as I
  don't know the default file locations on Mac  Linux I need help
  adding those to FindFBX.cmake .
 
  I'll delay actually submitting the changes for a while to give you
  guys time to fix the Mac  Linux paths and test/fix any bugs that may
  have been created.
  Thanks
  -Michael
 
  ___
  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



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





FindFBX.cmake
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Error compiling fbx plugin

2011-04-26 Thread Michael Platings
 Maybe, do you mean i have to use the 2010.0.2 sdk version? (static or
 dynamic)


No, I mean I do not know which SDK version will work with OpenSceneGraph
2.8.3.

You have demonstrated that it is neither 2011.3.1 nor 2010.0.2 so it could
be either:
a) 2010.2, or
b) 2011.2

However, if you can use OpenSceneGraph 2.9.8 or later then 2011.3.1 is
definitely the SDK to use.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Error compiling fbx plugin

2011-04-21 Thread Michael Platings
Hi Andrea, it looks like you'll have to use an earlier SDK version but
unfortunately I don't know which one.
The earliest version used was 2010 so it could be 2010.0.2 or later. If you
could let us know which version works with the 2.8.3 code that would be
useful. Thanks!

On 21 April 2011 15:25, Andrea Martini martini.and...@gmail.com wrote:

 Hi,

 i have compiled fbx plugin also with openscenegraph 2.8.3 and 2.9.6 (using
 fbx sdk 2011.3.1) but i have compiling errors too.

 Thank you!

 Cheers,
 Andrea

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





 ___
 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] [osgPlugins] osg svn and fbx 2011.3 compile issue.

2011-03-30 Thread Michael Platings
It should work fine with the 2011.3.1 *static* libraries.
Check your configuration, but if you still can't get it working please let
me know the details of what errors you're getting.
Cheers

On 30 March 2011 19:05, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 The fbx plugin for osg svn version 2.9.12 would be compile fine with the
 sdk 2011.3? No problem with 2011.2 but with .3 no luck..this is my config
 problem or the plugin isn't compatible with last sdk yet?

 Thank you!

 Cheers,
 Dario

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-25 Thread Michael Platings
Did you install the *2010.2* FBX SDK?

FBX_INCLUDE_DIR:  C:\Program Files\Autodesk\FBX\FbxSdk\2010.2\include
FBX_LIBRARY:  C:\Program
Files\Autodesk\FBX\FbxSdk\2010.2\lib\fbxsdk_md2005.lib
FBX_LIBRARY_DEBUG:  C:\Program
Files\Autodesk\FBX\FbxSdk\2010.2\lib\fbxsdk_md2005d.lib
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Michael Platings

2011-02-25 Thread Michael Platings
CMake generated a Visual Studio sln for you. Build it.

On 25 February 2011 14:55, Josue Hernandez osgfo...@tevs.eu wrote:

 yes, that is ready, oppressed in the cmake build, what's next?

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-24 Thread Michael Platings
As you're using OpenSceneGraph 2.8.3 I think (but I'm not certain) you'll
need the 2010.2 FBX SDK
Once you've installed that, run CMake and select File/Delete Cache. Click
Configure and the FBX_... properties should be filled in for you
automatically.

On 23 February 2011 18:09, Josue Hernandez osgfo...@tevs.eu wrote:

 which file are fbx_library and fbx_library_debug

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





 ___
 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] FBX opacity map factor inverted?

2011-02-18 Thread Michael Platings
Hi Sukender,
that does indeed look incorrect. opacityFactor was added by Alessandro so
I've not tested it myself.
GetTransparencyFactor() has already been used to determine the opacity of
the material, so it shouldn't be used again. Alessandro's comment says in
practice factor will always be zero and this just tells me all his test
models have been fully opaque. I've now removed opacityFactor completely and
the RGB of opacityTexture will always be ignored. Unfortunately the FBX
documentation is far too vague to say what the correct calculations should
be. Can you test if this works for you?

On 17 February 2011 21:24, Sukender suky0...@free.fr wrote:

 Hi Michael, hi all,

 I spotted a strange line in fbxMaterialToOsgStateSet.cpp :
result.opacityFactor = pFbxPhong-GetTransparencyFactor().Get();
 Which says the opacity map (if present) will be affected an opacity. But
 what is retreived from FBX is the transparency, not the opacity. I guess
 the line should be:
result.opacityFactor = 1.0 - pFbxPhong-GetTransparencyFactor().Get();
 But I'm not 100% sure. However, this solves the display of some models I
 got :)

 Can anyone confirm (or not)?
 Thanks.

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 ___
 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] [osgPlugins] Michael Platings

2011-02-18 Thread Michael Platings
Your English is adequate but your question is far too vague. Give me
specific information about what you've done, how you've done it, what
platform  IDE you're doing it on, and what errors you're encountering and
I'll probably be able to help.

On 17 February 2011 22:28, Josue Hernandez osgfo...@tevs.eu wrote:

 yes, I saw it and as I try, but even so I make the mistake about not
 finding the plugins. I think (from what I've seen) that I need is something
 like compile the plugins but I do not know how.

 PS: sorry if my English is not very good

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-18 Thread Michael Platings
First a quick English tip: when you begin a sentence with Look, it
indicates that you are frustrated with the person you are talking to. This
will usually get you a bad reaction but in this case I'll assume it's just a
mistake in translation.

Have you run CMake since installing the FBX SDK? Have you built the project
Plugins fbx in Visual Studio? Does building it give you errors? Is
osgdb_fbx.dll or osgdb_fbxd.dll located in OpenScenegraph/bin or its
sub-folders?


On 18 February 2011 15:43, Josue Hernandez osgfo...@tevs.eu wrote:

 look, I have to charge in osg fbx models in windows, I'm doing in Visual
 Studio 2005. the page says osg search for the plugin itself, which I
 download the static libraries, but when I run the code tells me not to find
 the plugins to load fbx models

 PD:thanks for taking the time to help

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-18 Thread Michael Platings
Now we're getting somewhere :)
I would ignore the instructions on that page. You will need to build
OpenSceneGraph yourself, fortunately it's not nearly as difficult as that
page would suggest.

1. Get the OpenSceneGraph source from
http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8.3/source/OpenSceneGraph-2.8.3.zipand
extract it to C:\OpenSceneGraph
2. Get CMake from cmake.org and install and run it. Set Where is the source
code and Where to build the binaries to C:/OpenSceneGraph. Click
Configure. Tick BUILD_OSG_EXAMPLES. Make sure the FBX_... fields are set to
something sensible. Click Configure again, then click Generate. This will
give you a .sln which you can build from Visual Studio as usual.

On 18 February 2011 17:03, Josue Hernandez osgfo...@tevs.eu wrote:

 ok, I installed osg according to the instructions on this page:
 http://dwightdesign.com/2009/05/installing-openscenegraph-280/, is osg
 2.8.
 and i work in windows xp

 and check out my folder osg_plugins and find nothing of fbx

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-18 Thread Michael Platings
Try reinstalling CMake, ensuring you set it up for Visual Studio 8 2005
CMAKE_C_COMPILER should automatically be set to cl

On 18 February 2011 17:39, Josue Hernandez osgfo...@tevs.eu wrote:

 I got lost in the cmake. i set where is the set code and where the build
 the binaries with c:/OpenSceneGraph-2.8.3, but but an error flag: CMake
 Error: your C compiler: bcc32 was not found.   Please set CMAKE_C_COMPILER
 to a valid compiler path or name.

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-18 Thread Michael Platings
I'm using CMake 2.8.3
You can also try selecting File/Delete Cache from the CMake menu bar. Then
when you next click Configure you should get a pop-up menu - in that menu
choose Visual Studio 8 2005 from the drop down.

On 18 February 2011 18:14, Josue Hernandez osgfo...@tevs.eu wrote:

 Does it matter if I am using cmake 2.8.3? permission is already installed
 on this computer. because I download cmark 2.8.4 but can not find the
 installer

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





 ___
 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] [osgPlugins] Michael Platings

2011-02-18 Thread Michael Platings
 i need mark the use default native compiler


Yes


 in the part that says name / values, I get the following:
 cmake_backwards_compatibility = 2.4
 cmake_install_prefix = c / programeFiles / OpenSceneGraph
 executable_output_path = void
 library_output_path = void


Those are all correct. Do you get other values? You should see 100 or more
different values. If not then something is badly wrong. I would delete
everything and just start over.


 i'm not sure understandyour, did you said that i need create a user
 variables?


No, they should be there already.

It's the weekend, I'm out of here!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


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

2011-02-17 Thread Michael Platings
I've not used any of the osg file formats so I can't help you there
specifically, but I suspect the osganimation serializer is in need of
updating. Cedric Pinson wrote osgAnimation so he's the best person to
consult on this matter.

On 16 February 2011 16:23, Thomas Hogarth thomas.hoga...@gmail.com wrote:

 Hi Michael

 Thanks for the info, do you know why I might be having trouble saving these
 to .ive, .osg, .osgt and .osgx. It's not a show stopper but for some reason
 I can only re save the imported fbx as .osgb. The rest fail to load except
 .osg which loads but won't play my animations anymore :(

 Any info would be much appreciated
 Tom


 On 16 February 2011 16:08, Michael Platings mplati...@gmail.com wrote:

  I dare say the fbx plugin creates some kind of custom callbacks that
 normal osg is unaware of.


 Not exactly, the callbacks in question are all part of osgAnimation which
 is increasingly part of normal osg.
 They are: osgAnimation::RigComputeBoundingBoxCallback,
 osgAnimation::MorphGeometry::UpdateVertex 
 osgAnimation::RigGeometry::UpdateVertex



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


Re: [osg-users] [osgPlugins] Michael Platings

2011-02-17 Thread Michael Platings
Interesting subject line ;)

It sounds like you're new to OpenSceneGraph, I recommend getting familiar
with how it works by having a look at the documentation in
http://www.openscenegraph.org/projects/osg/wiki/Support
There's a brief summary of the FBX plugin at
http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/Plugins
Once you've built OpenSceneGraph, the Examples osganimationviewer project
lets you view and play animations on your models.
 http://www.autodesk.com/fbx
On 16 February 2011 17:40, Josue Hernandez jojehe...@gmail.com wrote:

 Hi,

 Can you please tell me how i can use fbx files in osg? i only know  you
 need download the fbx files

 Thank you!

 Cheers,
 Josue

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





 ___
 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] FBX plugin sets material diffuse color alpha to 0?

2011-02-17 Thread Michael Platings
Regarding your subject line (FBX plugin sets material diffuse color alpha to
0), the plugin sets the alpha to whatever was in your model. See
FbxMaterialToOsgStateSet::convert.

If you want to override the material in any model (FBX or otherwise), try
setAttributeAndModes(material,osg::StateAttribute::OVERRIDE)


On 17 February 2011 10:42, Aitor Ardanza aitoralt...@terra.es wrote:

 Hi,

 Is it possible to assign a material to a node loaded from fbx plugin?
 I try to do the following, but without results ...


 Code:
 osg::Group* node =
 dynamic_castosg::Group*(osgDB::readNodeFile(fresadora.fbx));
 osg::Material *material = new osg::Material();
material-setDiffuse(osg::Material::FRONT_AND_BACK,
  diffuse);
material-setSpecular(osg::Material::FRONT_AND_BACK,
 specular);
material-setAmbient(osg::Material::FRONT_AND_BACK,
  ambient);
material-setEmission(osg::Material::FRONT_AND_BACK,
 emission);
material-setShininess(osg::Material::FRONT_AND_BACK,
 shininess);
 node
 -getOrCreateStateSet()-setAttributeAndModes(material,osg::StateAttribute::ON);




 Thank you!

 Cheers,
 Aitor

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





 ___
 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 FBX 2011.3, osg build link problem

2011-02-02 Thread Michael Platings
You say building with Visual Studio 2008 skips the link error - do you
mean that it works on VS2008, but doesn't work with another IDE? Are you
trying to use Visual Studio 2010?
Are you trying to use the 2011.3 FBX SDK, or the 2011.3*.1* SDK?
In CMake what are the FBX libraries and directories?
___
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 FBX 2011.3, osg build link problem

2011-02-02 Thread Michael Platings
That's all fine, I'm also building with VS2008 and FBX 2011.3.1. Again:
In CMake what are the FBX libraries and directories?

Also, have you tried cleaning the FBX project? (Always the first thing to
try when VS won't build your project).


On 2 February 2011 13:48, Aitor Ardanza aitoralt...@terra.es wrote:


 Michael Platings wrote:
  You say building with Visual Studio 2008 skips the link error - do you
 mean that it works on VS2008, but doesn't work with another IDE? Are you
 trying to use Visual Studio 2010?
  Are you trying to use the 2011.3 FBX SDK, or the 2011.3.1 SDK?
  In CMake what are the FBX libraries and directories?
 
   --
  Post generated by Mail2Forum


 I can only do tests with vs 2008...
 Sorry, I'm using 2011.3.1 version. Is there a problem with this version?

 Thanks!!!

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





 ___
 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 FBX 2011.3, osg build link problem

2011-02-02 Thread Michael Platings
That could be the problem. Did you modify them manually? CMake shouldn't
generate those automatically.
Mine are:
C:/Program Files/Autodesk/FBX/FbxSdk/2011.3.1/include
C:/Program Files/Autodesk/FBX/FbxSdk/2011.3.1/lib/fbxsdk_md2008.lib
C:/Program Files/Autodesk/FBX/FbxSdk/2011.3.1/lib/fbxsdk_md2008d.lib


On 2 February 2011 15:17, Aitor Ardanza aitoralt...@terra.es wrote:

 FBX_INCLUDE_DIR =  C:/Program Files/Autodesk/FBX/FbxSdk/2011.3.1/include
 FBX_LIBRARY = C:/Program
 Files/Autodesk/FBX/FbxSdk/2011.3.1/lib/vs2008/fbxsdk_20113_1.lib
 FBX_LIBRARY_DEBUG = C:/Program
 Files/Autodesk/FBX/FbxSdk/2011.3.1/lib/vs2008/fbxsdk_20113_1d.lib

 I will try cleaning the vs project...

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





 ___
 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 FBX 2011.3, osg build link problem

2011-02-02 Thread Michael Platings
Did you download the dynamic FBX libraries? You need to install the
*static*FBX libraries.

On 2 February 2011 16:29, Aitor Ardanza aitoralt...@terra.es wrote:

 Hi,

 CMake can't find automaticaly FBX libs and dir. On C:\Program
 Files\Autodesk\FBX\FbxSdk\2011.3.1\lib I have only 7 folders:
 Python26_x64, Python26_x86, Python31_x64, Python31_x86, vs2005, vs2008,
 vs2010

 Thank you!

 Cheers,
 Aitor

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





 ___
 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 FBX 2011.3, osg build link problem

2011-02-02 Thread Michael Platings
That's almost certainly the problem. I've updated the information in
ReaderWriterFBX.h to make it clear that the static FBX libs are needed :)

On 2 February 2011 16:57, Aitor Ardanza aitoralt...@terra.es wrote:


 Michael Platings wrote:
  Did you download the dynamic FBX libraries? You need to install the
 static FBX libraries.
 


 could that be the problem ... I'll try ...

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





 ___
 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] FBX Plugin: animation speed not as expected...

2011-01-18 Thread Michael Platings
Hi Alessandro,
I posted a fix a while back that may solve the issue you're referring to. If
it works for you then maybe with more prodding Cedric might accept it ;)
Here it is again, attached

On 17 January 2011 15:43, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi,
 no one else is experiencing the same problems with osgAnimation and the FBX
 plugin? I mean the 'initial-pose' issue (described in this thread) and the
 timing issue described in another post of mine.

 Cheers,
 Alessandro

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





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

/*  -*-c++-*- 
 *  Copyright (C) 2008 Cedric Pinson cedric.pin...@plopbyte.net
 *
 * This library is open source and may be redistributed and/or modified under  
 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 
 * (at your option) any later version.  The full license is in LICENSE file
 * included with this distribution, and on the openscenegraph.org website.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 * OpenSceneGraph Public License for more details.
*/

#include osgAnimation/Animation

using namespace osgAnimation;

Animation::Animation(const osgAnimation::Animation anim, const osg::CopyOp copyop): osg::Object(anim, copyop),
_duration(anim._duration),
_originalDuration(anim._originalDuration),
_weight(anim._weight),
_startTime(anim._startTime),
_playmode(anim._playmode)
{
const ChannelList cl = anim.getChannels();
for (ChannelList::const_iterator it = cl.begin(); it != cl.end(); ++it)
{
addChannel(it-get()-clone());
}
}


void Animation::addChannel(Channel* pChannel)
{
_channels.push_back(pChannel);
if (_duration == _originalDuration)
computeDuration();
else
_originalDuration = computeDurationFromChannels();
}

double Animation::computeDurationFromChannels() const
{
double tmin = 1e5;
double tmax = -1e5;
ChannelList::const_iterator chan;
for( chan=_channels.begin(); chan!=_channels.end(); chan++ )
{
float min = (*chan)-getStartTime();
if (min  tmin)
tmin = min;
float max = (*chan)-getEndTime();
if (max  tmax)
tmax = max;
}
return tmax-tmin;
}

void Animation::computeDuration()
{
_duration = computeDurationFromChannels();
_originalDuration = _duration;
}

osgAnimation::ChannelList Animation::getChannels()
{
return _channels;
}

const osgAnimation::ChannelList Animation::getChannels() const
{
return _channels;
}


void Animation::setDuration(double duration)
{
_originalDuration = computeDurationFromChannels();
_duration = duration;
}

double Animation::getDuration() const
{
return _duration;
}

float Animation::getWeight () const
{
return _weight;
}

void Animation::setWeight (float weight)
{
_weight = weight;
}

bool Animation::update (double time, int priority)
{
if (!_duration) // if not initialized then do it
computeDuration();

double ratio = _originalDuration / _duration;

double t = (time - _startTime) * ratio;
switch (_playmode) 
{
case ONCE:
if (t  _originalDuration)
return false;
break;
case STAY:
if (t  _originalDuration)
t = _originalDuration;
break;
case LOOP:
if (!_originalDuration)
t = _startTime;
else if (t  _originalDuration)
t = fmod(t, _originalDuration);
//  std::cout  t   t   duration   _duration  std::endl;
break;
case PPONG: 
if (!_originalDuration)
t = _startTime;
else 
{
int tt = (int) (t / _originalDuration);
t = fmod(t, _originalDuration);
if (tt%2)
t = _originalDuration - t;
}
break;
}

ChannelList::const_iterator chan;
for( chan=_channels.begin(); chan!=_channels.end(); ++chan)
{
(*chan)-update(t, _weight, priority);
}
return true;
}

void Animation::resetTargets()
{
ChannelList::const_iterator chan;
for( chan=_channels.begin(); chan!=_channels.end(); ++chan)
(*chan)-reset();
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX Plugin: animation speed not as expected...

2011-01-18 Thread Michael Platings
Great, I've bumped my submission so hopefully it'll be in osg trunk soon.
Re: poses, they have been a complete nightmare to get working so far, and
yet there are still a few cases that don't work. If you can find what's
going on with humanoid.fbx then you'll be my hero! I may be able to help
more if you can get a much simpler example that demonstrates the problem
e.g. only one or two joints.

On 18 January 2011 15:27, Alessandro Terenzi a.tere...@gmail.com wrote:

 Thank you very much Michael,
 your fix solved the timing issue.

 Any idea/suggestion about the wrong initial-pose problem? (it happen with
 the humanoid.fbx model available with the FBX SDK).

 Regards.
 Alessandro


 On Tue, Jan 18, 2011 at 11:12 AM, Michael Platings mplati...@gmail.comwrote:

 Hi Alessandro,
 I posted a fix a while back that may solve the issue you're referring to.
 If it works for you then maybe with more prodding Cedric might accept it ;)
 Here it is again, attached


 On 17 January 2011 15:43, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi,
 no one else is experiencing the same problems with osgAnimation and the
 FBX plugin? I mean the 'initial-pose' issue (described in this thread) and
 the timing issue described in another post of mine.

 Cheers,
 Alessandro

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





 ___
 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



 ___
 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


[osg-users] PixelDataBufferObject functions incorrectly named

2010-12-16 Thread Michael Platings
Hi all,

In PixelDataBufferObject::bindBufferInWriteMode() I was surprised to see
glBindBuffer(GL_PIXEL_PACK_BUFFER_ARB,...). According to the OpenGL spec
Pack refers to *reading* pixels from the GPU into main memory.
Is this a bug? The comment for the function explicitly says note:
GL_PIXEL_PACK_BUFFER_ARB so I'm guessing it's intentional, and maybe in
some particular situation it makes sense. However in the general case the
naming is incorrect and has in fact lead me to call the wrong function.

If this isn't a bug then to prevent others being similarly mislead I suggest
we do one of the following:
a) Rename the functions to bindBufferInPackMode/bindBufferInUnpackMode
b) Just have one bindBuffer function that takes the target as a parameter.
c) Just have one bindBuffer function that uses the target returned by
BufferObject::getTarget()

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


Re: [osg-users] Uniform array naming problem

2010-12-13 Thread Michael Platings
How about just trimming off any invalid characters from the name returned by
glGetActiveUniform?

e.g.

_extensions-glGetActiveUniform( _glProgramHandle,
i, maxLen, 0, size, type, name );

for (GLsizei j = 0; j  maxLen  name[j]; ++j)
{
if (!isalnum(name[j])  name[j] != '_')
{
name[j] = '\0';
break;
}
}

On 9 December 2010 18:46, Glenn Waldron gwald...@gmail.com wrote:

 Hi Robert,

 I would like to re-raise the issue of uniform array naming, now that it is
 affecting me personally :)
 To recap:

 I have a uniform array in a shader defined as:

uniform bool positions[1];

 osg::Program calls glGetActiveUniform() to build a mapping of compiled
 uniforms by name. On some systems, the name returned is positions and on
 others it is positions[0]. When the latter happens, a corresponding
 osg::Uniform named positions will fail since it cannot find a matching
 uniform location in the mapping (since it's filed under positions[0]).

 I am not convinced that this is a driver bug. It seems more like an
 ambiguity. The docs say that the 'uniform location for positions and
 positions[0] are the same; they point to the first element of the array.'
  
 (opengl.org/wiki/G...http://www.opengl.org/wiki/GLSL_Uniform#Uniform_management).
 I don't see anything that says the value returned from glGetActiveUniform()
 must be one or the other.

 If both names are valid and equivalent, shouldn't we account for both
 possibilities in osg::Program? I suppose you could just alter
 getUniformLocation(...) to check for both variations.

 Here are the past threads on the topic. The issue crops up on both ATI and
 NVIDIA systems.

http://markmail.org/thread/5mans4howfbu2qtg
http://forum.openscenegraph.org/viewtopic.php?t=1828

 System: WinXP 32, ATI HD5550/10.11, OSG SVN.

 Thanks.


 Glenn Waldron : Pelican Mapping

 ___
 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] Incremental Draw?

2010-11-19 Thread Michael Platings
Thanks J-S,
I had the same idea myself but unfortunately OpenGL drivers don't take
thread or process priority into account. I made a simple test app that just
renders thousands of quads, ran two instances simultaneously, set the
process priority of one to high, and the priority of the other to idle, and
they both ran at exactly the same frame rate - half the rate of one instance
on its own.

Thanks for the suggestions Robert. I can't use spacial partitioning in my
particular case as there's often a lot of overlapping geometry, but simply
splitting the scene graph into many scene graphs with one bit of geometry in
each sounds like it could be the way forward.
Cheers!

On 18 November 2010 19:04, Jean-Sébastien Guay 
jean-sebastien.g...@cm-labs.com wrote:

 Hi Michael,


  As far as I can see to implement a solution I'll have to duplicate a lot
 of code from RenderStage/RenderBin, unless you can see a more elegant
 solution?


 A simple way could be to run two viewers, each one from a loop running in a
 different thread? If there is a need to use textures or share resources
 between the two contexts you can set up sharing between two contexts running
 in two viewers just as easily as from two contexts running in the same
 viewer, it's just that you'll have to do synchronization yourself when you
 need to, because the two viewers will run in their threads independently.

 Then you could set your principal viewer thread at a normal priority and
 the other viewer thread at a lower priority, so in theory the secondary
 rendering should not steal cycles from your main one, but would get the
 leftovers each frame (if any), so its rendering might go slower (if you're
 CPU-bound) but that seems OK for you as long as the main rendering goes at
 60hz.

 I don't know enough about your goal to be sure this will work for you, but
 it's one way to render two scene graphs at different rates.

 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

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


[osg-users] Incremental Draw?

2010-11-18 Thread Michael Platings
Hi Robert,
is there an equivalent of IncrementalCompileOperation for drawing a scene
graph?
My precise problem is as follows: In my application I have 2 scene graphs to
be drawn concurrently - the primary scene graph must be drawn at a fixed
frame rate of 60fps, the secondary scene graph can take a couple of seconds
to draw. The problem is that drawing the secondary scene graph interferes
with the frame rate of the primary scene graph. Is there something like
IncrementalDrawOperation to draw subsections of a scene graph until an
allotted amount of time has been consumed, or do you know of a better
solution?
Thanks in advance,
-Michael
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Incremental Draw?

2010-11-18 Thread Michael Platings
I guess I'd better get started on making it then :)
The scenes are rendered to FBOs so they're not tied to any particular
window/context or display method. The scenario is that a user will set one
scene to be rendered and sent to an external display system at 60fps. Once
the first scene is rendering the user can request a preview of a second
scene. When the preview is ready the user can seamlessly switch the system
to rendering and sending the second scene at 60fps.
As far as I can see to implement a solution I'll have to duplicate a lot of
code from RenderStage/RenderBin, unless you can see a more elegant solution?
Thanks for your help

On 18 November 2010 17:33, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Michael,

 On Thu, Nov 18, 2010 at 5:08 PM, Michael Platings mplati...@gmail.com
 wrote:
  Hi Robert,
  is there an equivalent of IncrementalCompileOperation for drawing a scene
  graph?

 No.

  My precise problem is as follows: In my application I have 2 scene graphs
 to
  be drawn concurrently - the primary scene graph must be drawn at a fixed
  frame rate of 60fps, the secondary scene graph can take a couple of
 seconds
  to draw. The problem is that drawing the secondary scene graph interferes
  with the frame rate of the primary scene graph. Is there something like
  IncrementalDrawOperation to draw subsections of a scene graph until an
  allotted amount of time has been consumed, or do you know of a better
  solution?

 You are the first person in the whole history of the OSG to ask for
 incremental rendering ;-)

 Do these two scenes get rendered on two separate windows?  Does the
 scene scene get rendered to a texture?  I'm curious on just how you
 see these two scenes working.

 Robert.
 ___
 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] [osgPlugins] FBX plugin compile error in OSG 2.9.8 SVN

2010-08-09 Thread Michael Platings
Hi Dario,
does it work if you move struct PolygonRef{...}; outside the function e.g.
to line 650?
-Michael (back from holidays!)

On 27 July 2010 15:25, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 I'm trying to compile OSG 2.9.9 from the SVN but I have some errors with
 fbx plugin during compilation:


 Code:
 [ 84%] Building CXX object
 src/osgPlugins/fbx/CMakeFiles/osgdb_fbx.dir/fbxRMesh.o
 In file included from
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:7,
 from
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26:
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.h:65:
 warning: comma at end of enumerator list
 In file included from
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:26:
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h: In
 constructor 'OsgFbxReader::OsgFbxReader(fbxsdk_2011_2::KFbxSdkManager,
 fbxsdk_2011_2::KFbxScene, FbxMaterialToOsgStateSet, const std::setconst
 fbxsdk_2011_2::KFbxNode*, std::lessconst fbxsdk_2011_2::KFbxNode*,
 std::allocatorconst fbxsdk_2011_2::KFbxNode* , const osgDB::Options,
 OsgFbxReader::AuthoringTool, bool, bool)':
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:37: warning:
 'OsgFbxReader::authoringTool' will be initialized after
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:30: warning:
 'bool OsgFbxReader::lightmapTextures'
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxReader.h:47: warning:
 when initialized here
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In member
 function 'osgDB::ReaderWriter::ReadResult
 OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*, fbxsdk_2011_2::KFbxMesh*,
 std::vectorStateSetContent, std::allocatorStateSetContent , const
 char*)':
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:717: warning:
 suggest parentheses around assignment used as truth value
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error:
 template argument for 'templateclass _Alloc class std::allocator' uses
 local type 'OsgFbxReader::readMesh(fbxsdk_2011_2::KFbxNode*,
 fbxsdk_2011_2::KFbxMesh*, std::vectorStateSetContent,
 std::allocatorStateSetContent , const char*)::PolygonRef'
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error:
 trying to instantiate 'templateclass _Alloc class std::allocator'
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error:
 template argument 2 is invalid
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:737: error:
 invalid type in declaration before ';' token
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:807: error:
 request for member 'push_back' in 'polygonRefList', which is of non-class
 type 'PolygonRefList'
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:840: error:
 expected initializer before 'it'
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error:
 'it' was not declared in this scope
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:841: error:
 'itEnd' was not declared in this scope
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function
 'int getVertexIndex(const fbxsdk_2011_2::KFbxLayerElementTemplateT*, const
 fbxsdk_2011_2::KFbxMesh*, int, int, int) [with T =
 fbxsdk_2011_2::KFbxVector4]':
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:563:
 instantiated from here
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning:
 enumeration value 'eNONE' not handled in switch
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning:
 enumeration value 'eBY_EDGE' not handled in switch
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:76: warning:
 enumeration value 'eALL_SAME' not handled in switch
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function
 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*)
 [with T = fbxsdk_2011_2::KFbxVector4]':
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:697:
 instantiated from here
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning:
 enumeration value 'eINDEX' not handled in switch
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function
 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*)
 [with T = fbxsdk_2011_2::KFbxColor]':
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:698:
 instantiated from here
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:59: warning:
 enumeration value 'eINDEX' not handled in switch
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp: In function
 'bool layerElementValid(const fbxsdk_2011_2::KFbxLayerElementTemplateT*)
 [with T = fbxsdk_2011_2::KFbxVector2]':
 /tmp/OpenSceneGraph-2.9.8-SVN/src/osgPlugins/fbx/fbxRMesh.cpp:700:
 instantiated from here
 

Re: [osg-users] [osgPlugins] FBX Plugin convert LOD into OSG correctly?

2010-08-09 Thread Michael Platings
Hi Dario, no there isn't any LOD support. Of course you're free to add it ;)
-Michael

On 27 July 2010 16:13, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 With my preliminary test the answer is no...

 Thank you!

 Cheers,
 Dario

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





 ___
 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] FBX reading of GL_POLYGON

2010-07-14 Thread Michael Platings
I've had a quick look but I'm going to need to rewrite it to fit with newer
code so it's on my to-do list.

On 13 July 2010 16:16, Sukender suky0...@free.fr wrote:

 Hi Michael, hi all,

 Sorry to push this topic up, but did you test the code (anyone)?
 Thanks.

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Sukender suky0...@free.fr a écrit :

  Hi Michael,
 
  I managed to write the code, but I need testing. Moreover I can't
  update the FBX plugin because of the regression I told you in another
  thread, concerning images.
  Can you, please:
  - Merge changes to your working copy, and
  - Make a few tests with your models?
 
  Also feel free to commit if everything seems okay.
  Attached file is against rev. 11322 of the trunk.
 
  Many thanks.
 
  For info, my implemtation looks like:
  - Add points of the triangles
  - Detect how to split quads (02 or 13), and add points for the two
  triangles
  - Save polygons in a temporary array
  - Add a primitive set for all triangles (DrawArray)
  - Add polygons points AFTER the points of the triangles
  - Add primitive sets for polygons
  - Tessellate
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Sukender suky0...@free.fr a écrit :
 
   Alright. I started working on it.
  
   Sukender
   PVLE - Lightweight cross-platform game engine -
   http://pvle.sourceforge.net/
  
   - Sukender suky0...@free.fr a écrit :
  
Oh, right, sorry I didn't spot this. Thanks.
   
Sukender
PVLE - Lightweight cross-platform game engine -
http://pvle.sourceforge.net/
   
- Michael Platings mplati...@gmail.com a écrit :
   
 I was referring to that by For quads I imagine it would be
   possible
 to write some fast specialised code to see if they should be
  split
 across vertices (0,2) or (1,3) so that loading times remain
bearable.


 On 6 July 2010 09:02, Sukender  suky0...@free.fr  wrote:


 Oh... What about concave quads (I mean 4 points polygons)?


 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Sukender  suky0...@free.fr  a écrit :




  OK. If you got time for this before I do... :)
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Michael Platings  mplati...@gmail.com  a écrit :
 
   Waht you could do is leave all the triangles and quads in
  one
   PrimitiveSet (like it is already), but put each polygon
  with
   =5
   vertices in it's own PrimitiveSet with Mode=POLYGON. Then
  run
the
   Tesselator on the Geometry which should tesselate the
  polygons
   automagically.
  
  
   On 5 July 2010 13:49, Sukender  suky0...@free.fr  wrote:
  
  
   Hi Michael,
  
   Yes, sorry about OpenGL interpretation of polygons, I
  forgot
that.
  
   Well actually, I guess the reader has to handle most (all?)
cases.
  So
   I suggest to have something like:
   - If number of points = 4, use current code.
   - Else call GLU tesselation.
  
   Do you agree?
   The problem I have is that osgUtil::Tessellator is intended
  to
  operate
   on osg's structures. Any idea on how to make it work easily
  in
the
   reader plugin?
  
  
   Sukender
   PVLE - Lightweight cross-platform game engine -
   http://pvle.sourceforge.net/
  
   - Michael Platings  mplati...@gmail.com  a écrit :
  
  
  
  
No, 1 to 1 mapping of primitives isn't possible because
   OpenGL
   doesn't
render concave polygons correctly (in practice GL_POLYGON
  is
the
   same
as GL_TRIANGLE_FAN).
Tesselation is possible via GLU but very slow so we need
  to
   be
   careful
about how we use that. Most models I've come across have
   many
triangles and quads but few polygons =5 vertices. If we
   apply
triangulation to those few polygons then most models will
  be
unaffected. For quads I imagine it would be possible to
   write
 some
fast specialised code to see if they should be split
  across
  vertices
(0,2) or (1,3) so that loading times remain bearable.
However, if your content provider could just produce
  models
that
  are
already suitable for real-time rendering that would be
  best
   ;)
   
   
On 5 July 2010 09:09, Sukender  suky0...@free.fr 
  wrote:
   
   
Hi all,
   
The FBX reader seems to interpret FBX polygons as
  triangles.
 Well
  I
guess this should not be, as 1-to-1 mapping of primitives
  is
   possible
(as far as I know), but this is not really an issue. What
  is
an
   issue

Re: [osg-users] FBX Plugin: animation speed not as expected...

2010-07-07 Thread Michael Platings
Hi Alessandro, I can't reproduce the problem so I don't know why you're
seeing that, sorry.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX reading of GL_POLYGON

2010-07-06 Thread Michael Platings
I was referring to that by For quads I imagine it would be possible to
write some fast specialised code to see if they should be split across
vertices (0,2) or (1,3) so that loading times remain bearable.

On 6 July 2010 09:02, Sukender suky0...@free.fr wrote:

 Oh... What about concave quads (I mean 4 points polygons)?

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Sukender suky0...@free.fr a écrit :

  OK. If you got time for this before I do... :)
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
 
  - Michael Platings mplati...@gmail.com a écrit :
 
   Waht you could do is leave all the triangles and quads in one
   PrimitiveSet (like it is already), but put each polygon with =5
   vertices in it's own PrimitiveSet with Mode=POLYGON. Then run the
   Tesselator on the Geometry which should tesselate the polygons
   automagically.
  
  
   On 5 July 2010 13:49, Sukender  suky0...@free.fr  wrote:
  
  
   Hi Michael,
  
   Yes, sorry about OpenGL interpretation of polygons, I forgot that.
  
   Well actually, I guess the reader has to handle most (all?) cases.
  So
   I suggest to have something like:
   - If number of points = 4, use current code.
   - Else call GLU tesselation.
  
   Do you agree?
   The problem I have is that osgUtil::Tessellator is intended to
  operate
   on osg's structures. Any idea on how to make it work easily in the
   reader plugin?
  
  
   Sukender
   PVLE - Lightweight cross-platform game engine -
   http://pvle.sourceforge.net/
  
   - Michael Platings  mplati...@gmail.com  a écrit :
  
  
  
  
No, 1 to 1 mapping of primitives isn't possible because OpenGL
   doesn't
render concave polygons correctly (in practice GL_POLYGON is the
   same
as GL_TRIANGLE_FAN).
Tesselation is possible via GLU but very slow so we need to be
   careful
about how we use that. Most models I've come across have many
triangles and quads but few polygons =5 vertices. If we apply
triangulation to those few polygons then most models will be
unaffected. For quads I imagine it would be possible to write some
fast specialised code to see if they should be split across
  vertices
(0,2) or (1,3) so that loading times remain bearable.
However, if your content provider could just produce models that
  are
already suitable for real-time rendering that would be best ;)
   
   
On 5 July 2010 09:09, Sukender  suky0...@free.fr  wrote:
   
   
Hi all,
   
The FBX reader seems to interpret FBX polygons as triangles. Well
  I
guess this should not be, as 1-to-1 mapping of primitives is
   possible
(as far as I know), but this is not really an issue. What is an
   issue
is that concave polygons are not intepreted the right way. I think
about two solutions:
1. Use tessellation code to get correct splitting
2. Do the 1-to-1 mapping of primitives
   
Am I right ?
Other ideas?
Anyone having time for this?
   
Thanks folks!
   
Cheers,
   
Sukender
PVLE - Lightweight cross-platform game engine -
http://pvle.sourceforge.net/
___
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
   ___
   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
  ___
  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

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


Re: [osg-users] FBX reading of GL_POLYGON

2010-07-05 Thread Michael Platings
No, 1 to 1 mapping of primitives isn't possible because OpenGL doesn't
render concave polygons correctly (in practice GL_POLYGON is the same as
GL_TRIANGLE_FAN).
Tesselation is possible via GLU but very slow so we need to be careful about
how we use that. Most models I've come across have many triangles and quads
but few polygons =5 vertices. If we apply triangulation to those few
polygons then most models will be unaffected. For quads I imagine it would
be possible to write some fast specialised code to see if they should be
split across vertices (0,2) or (1,3) so that loading times remain bearable.
However, if your content provider could just produce models that are already
suitable for real-time rendering that would be best ;)

On 5 July 2010 09:09, Sukender suky0...@free.fr wrote:

 Hi all,

 The FBX reader seems to interpret FBX polygons as triangles. Well I guess
 this should not be, as 1-to-1 mapping of primitives is possible (as far as I
 know), but this is not really an issue. What is an issue is that concave
 polygons are not intepreted the right way. I think about two solutions:
 1. Use tessellation code to get correct splitting
 2. Do the 1-to-1 mapping of primitives

 Am I right ?
 Other ideas?
 Anyone having time for this?

 Thanks folks!

 Cheers,

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 ___
 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] FBX Plugin: animation speed not as expected...

2010-07-05 Thread Michael Platings
Hi Alessandro, playback should work at normal speed without any special
configuration. If you're still having issues please send me a sample file
and I'll have a look. Thanks

On 2 July 2010 17:24, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'm having a problem about a simple model whose animation is played
 differently in Quicktime and OSG (both my OSG build (2.9.7) and Quicktime
 are using FBX SDK 2011.2).

 I'm attacching the model: 3 balls bouncing with different timing each, but
 while in Quicktime the animation is played at the expected speed, in OSG it
 seems that the animation speed is very very fast (the model has been
 exported from Maya).

 Is there something I'm supposed to do in order to have the same expected
 playback speed? Or is there an issue with the FBX plugin?
 Thanks.
 Alessandro

 ___
 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] FBX plugin with FBX SDK 2011.2

2010-07-05 Thread Michael Platings
This was working with previous plugin versions? In that case it may be
related to the recent changes to support multiple texture types.

On 2 July 2010 17:16, Sukender suky0...@free.fr wrote:

 Hi Michael,

 I recently updated the FBX plugin and had a regression:
  - I read a textured model (displays correctly under OSG)
  - I write a FBX file from it
  - And this FBX doesn't have textures anymore, either in OSG or 3DSMax
 using the corresponding FBX plugin.
 Tried with both FBX 2011.2 and 2011.3.

 What is VERY strange is that the FBX *CONTAINS* the path to the texture
 (file opened with a simple notepad). I found my model doesn't have a
 Material ; and the FBX SDK documentation says textures have to be connected
 to materials (such as Lambert)... Maybe something wrong there? Any other
 idea?

 Many thanks.

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Michael Platings mplati...@gmail.com a écrit :

  The same issue as what?
  The FBX developers temporarily parted with their sanity for 2011.3 and
  switched from providing only static libraries to providing only
  dynamic libraries. After much protest from developers they've agreed
  to release a new version soon with both dynamic  static libs so I'll
  wait until that next release before updating the plugin. For now you
  still need to use the 2011.2 FBX SDK
 
 
  On 18 June 2010 20:16, Peter Bear  th3fly...@gmail.com  wrote:
 
 
  Hi, I feel I should point out that the newest SDK, 2011.3 is having
  the same issue.
 
  Cheers,
  Peter
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=29164#29164
 
 
 
 
 
  ___
  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
 ___
 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] FBX Plugin: animation speed not as expected...

2010-07-05 Thread Michael Platings
Oops missed that. Thanks, I'll be able to have a look in the next day or 2

On 5 July 2010 14:00, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.comwrote:

 Hi Michael,


  Hi Alessandro, playback should work at normal speed without any special
 configuration. If you're still having issues please send me a sample
 file and I'll have a look. Thanks


 Perhaps you didn't see it, but he did :-)

 See file balls_01.zip attached to the first post.

 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

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


Re: [osg-users] FBX reading of GL_POLYGON

2010-07-05 Thread Michael Platings
Waht you could do is leave all the triangles and quads in one PrimitiveSet
(like it is already), but put each polygon with =5 vertices in it's own
PrimitiveSet with Mode=POLYGON. Then run the Tesselator on the Geometry
which should tesselate the polygons automagically.

On 5 July 2010 13:49, Sukender suky0...@free.fr wrote:

 Hi Michael,

 Yes, sorry about OpenGL interpretation of polygons, I forgot that.

 Well actually, I guess the reader has to handle most (all?) cases. So I
 suggest to have something like:
 - If number of points = 4, use current code.
 - Else call GLU tesselation.

 Do you agree?
 The problem I have is that osgUtil::Tessellator is intended to operate on
 osg's structures. Any idea on how to make it work easily in the reader
 plugin?

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/

 - Michael Platings mplati...@gmail.com a écrit :

  No, 1 to 1 mapping of primitives isn't possible because OpenGL doesn't
  render concave polygons correctly (in practice GL_POLYGON is the same
  as GL_TRIANGLE_FAN).
  Tesselation is possible via GLU but very slow so we need to be careful
  about how we use that. Most models I've come across have many
  triangles and quads but few polygons =5 vertices. If we apply
  triangulation to those few polygons then most models will be
  unaffected. For quads I imagine it would be possible to write some
  fast specialised code to see if they should be split across vertices
  (0,2) or (1,3) so that loading times remain bearable.
  However, if your content provider could just produce models that are
  already suitable for real-time rendering that would be best ;)
 
 
  On 5 July 2010 09:09, Sukender  suky0...@free.fr  wrote:
 
 
  Hi all,
 
  The FBX reader seems to interpret FBX polygons as triangles. Well I
  guess this should not be, as 1-to-1 mapping of primitives is possible
  (as far as I know), but this is not really an issue. What is an issue
  is that concave polygons are not intepreted the right way. I think
  about two solutions:
  1. Use tessellation code to get correct splitting
  2. Do the 1-to-1 mapping of primitives
 
  Am I right ?
  Other ideas?
  Anyone having time for this?
 
  Thanks folks!
 
  Cheers,
 
  Sukender
  PVLE - Lightweight cross-platform game engine -
  http://pvle.sourceforge.net/
  ___
  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
 ___
 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] FBX plugin with FBX SDK 2011.2

2010-06-18 Thread Michael Platings
The same issue as what?
The FBX developers temporarily parted with their sanity for 2011.3 and
switched from providing only static libraries to providing only dynamic
libraries. After much protest from developers they've agreed to release a
new version soon with both dynamic  static libs so I'll wait until that
next release before updating the plugin. For now you still need to use the
2011.2 FBX SDK

On 18 June 2010 20:16, Peter Bear th3fly...@gmail.com wrote:

 Hi, I feel I should point out that the newest SDK, 2011.3 is having the
 same issue.

 Cheers,
 Peter

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





 ___
 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] [osgPlugins] FBX texture export problem.

2010-06-11 Thread Michael Platings
Hi Dario, if the file appears correctly in FBX QuickTime Viewer but not in
the latest version of OpenSceneGraph then please send the file over to me in
a .zip with associated textures, and I'll take a look.

On 10 June 2010 21:09, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 anyone has any other information about this problem?

 Thank you!

 Cheers,
 Dario

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





 ___
 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] ffmpeg synchronisation

2010-06-11 Thread Michael Platings
Hi Tanguy, thanks for the pointers, the timing code makes much more sense
now. Sound does indeed make it a lot more problematic, seems I'll have to do
some lateral thinking on this one :\

On 10 June 2010 13:52, Tanguy Fautre tang...@aristechnologies.com wrote:

  Hi Michael,



 It’s been a long time since I’ve touched the ffmpeg plugin, but here is how
 it was:

 1/ when the video sound is being played, the video time is synchronized
 with the audio player (this tries to keep the video tightly synchronized
 with the audio track);

 2/ when there is no video sound (or no audio player has been associated
 with this video), then the video used to be synchronized with an internal
 timer.



 Quickly looking at the code on SVN, it does not seem to have changed.



 Changing case 2 to be optionally synchronized with FrameStamp shouldn’t be
 too hard (but will require code changes in the plugin).

 Case 1 looks more problematic though.



 Tanguy





 *From:* osg-users-boun...@lists.openscenegraph.org [mailto:
 osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Michael
 Platings
 *Sent:* 09 June 2010 3:31 PM
 *To:* OpenSceneGraph Users
 *Subject:* [osg-users] ffmpeg synchronisation



 I've been playing around with the ffmpeg plugin and I've been very
 impressed with how capable it is. The only problem I have with it is that
 its playback speed is decoupled from the timing of the main scene.
 Does anyone know of an easy way to ensure that the time of the ffmpeg video
 is consistent with the time of the FrameStamp?

 ___
 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] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Michael Platings
This was just a bug brought in with the 3D Studio Max texturing features.
Now fixed :)

On 8 June 2010 09:08, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'm trying the FBX plugin with some models with more than one material
 applied to a single mesh. I created a box and assigned it a different
 material to each face: 3 faces have a different texture (diffuse maps)  and
 the other 3 faces have a simple colored material (one red, one green and one
 blue).

 As far as I understood, the plugin currently manages to display multiple
 materials assigned to the same mesh, but if using more than one texture (for
 example 3 diffuse maps) then it doesn't work: only not-textured materials
 are displayed correctly while no texture is displayed or only one is
 displayed if assigned to a particular face).

 I'm sending a sample model to Michael only (it's 1MB). Any suggestion on
 how to proceed to add support to this kind of models?

 Thanks.
 Alessandro



 ___
 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] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-09 Thread Michael Platings
Hi Raymond, I'm not using 3D Studio but the plugin should read FBX files
exported from any version of any application. The test I apply is this - if
the official Autodesk FBX Quicktime Viewer can view an FBX file,
OpenSceneGraph should be able to view it just as well or better. For the
majority of files this is true, but if you find any that don't display
correctly please let me know and I'll do my best to get it fixed.
Cheers!

On 9 June 2010 10:35, Raymond de Vries ree...@xs4all.nl wrote:

  Hi guys,

 With great interest I am reading all the FBX related threads. I picked it
 myself and the first tests are working well. Thanks for your efforts!

 Michael, you mention 3D Studio Max... Which version are you using? I have
 3dsmax8 and 9 so I wonder if I can use these too.

 Thanks
 Raymond

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


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-09 Thread Michael Platings
Thanks for your research Alessandro :)
Vertex caches sound like just another way to store morph geometry.
osgAnimation::MorphGeometry is just a series of 1 or more geometries (each
one stored in a MorphTarget) so in theory it should be as simple as loading
each bit of vertex cache geometry into a MorphTarget. I hope it proves that
simple!

On 9 June 2010 10:24, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi,
 as you know I wanted to try to add the possibility to read vertex animation
 data from point cache files, so I started looking at existing code in order
 to figure out where the integrations should be done. I have really basic
 experience with animations in OSG, so I'd like to share my ideas with you
 before doing anything.

 First of all, looking at the FBX SDK doc it looks like that there are 3
 ways *geometries can be deformed: using skinning, shapes, or vertex
 caches. A vertex cache is a way to store directly the vertex animations
 inside a cache file*. Looking at the existing code in osgfbx, I see that
 what is managed so far are 'static', 'rigged' and 'morph' geomerty types
 that I guess correspond to no animations or skinning and shapes deformers
 respectively. I thought to add also another type (GEOMETRY_CACHE)
 corrensponding to KFbxDeformer::eVERTEX_CACHE.

 In the examples provided with the SDK there is the ViewScene example that
 shows how to load point cache files (there are just 2 functions to use
 almost in a straightforwar way: PreparePointCacheData() and
 ReadVertexCacheData()).

 Well, this is the easy part I guess. But then I don't know how to handle
 that animation data...of course there are no bones for this kind of
 animation, also there is just one shape (unlike morphing where I guess at
 least 2 shapes are required) so I can just think about creating an
 UpdateCallback that keeps reading animation data (of course loaded once
 forever outside the application loop) and keeps updating vertex positions.

 What do you think about this? Can you give me suggestions or point me to
 other examples that do almost the same thing?

 Thanks.
 Alessandro

 PS: along the ViewScene example there is a sample FBX file (Humanoid.FBX)
 that I'll suggest you to check, it should contain at least skinning
 animation, but is not played correctly.


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


[osg-users] ffmpeg synchronisation

2010-06-09 Thread Michael Platings
I've been playing around with the ffmpeg plugin and I've been very impressed
with how capable it is. The only problem I have with it is that its playback
speed is decoupled from the timing of the main scene.
Does anyone know of an easy way to ensure that the time of the ffmpeg video
is consistent with the time of the FrameStamp?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-07 Thread Michael Platings
I'm not a Max user so I can't help you there. The only thing I can tell you
is that the exported animation data will be entirely within the fbx file -
pc2 or xml files won't be needed.

NURBs - I haven't tested but in theory yes. The FBX SDK provides a function
to triangulate NURBs which should get called as necessary and handle
everything for us.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Text (keyboard input) on viewer

2010-06-07 Thread Michael Platings
On 7 June 2010 16:02, Trajce (Nick) Nikolov nikolov.tra...@gmail.comwrote:

 But, the fashion nowdays is to use FBX I think for character animations


Or COLLADA DAE if you prefer not to rely on a closed-source, poorly
documented, slow, bug-ridden library for your file loading ;)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-07 Thread Michael Platings
Thanks Alessandro, fixed :)

On 7 June 2010 16:05, Alessandro Terenzi a.tere...@gmail.com wrote:

 Hi Michael,
 I tried to load a file with a single NURBS surface with Quicktime and it
 worked while it does not with osgviewer.

 I'm sending the file with this mail.
 Alessandro

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


Re: [osg-users] FBX Plugin: vertex animation support

2010-06-07 Thread Michael Platings
I just tried opening the files you posted again in the FBX Quicktime Viewer
and this time they work! It seems that having the files in the root of C:
magically fixes it.
Ideally osgfbx will be able to any file that the official viewer can, so if
you can submit PC2/XML support then that would be very welcome :)

On 7 June 2010 16:25, Alessandro Terenzi a.tere...@gmail.com wrote:


 On Mon, Jun 7, 2010 at 4:57 PM, Michael Platings mplati...@gmail.comwrote:

 Anyway, given that I'm not an expert Max user, I think that pc2/xml files
 are the only means used by FBX files (created by Max) to refer to cached
 animations data coming from the widely used Point Cache modifier. In other
 words I think that if we export a FBX from Max it is not possible to embed
 cached animation data into the FBX file, but we must refer to one of those
 external files.


 There's no reason why that should be the case as FBX has full support for
 vertex animation. You're attacking this problem at the wrong point - get on
 the Max forums and ask how can I export this model so it animates in the
 official viewer?


 I agree, but there is also no reason to not support it :) because referring
 to external pc2/xml files is a feature that is available in the FBX format
 and so, for completeness' sake, it would be nice to support it in OSG even
 if there is another way to 'embed' the same cached animations data in the
 FBX file itself.

 Alessandro

 ___
 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] FBX Plugin: vertex animation support

2010-06-07 Thread Michael Platings
As well as KFbxNurb, there's also a KFbxNurbsSurface class. As far as I can
tell they do exactly the same thing and I just had to add eNURBS_SURFACE to
the list of things to triangulate.

On 7 June 2010 17:46, Alessandro Terenzi a.tere...@gmail.com wrote:

 Great :) what was the problem?

 Alessandro

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


Re: [osg-users] hierarchy animation in FBX problem

2010-06-04 Thread Michael Platings
I'm using all the latest code from SVN, details here:
http://www.openscenegraph.org/projects/osg/wiki/Downloads/SVN

osgAnimationViewer is broken at present so I'm using osgViewer, except I
modified it to automatically play any animations it finds.


On 4 June 2010 08:38, Eric Pouliquen eric.pouliq...@gmail.com wrote:

 Hi Michael,

 The sequence on your screenshots is correct !

 Did you try to open it directly in osganimationviewer ? Just to be sure
 that the problem is not in this app.

 So that's a really good point for me if you managed to see the anim in osg
 !

 I need now to ask you where to find code source of the version you talked
 about ?

 * I did'nt find the 2011.2 OpenSceneGraph FBX plugin version... can you
 tell me the svn folder ?
 * which version of osg are you using ?
 * My last tests of compilation crashed because the fbx plugin code search
 osgAnimation include which doesn't exist anymore :(

 If you can help just to set all correct versions...

 Thanks a lot for your help !


 Eric

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





 ___
 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] hierarchy animation in FBX problem

2010-06-04 Thread Michael Platings

 Is it possible you send me you osgviewer modified version to have all this
 animation pipeline working?


Attached :)


osgviewer.cpp
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] hierarchy animation in FBX problem

2010-06-04 Thread Michael Platings
Hi Cedric,
I found that commenting out group-addChild(camera); made the model appear
normally so I guess that means there's something in the GUI widget that
breaks things.
HTH

On 4 June 2010 14:42, Cedric Pinson cedric.pin...@plopbyte.net wrote:

 Hi,
 In fact osganimationviewer works but you need to play with the camera to
 see find your object :)

 I thought It could comes from the refactore of osgGA manipulator
 something that would change in the context of osganimationviewer.

 Anyway I will have to dig and fix it. Just to warn you that if you
 search in the scene you may find your object :)

 Cheers,
 Cedric

 On Fri, 2010-06-04 at 09:45 +0100, Michael Platings wrote:
  I'm using all the latest code from SVN, details here:
  http://www.openscenegraph.org/projects/osg/wiki/Downloads/SVN
 
  osgAnimationViewer is broken at present so I'm using osgViewer, except
  I modified it to automatically play any animations it finds.
 
 
  On 4 June 2010 08:38, Eric Pouliquen eric.pouliq...@gmail.com wrote:
  Hi Michael,
 
  The sequence on your screenshots is correct !
 
  Did you try to open it directly in osganimationviewer ? Just
  to be sure that the problem is not in this app.
 
  So that's a really good point for me if you managed to see the
  anim in osg !
 
  I need now to ask you where to find code source of the version
  you talked about ?
 
  * I did'nt find the 2011.2 OpenSceneGraph FBX plugin
  version... can you tell me the svn folder ?
  * which version of osg are you using ?
  * My last tests of compilation crashed because the fbx plugin
  code search osgAnimation include which doesn't exist
  anymore :(
 
  If you can help just to set all correct versions...
 
  Thanks a lot for your help !
 
 
  Eric
 
  --
  Read this topic online here:
 
  http://forum.openscenegraph.org/viewtopic.php?p=28567#28567
 
 
 
 
 
 
  ___
  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

 --
 Provide OpenGL, WebGL and OpenSceneGraph services
 +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net

 ___
 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] FBX Plugin: vertex animation support

2010-06-04 Thread Michael Platings
Hi Alessandro, it's already supported.

On 4 June 2010 14:56, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'd like to study the possibility to extend the FBX plugin in order to
 support vertex animation.

 In particular it could be very useful to have the possibility to import
 point cache files that are used to store vertex animation information.
 This is quite a new field for me, so before starting anything I'd like to
 ask the community for suggestions and directions, also I'd like to know if
 OSG already offers the 'tools' to handle any kind of vertex animation or
 some development should be done in order to extend osgAnimation before
 actually extending the FBX plugin itself.

 Finally is there any other plugin that already supports something like
 point cache files or vertex animation in general?

 Thanks.
 Alessandro

 ___
 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] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-03 Thread Michael Platings
Hi Alessandro,
I've looked over the code and it all looks good  sensible. Once you're 100%
happy with it please submit it to osg-submissions and I'll go over it more
carefully and give it some testing before checking into trunk. Cheers!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] hierarchy animation in FBX problem

2010-06-03 Thread Michael Platings
Hi Eric, I'm using the 2011.2 FBX Quicktime Viewer and the 2011.2
OpenSceneGraph FBX plugin and both animate identically for me. I've attached
an image sequence to show you what I see.

If that's wrong then it may be a consequence of the problem described here:
http://area.autodesk.com/forum/autodesk-fbx/fbx-sdk/error-in-animation-evaluation/.
If that is the source of the problem then you can fix it by either going
back to the 2010.2 plugin or waiting until the 2011.3 FBX SDK is released
later this month
attachment: flipphone.PNG___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-01 Thread Michael Platings
On 31 May 2010 11:26, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'm am adding support for opacity, reflection and lighting maps to the FBX
 plugin...so far I've got good results and I'm going to post the new code as
 soon as I've reviewed and 'cleaned' it ;) by the way how and where should I
 upload my modifications?


Here's how to make a submission:
http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol


 Is there a good repository for FBX models that I could use for testing
 those new features as well as other features in general?


I only know of the free models on turbosquid


 Finally, I noticed that animations based on bones work fine but morphing
 animations makes osganimationviewer to crash, any idea? (I made models with
 3dsMax 2010+FBX 2011.2)


Can you send me the model so I can investigate? Cheers
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-01 Thread Michael Platings
Thanks Alessandro, I've repeated the crash bug and sent a fix for it to
osg-submissions

On 1 June 2010 11:13, alessandro terenzi a.tere...@gmail.com wrote:

 I apologize for the model I tried to upload (it was too big...sorry). I'm
 sending a zip now...
 Alessandro

 On Tue, Jun 1, 2010 at 12:03 PM, alessandro terenzi 
 a.tere...@gmail.comwrote:

 Here's a model that makes osgviewer to crash. Actually I created also
 another model with morphing that instead works fine...I'm going to try other
 models as well and let you know.

 Thanks.
 Alessandro

 On Tue, Jun 1, 2010 at 10:56 AM, Michael Platings mplati...@gmail.comwrote:

 On 31 May 2010 11:26, Alessandro Terenzi a.tere...@gmail.com wrote:

 I'm am adding support for opacity, reflection and lighting maps to the
 FBX plugin...so far I've got good results and I'm going to post the new 
 code
 as soon as I've reviewed and 'cleaned' it ;) by the way how and where 
 should
 I upload my modifications?


 Here's how to make a submission:
 http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol


 Is there a good repository for FBX models that I could use for testing
 those new features as well as other features in general?


 I only know of the free models on turbosquid


 Finally, I noticed that animations based on bones work fine but morphing
 animations makes osganimationviewer to crash, any idea? (I made models with
 3dsMax 2010+FBX 2011.2)


 Can you send me the model so I can investigate? Cheers

 ___
 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


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


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-06-01 Thread Michael Platings
 would you have a look at them before submission?


Sure, I'll have a look.

One last note: I'm still experiencing problems regarding Y-up and Z-up
 options...it looks like that models are always oriented in the wrong way if
 viewed with osgviewer...any idea?


Which way 'up' goes is a contentious issue so I just made the FBX plugin
consistent with other plugins - if you export a model to 3DS and FBX both
models should appear the same in osgviewer. If you don't like it, just
rotate the model to your preference :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trying to render an ortogonal scene

2010-06-01 Thread Michael Platings

 Thanks, I think you has not read the last post edit


Edits only affect the forum, not the mailing list (that's how many of the
old-timers read these messages) so you're correct, he probably wasn't able
to see that part

For that reason it would make sense to disable forum edits IMHO...
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Having trouble with basic texture mapping on a 3d object

2010-05-28 Thread Michael Platings
 or have different textures in each texture unit as you were going to do.


N don't put a texture in each texture unit. You should only be using
multiple texture units if you need to combine the textures somehow e.g. in a
shader that requires a diffuse texture with a bump map and normal map and
specular map etc...
What you should do is separate your geometry into a different square for
each face of the cube, and for each geometry add a stateset with a texture
assigned to unit 0.

e.g.

for (int i = 0; i  6; ++i)
{
std::stringstream ss;
ss  C:\\Documents and Settings\\MTS\\My Documents\\Visual Studio
2008\\Projects\\OSG_test\\Debug\\smiley  i+1 .jpg;
Texture2D* tex = new Texture2D(osgDB::readImage(ss.str()));
Geometry* geom = createGeometryForFace(i);//set up vertices and texture
coordinates for a square at the appropriate position
geom-getOrCreateStateSet()-setTextureAttributeAndModes( 0, tex.get() );
geode-addDrawable(geom);
}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] FBX plugin: transparency and reflection maps...

2010-05-26 Thread Michael Platings
Hi Alessandro,
at the moment only a single diffuse texture is supported but you're very
welcome to add support for more :) The existing texture handling code is at
fbxMaterialToOsgStateSet.cpp line 27
-Michael


On 26 May 2010 16:35, Alessandro Terenzi a.tere...@gmail.com wrote:

 I've just downloaded the latest version of OSG from svn, I tried the FBX
 plugin but I've got no reflection map in my models.

 Are reflection maps not supported yet by the FBX plugin?

 I'm using FBX 2011.2  (both for the SDK and for the exporter in 3dsMax).

 Thanks.
 Alessandro

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





 ___
 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] vector of const ref_ptr

2010-05-19 Thread Michael Platings
Hi Gianni,
what you're looking for is this:

std::vectorosg::ref_ptrconst MyObject 

This means the pointer can change, but it can't be used to alter the object
it points at.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] fbx writer texture support

2010-05-11 Thread Michael Platings
Hi Martins,
the writer is still a work in progress so I suspect that feature hasn't yet
been implemented. Talk to Sukender (http://sukender.free.fr/) to find out if
it's on his to-do list, if not then your help will be appreciated ;)

On 10 May 2010 18:29, Martins Innus min...@ccr.buffalo.edu wrote:

 Hello,
Has anybody had luck converting textured models to fbx format using the
 writer in OSG?

I narrowed it down to simple case of:

 osgconv skydome.osg skydome.fbx

 The resulting file when viewed in osgviewer is just a solid color.
  Converting that file back to .osg results in no reference to the texture in
 the osg file.

 This is on svn of today, with the 20112 SDK on Mac OS X.  Converting to
 other formats: obj, ive, etc works fine.  I tried turning the optimizer off
 as well as setting  OSG_NOTIFY_LEVEL to DEBUG.  The image gets read fine on
 load, but there's no information on whats going on at the write stage.

 Thanks

 Martins
 ___
 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] [osgPlugins] Collada Animations Support

2010-05-05 Thread Michael Platings
We really do need to merge osganimationviewer into osgviewer :P

On 5 May 2010 11:31, daniele argiolas arj...@gmail.com wrote:

 Ahhh!!!

 with osganimationviewer works!!!

 thank you very much!

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





 ___
 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] Render to (part of) texture

2010-05-05 Thread Michael Platings
Yes, I'd also use a viewport to render to a particular area. Also make sure
you set the clip rectangle to be the same as the viewport otherwise
operations like glClear will affect the whole texture.

On 5 May 2010 11:48, Martin Aasen martin-ferstad.aa...@ffi.no wrote:

 Thanks Christian,

 I am rendering to a texture which is attached to a FBO. The problem was
 that I only want to write to the parts of the texture that need to be
 updated. That is, if I have a 8192x8192 texture and only need to update a
 small area of 128x128, I don't want to prosess all 8192x8192 fragments.

 I have made some tests using a view port that matches the selected area of
 the texture. This seems to work. Sorry for not checking this well enough
 before posting.

 Any additional comment, pointers or suggestions are still welcome!

 Cheers,
 Martin

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





 ___
 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] [osgPlugins] Collada Animations Support

2010-05-04 Thread Michael Platings
Hi Daniele,
I just got the latest code from trunk and opened astroBoy_walk.dae in
osganimationviewer - he's walking fine for me. Are you sure you built
everything correctly? Here's the how-to guide:
http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Collada

On 3 May 2010 15:38, daniele argiolas arj...@gmail.com wrote:

 yes, blender to OSG export works fine, it's blender to Collada that doesn't
 work and also OSG conv from an osg made with blender to Collada.

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





 ___
 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] FBX find cmake

2010-04-29 Thread Michael Platings
Hi Serge,
yes I submitted a change for this on 14th April, hopefully Robert will get
around to applying it soon :)

On 29 April 2010 10:37, Serge Lages serge.la...@gmail.com wrote:

 Hi all,

 The latest version of the fbx plugin (from the SVN) builds with the 2011.2
 version, but currently in the FindFBX.cmake file, the default location of
 the SDK is Autodesk/FBX/FbxSdk/2010.2. Should it be changed
 to Autodesk/FBX/FbxSdk/2011.2 ?

 Thanks !

 --
 Serge Lages
 http://www.tharsis-software.com

 ___
 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] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Michael Platings
Hi Dario,
I've changed the FBX reader so it will keep redundant nodes (leaving it to
the optimiser to remove the fluff) so that combined with J-S's
recommendation should get things working the way you want.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Michael Platings
Just saw your last email - you'll need to get the latest FBX plugin code
from the subversion trunk
-Michael

On 28 April 2010 15:04, Dario Minieri para...@cheapnet.it wrote:

 Hi, thanks for your reply.

 This sound like but unfortunatly don't works. I've exported the variable
 (export OSG_OPTIMIZER=OFF) but the result is the same as above.
 HummThere is some other way to control the optimizer behaviour in this
 cases? OSG is 2.8.3 version.

 Many thanks again

 Bye


 Skylark wrote:
  Hi Dario,
  In our case, we often use DOF nodes with no geometry under them to
  position cameras / lights on models, and the Optimizer removes those by
  default (because it thinks they're useless if they have no geometry
  under them).
 
  So I suspect something similar is happening to you. Try setting
  OSG_OPTIMIZER=OFF to see if that helps.
 
  Hope this helps,
 
  J-S
  --
  __
  Jean-Sebastien Guay
  http://www.cm-labs.com/
  http://whitestar02.webhop.org/
  ___
  osg-users mailing list
 
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
   --
  Post generated by Mail2Forum


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





 ___
 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] [osgPlugins] FBX conversion lost NULL nodes.

2010-04-28 Thread Michael Platings
Hi Dario,
it just occurred to me that if you're using the 2.8.3 version then changing
to the latest code will be a big pain for you. Instead, in your code go to
the switch statement at line 417 of fbxRNode.cpp and delete the whole of the
case statement for KFbxNodeAttribute::eUNIDENTIFIED
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Preferred Video Cards

2010-04-22 Thread Michael Platings
Nvidia tend to have the best OpenGL support. I've also heard ATI/AMD are
pretty good these days but I haven't tested that for myself.

On 22 April 2010 15:36, Reuben Rebullar reuben.rebul...@goodrich.comwrote:

 What are the ideal video cards to use for OSG?  The application I am
 working on is similar to Google Earth where I am using a globe and GIS data.



 Reuben

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





 ___
 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] [osgPlugins] FBX Plugin

2010-04-20 Thread Michael Platings
It would be sensible to merge osganimationviewer with osgviewer to avoid
this confusion, if anyone has any time to do it?

On 20 April 2010 09:22, Dario Minieri para...@cheapnet.it wrote:

 Oh nice, I havn't compiled examples :D This work fine

 Best regards


 bouffa wrote:
  Hi Dario,
 
  You can find osganimationviewer in the examples folder.
 
 
  Mourad
 
 
 
 
 
  On Mon, Apr 19, 2010 at 7:55 PM, Dario Minieri  () wrote:
 
   Hi,
  
   I have the same problem with some simple model from Cinema 4D. The FBX
 contains all animation takes but I see no movement with osgviewer. I'm using
 OSG 2.8.3 with, obviously, FBX support (SDK 2010-2).
  
   You talking about an osgAnimationViewer, but I have only the osgViewer
 in my binary dir.
  
   You have foud some solution?
  
   Thank you!
  
   Cheers,
   Dario
  
   --
   Read this topic online here:
   http://forum.openscenegraph.org/viewtopic.php?p=26956#26956 (
 http://forum.openscenegraph.org/viewtopic.php?p=26956#26956)
  
  
  
  
  
   ___
   osg-users mailing list
()
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org(
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
  
 
 
   --
  Post generated by Mail2Forum


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





 ___
 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] Untriangulate Meshes...

2010-04-20 Thread Michael Platings
Hi Dario,
no the FBX reader doesn't necessarily have to triangulate the mesh, I just
wrote it that way (a) for simplicity and (b) because triangle lists are
faster to render than separate polygons.
Presumably you're viewing the model in wireframe - are the extra lines a
major issue for your application?

On 19 April 2010 19:59, Dario Minieri para...@cheapnet.it wrote:

 Hi Gordon

 Simply, if I have a model with mesh consisting of polygons with 4 vertices
 (no others n-gons), it must necessarily be triangulated? The osgViewer
 always shows the triangulated models even though they are not originally.

 Many thanks

 Best Regards


 Tomlinson, Gordon wrote:
  What do you define a 'untriangolate mesh' to be ?
 
 
 
  Gordon Tomlinson
  Product Manager 3d Technology  Project Wyvern
  Overwatch(r)
  An Operating Unit of Textron Systems
 
  -Original Message-
  From:
  [mailto:] On Behalf Of Dario
  Minieri
  Sent: Monday, April 19, 2010 10:11 AM
  To:
  Subject:  Untriangulate Meshes...
 
  Hi,
 
  Sorry for my noob question: OSG is unable to handle untriangolate
  meshes?
 
  Thank you!
 
  Cheers,
  Dario
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=26947#26947
 
 
 
 
 
  ___
  osg-users mailing list
 
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
  g
  ___
  osg-users mailing list
 
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
   --
  Post generated by Mail2Forum


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





 ___
 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] [osgPlugins] FBX Plugin

2010-04-20 Thread Michael Platings
Hi Gordon,
as you're referring to your own application I'm guessing there's some
confusion over which project I'm referring to - the executable project named
Applications osgviewer, not the library osgViewer.
Don't worry, I'm not suggesting anything that will force animations into
anyone else's application ;)

Personally I have no need for it, but I've recently observed several posts
saying Why won't my animations play in the viewer? so to make things
easier for newcomers it seems reasonable to add that functionality.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX plugin with FBX SDK 2011.2

2010-04-15 Thread Michael Platings

 Will your modified CMake find file find the required version (2011.2) even
 if both 2010.2 and 2011.2 are installed?


Yes on Windows, but on other platforms it will depend on the value of the
FBX_DIR environment variable.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] strange Matrix interface

2010-04-15 Thread Michael Platings
 can somebody explain to me why in Matrixd/Matrixf there is a getRotate,
 setRotate, getTrans, setTrans, getScale ... but no setScale? is there a
 reason for this?


You could argue that function should be added. However that could lead to
people doing
mat.setTrans(...)
mat.setRotation(...)
mat.setScale(...)
and then wondering why setting the rotation didn't have any effect (setting
the scale would overwrite it).
It's probably safest to set up your matrix with
pre/postMultTranslate/Scale/Rotate.


 and why do i have to pass a matrix to the (non-static) bool Matrix::invert
 method?


matA.invert(matB) sets matA to be the inverse of matB.
However something that doesn't make sense to me is why to get the inverse of
a matrix you have to do Matrix::inverse(mat) rather than just mat.inverse().


 PS: a Matrix MatrixTransform::getMatrix (no const reference) would also be
 nice, so i could operate on the contained matrix directly if i wanted to and
 would not have to copy it with getMatrix and copy it again with
 setMatrix...)


The MatrixTransform needs to know when its matrix has been modified so that
it can set its flags to dirty. If you really need direct access to the
matrix for maximum efficiency, and you don't mind setting the flags
yourself, you can derive your own class from MatrixTransform. But for most
of us the current way is safest.

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


Re: [osg-users] DAE reader - Handling of double precision

2010-04-15 Thread Michael Platings
domSourceReader doesn't need to create any array until
getFloat/Vec2/Vec3/Vec4/MatrixArray is called. So I suggest adding an
argument to each of those functions specifying a float or double hint, and
at that point if the array hasn't already been created then create it with
the appropriate precision.

e.g.

osg::Array getFloatArray(bool doublePrecisionHint)
{

}

On 15 April 2010 10:25, Sukender suky0...@free.fr wrote:

 Hi all,

 I'm working on making Collada (DAE) able to read/write double precision
 numbers. Format seems to store floating points values as xs:double, which is
 IEEE 754 double precision. So, should I simply convert to float at the time
 data is put in geometry (vertices, colors, normals, etc.) depending on
 PrecisionHint (See latest submitted osgDB::Options)? The problem is that I
 double memory usage for the temporary data. Is this acceptable?

 Actually I thought about converting as soon as possible, but it seems DAE
 can define data sources without saying what this source is for, and then
 reference these sources later, saying that's for vertices, normals, etc.

 For now I got an hybrid implementation (not finished yet), which does not
 assume anything about DAE precision, and converts at the time data is put in
 the geometry. The thing is that I always put double arrays in a strcture
 that can handle both float and double arrays... which I find a bit stupid.

 Thoughts? Ideas?

 Sukender
 PVLE - Lightweight cross-platform game engine -
 http://pvle.sourceforge.net/
 ___
 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] strange Matrix interface

2010-04-15 Thread Michael Platings
 m.inverse( m ); ?

Don't use it like that as it'll cause an extra matrix copy (see line 614 of
Matrix_implementation.cpp).
Basically m1.invert(m2); is a more efficient way to express m1 =
Matrix::inverse(m2);


 btw: i am not the only one struggling with the matrix interface, maybe it
 would be worth the thought of re-engineering it?


I agree it's not the most intuitive, but now there's lots of code out there
already using that interface so it can't be changed. And if you find it
confusing, think of it as a very light introduction to the kind of confusion
and frustration to be encountered in the world of OpenGL ;)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Trackball manipulator and screen distance with stereo

2010-04-15 Thread Michael Platings

 I can't override the virtual function (I don't know why, but it doesn't
 work) :O.


If you're using Visual C++ try using the override
keywordhttp://msdn.microsoft.com/en-us/library/41w3sh1c.aspxto
ensure you've got the correct function signature.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX plugin with FBX SDK 2011.2

2010-04-14 Thread Michael Platings
Hi all,
I've now updated the FBX plugin to compile with the latest FBX SDK.
Unfortunately this breaks compatibility with previous versions so next time
you get the plugin you'll need to install version 2011.2 FBX SDK if you want
to recompile the plugin.
-Michael

On 13 April 2010 13:29, Doug McCorkle mc...@iastate.edu wrote:

 Hello Michael,


 On Apr 13, 2010, at 3:45 AM, Michael Platings wrote:

  The FBX plugin is written for version 2010.2 of the SDK.

 OK.


  That version is still available in the SDK Archives page on Autodesk's
 website.

 Right, I have been grabbing these but wanted to check and see if it was
 supported on a new version of OSG.


  I'll look into getting 2011.2 working, cheers.

 Wow! Thanks.


 Doug
 ___
 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] FBX plugin with FBX SDK 2011.2

2010-04-14 Thread Michael Platings


 Wouldn't there have been a way to keep it compatible with both? (#ifdefs or
 something)


I would have if I could have without making the code nightmarishly
complicated but the structure of how animations are presented by the SDK is
very different now.


 Also, will the new sdk/plugin read older files (that the old plugin read
 fine)? I guess the answer is yes, otherwise you wouldn't have modified the
 plugin in that way, but then where does the incompatibility come from?


You guess correctly, yes old files read fine :) I should have said the
latest SDK breaks compatibility with previous versions* of the plugin code*;
there's no break in compatibility with any .fbx files.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX plugin with FBX SDK 2011.2

2010-04-13 Thread Michael Platings
The FBX plugin is written for version 2010.2 of the SDK. That version is
still available in the SDK Archives page on Autodesk's website.
I'll look into getting 2011.2 working, cheers.

On 12 April 2010 20:03, Doug McCorkle mc...@iastate.edu wrote:

 Hello,

 Has anyone gotten the FBX plugin to build with the FBX SDK version 2011.2?
 If so what version of OSG are you using?

 http://usa.autodesk.com/adsk/servlet/pc/mform_proc

 Thanks.

 Doug

 ___
 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] Use namespace...

2010-04-13 Thread Michael Platings
Yes you can, however OSG uses simple names that will likely also be used in
other projects (e.g. Array, Node, Group etc.) so it's quite likely you'll
get name conflicts if you use another library which uses the same class
names.
I've had developers making similar complaints to me, so as a compromise we
do
using somenamespace::SomeClass;
using somenamespace::SomeFunction;
etc. for things that are used very frequently.
That way it will be less of a big deal to change the code if we start using
a library that uses the same class names.

On 13 April 2010 17:12, mas oug mas...@gmail.com wrote:

 Hi,
 Just curious, I noticed that in a lot of the code, we use stuff like
 osg::someFunctio() and etc...
 Could we use a namespace using namespace osg; to avoid having to write
 osg:: every single time?

 THANKS!!
 -Masoug

 ___
 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] trouble in MSFBO

2010-03-23 Thread Michael Platings
Hi Kai, a screenshot would help us diagnose the problem.

The black segments on the edges of you objects may be because your shader
varyings aren't centroid. Read this article for an explanation:
http://www.opengl.org/pipeline/article/vol003_6/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] osgAnimation precision

2010-03-23 Thread Michael Platings
I see what you mean, yes all the update() and getValueAt() functions would
have to be changed.
I don't think this is too application specific to be worthy of attention
though. Matrices can already be customised to use doubles or floats using
OSG_USE_FLOAT_MATRIX, so I think it would be appropriate to have an
OSG_USE_FLOAT_TIME option.

Cedric, what do you think?


On 23 March 2010 17:08, Garrett Cope garrett.cope@simcen.usuhs.eduwrote:

 Michael,

 Thanks for the reply. I figured that was probably the reason, but wanted to
 check since it seems that other plugins (like osgParticle) carry the double
 precision through the update functions.

 I think all of the update functions would have to be changed over to fix my
 problem, but it is probably too application specific to make that scale of
 change. I'm setting the sim time with an epoch-based timer, so it runs out
 of significant digits when cast to float. It's probably best to handle it on
 my end, but thanks for the info!


 --jamie

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





 ___
 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] osgAnimation and animation mixing/blending

2010-03-19 Thread Michael Platings
On 18 March 2010 19:50, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com
 wrote:

 One possible stumbling point is that we already use boost in our software,
 so the Collada plugin would have to be built with the same version, but I
 guess it should work.


No, you don't need to worry about this. How you use boost elsewhere is
unimportant, you should build Collada with the boost version it comes with,
it won't affect anything else.


  with the exception of the one that uses morphing (AKA vertex blending).


 What was the problem there? Are you talking about hardware skinning or
 something else? If we were to use osgAnimation and the Collada plugin to
 feed it data, we'd definitely want to use hardware skinning, but I would
 think that's orthogonal to how the data is read and given to osgAnimation?


Something else: http://en.wikipedia.org/wiki/Morph_target_animation
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgPlugins] Plugin Error

2010-03-19 Thread Michael Platings
Sounds like the jpeg plugin DLL can't be found - make sure it has been
built, and it's in a place that's accessible to the application.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] FBX plugin sets material diffuse color alpha to 0?

2010-03-18 Thread Michael Platings
Hi J-S,
I looked at the model you linked to and all the TransparencyFactor values
are 1, which according to the documentation in kfbxsurfacelambert.h means
totally transparent - the model has been incorrectly exported.

The same thing happened with DAE - Google Sketchup used to export models
with the transparency inverted. To deal with that I used a simple heuristic
to guess whether the model needed its transparency inverting. I've put the
same technique into the FBX plugin, and your model now looks as the artist
intended :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgAnimation and animation mixing/blending

2010-03-18 Thread Michael Platings
 How stable is the current Collada plugin in OSG?


It should be very robust now. I've got it displaying all the test models
from the https://collada.org/owl/ with the exception of the one that uses
morphing (AKA vertex blending).
Another issue is that some models assume that they will be rendered with
two-sided lighting and without back-face culling, which for OSG isn't the
case. However I have no intention of changing this as doing so would
compromise the speed of rendering for nicely designed models.

Does it support animation well?


Yes, all skinned animations should work perfectly, if not then please let me
know.

And will content creation tools export Collada in a way that osg and
 osgAnimation will understand?


Yes, AFAIK. Again, if you find any files that don't work (aside from the
known issues above) then please let me know.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] building collada plugin on windows

2010-03-09 Thread Michael Platings
On Windows with Visual Studio 2008 this is what I do prior to building
OSG from CMake:

1.  Get the COLLADA DOM from http://www.khronos.org/collada/ and
extract it to C:\COLLADA 
2.  Add the environment variable COLLADA_DIR as C:\COLLADA 
3.  Open C:\COLLADA\dom\projects\vc9-1.4\dom.sln and build the dom
project in both Debug and Release configurations. 

Once you've done this CMake should automatically fill in the COLLADA
options (library paths etc) for you.

 


From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Trajce
(Nick) Nikolov
Sent: 09 March 2010 09:33
To: OpenSceneGraph Users
Subject: [osg-users] building collada plugin on windows


Hi community, 

this is my first attempt to build the dae plugin. In CMAke there are
bunch of options for COLLADA. I have downloaded the colladadom lib, and
I am lost. What is to be downloaded (and from where) in order to build
the plugin,

Thanks a lot
-Nick


__
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
__


__
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
_
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] building collada plugin on windows

2010-03-09 Thread Michael Platings
Apologies, it's this one:
http://sourceforge.net/projects/collada-dom/files/Collada%20DOM/Collada%20DOM%202.2/collada-dom-2.2.zip/download

Despite being called 2.2 it creates version 2.1 DLLs :\
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  1   2   >