Search code examples
3daugmented-realityopenscenegraphfbxartoolkit

Import FBX to ARToolKit


I have problem about importing the FBX model. I have done it with Unity so I know the model exported well but I should do with the native code as well. I am getting error:

2015-06-02 15:20:21.721 ARAppNFTOSG[746:481003] Error: unsupported model file
type (fbx). Ignoring.

I am trying it on the AR example named ARAppNFTOSG. I changed the model.dat as:

1

OSG/Geralt/watcher.FBX
0.0 0.0 0.0
0.0 1.0 0.0 0.0
10.0 10.0 10.0
MARKER 1

I looked at the OSG forums and found that I should install FBX SDK which I installed the 2013.3 and 2014.1. Also add the line:

 USE_OSGPLUGIN(fbx)

to the osgplugins.h I am not sure FBX SDK that I installed linked somehow because I didn't do manual linking. What should I do? I am using mac by the way.


Solution

  • The FBX plugin for OSG is not supplied with ARToolKit for iOS, and I'm not sure it can even be built for iOS.

    The best option is to use the osgconv command-line tool from an installation of OSG on OS X or Windows (e.g. http://www.artoolkit.org/dist/3rdparty/openscenegraph/3.2.x/OpenSceneGraph-3.2.2%20OS%20X%2010.7%2B%20Installer.zip includes FBX plugin and supplies osgconv at path /Applications/OpenSceneGraph/Applications/osgconv) to convert from FBX to a supported OSG format, e.g. .osgb and load that at runtime.