DAE plugin was linking ORIGINAL images in the Collada file, using image->getName() as a path (even if images were modified in memory!). As the behaviour was not the one of other plugins (3DS, FBX, and such), I made the plugin relativise images filenames (as those plugins) and write the image which is in memory. However, in order to avoid removing features, I kept the previous behaviour but moved it in an option. Here are the options of the plugin I changed: - daeForceTexture was unclear in this new context and removed in favor of two new options - daeLinkOriginalTexturesNoForce: Writes reference to the original image if found, instead of writing the image in memory - daeLinkOriginalTexturesForce: Writes reference to the original image even if not found, instead of writing the image in memory Of course, if you specify no option, images are written as for other plugins. Other thing I changed is the UTF8 support as I told you in a previous conversation. Now there is a simple option, "daeNamesUseCodepage", which makes all names except filenames (materials, animation, geometries...) be considered as encoded using current codepage. If so, they'll be converted to UTF8 when writing; else they are written directly. Of course, filenames follow OSG_USE_UTF8_FILENAME as usual. I did "
osgPlugins/dae/README.txt - Mike Weiblen http://mew.cx/
OSG reader/writer plugin for the COLLADA digital asset exchange (DAE) schema.
See http://collada.org/ and http://khronos.org/collada/ for further info.
RUNTIME USAGE EXAMPLES
osgviewer myFile.dae
osgconv myFile.osg myFile.dae
RUNTIME PLUGIN OPTIONS
Import Options
--------------
none
Export Options
--------------
polygon : export polygons as COLLADA polygons instead of polylists.
This option can be used for if polylists are not supported.
ex : osgconv -O polygon myFile.osg myFile.dae
BUILD DEPENDENCIES
- COLLADA DOM (document object model) v1.4.1
http://collada.org/mediawiki/index.php/DOM_guide:_Setting_up
- libxml2
- iconv
A standard "ccmake ." while in the root of the OSG source will expose
two CMake variables: COLLADA_INCLUDE_DIR and COLLADA_LIBRARY. Using
these two variables correctly can be a bit tricky (especially as
the "right" and "wrong" ways to use Collada are hard to define), but
I will briefly explain them below.
COLLADA_INCLUDE_DIR: This variable wants the path where it can
find the COLLADA headers. On most systems this will be something
like /usr/include or /usr/include/collada.
COLLADA_LIBRARY: This variable is asking for the FULL PATH to the
file libcollada_dom.a. As long as it can find this file, the
OSG Collada ReaderWriter should build just fine.