Re: [osg-users] [osgPlugins] write to collada
Hi, That fixed it. :-) Thank you! Cheers, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46281#46281 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] write to collada
Hi, I have the following osg file. If I load this in my application, it loads fine. If I use osgDB::writeNodeFile to write the scenegraph to a collada (.dae) file, the cube is not added to the collada file. I do not get any errors/warnings and I have other osg files that I can convert to .dae perfectly fine. So it is probably something specific with this file. Code: Switch { UniqueID Switch_0 name World switch nodeMask 0x cullingActive TRUE StateSet { UniqueID StateSet_1 rendering_hint DEFAULT_BIN renderBinMode INHERIT GL_LIGHTING OFF PolygonMode { mode FRONT_AND_BACK FILL } } NewChildDefaultValue 1 ValueList { 1 } num_children 1 Group { UniqueID Group_2 name Virtual world 1 nodeMask 0x cullingActive TRUE num_children 1 Geode { UniqueID Geode_3 name myCube nodeMask 0x cullingActive TRUE description { - Cube } num_drawables 1 ShapeDrawable { UniqueID ShapeDrawable_4 Box { UniqueID Box_5 Center 0 0 0 HalfLengths 0.5 0.5 0.5 Rotation 0 0 0 1 } useDisplayList TRUE useVertexBufferObjects FALSE color 1 1 1 1 } } } } The dae file that this generated is: Code: ?xml version=1.0 encoding=UTF-8? COLLADA xmlns=snippedCOLLADASchema version=1.4.1 asset created2006-07-25T00:00:00Z/created modified2006-07-25T00:00:00Z/modified unit/ /asset library_visual_scenes visual_scene id=defaultScene node id=sceneRoot node id=World switch node id=Virtual world 1/ extra type=Switch technique profile=OpenSceneGraph ValueList1/ValueList /technique /extra /node /node /visual_scene /library_visual_scenes scene instance_visual_scene url=#defaultScene/ /scene /COLLADA I'd appreciate any ideas. Thank you, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46177#46177 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] write to collada
On 03/12/2012 08:49 AM, David De Weerdt wrote: Hi, I have the following osg file. If I load this in my application, it loads fine. If I use osgDB::writeNodeFile to write the scenegraph to a collada (.dae) file, the cube is not added to the collada file. I do not get any errors/warnings and I have other osg files that I can convert to .dae perfectly fine. So it is probably something specific with this file. Your file includes a ShapeDrawable. This doesn't mean anything to anyone except for OSG itself. If you want to export a cube to COLLADA, you'll need to change that ShapeDrawable cube to be a Geometry with all the necessary vertices, indexes, etc. In general, it's best to avoid ShapeDrawables except for quick tests and toy applications. They often lead to problems like this :-) --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org