[osg-users] Saving a model

Robert Osfield robert.osfield at gmail.com
Mon Jun 15 01:23:08 PDT 2015


Hi Joe,

By default the .osgb output will embed the image data within the .osgb when
you call writeNodeFile(..), so no external images will be written out.  You
can control behaviour of the plugin by passing in different options
string.  These are listed when you run:


  osgconv --format osgb

The output is:


 $ osgconv --format osgb
Plugin osgPlugins-3.3.9/osgdb_osg.so
{
   ReaderWriter : OSG Reader/Writer
   {
       features   : readObject readNode writeObject writeNode
       extensions : .osg                           OpenSceneGraph Ascii
file format
       extensions : .osgs                          Pseudo OpenSceneGraph
file loaded, with file encoded in filename string
       options    : OutputTextureFiles             Write out the texture
images to file
       options    : includeExternalReferences      Export option
       options    : precision                      Set the floating point
precision when writing out files
       options    : writeExternalReferenceFiles    Export option
   }
   ReaderWriter : OpenSceneGraph Native Format Reader/Writer
   {
       features   : readObject readImage readNode writeObject writeImage
writeNode
       extensions : .osg2                    OpenSceneGraph extendable
format
       extensions : .osgb                    OpenSceneGraph extendable
binary format
       extensions : .osgt                    OpenSceneGraph extendable
ascii format
       extensions : .osgx                    OpenSceneGraph extendable XML
format
       options    : Ascii                    Import/Export option: Force
reading/writing ascii file
       options    : Compressor=<name>        Export option: Use an inbuilt
or user-defined compressor
       options    : ForceReadingImage        Import option: Load an empty
image instead if required file missed
       options    : SchemaData               Export option: Record inbuilt
schema data into a binary file
       options    : SchemaFile=<file>        Import/Export option:
Use/Record an ascii schema file
       options    : WriteImageHint=<hint>    Export option: Hint of writing
image to stream: <IncludeData> writes Image::data() directly; <IncludeFile>
writes the image file itself to stream; <UseExternal> writes only the fi
lename; <WriteOut> writes Image::data() to disk as external file.
       options    : XML                      Import/Export option: Force
reading/writing XML file
   }
}


 $ osgconv --format osgb
Plugin osgPlugins-3.3.9/osgdb_osg.so
{
   ReaderWriter : OSG Reader/Writer
   {
       features   : readObject readNode writeObject writeNode
       extensions : .osg                           OpenSceneGraph Ascii
file format
       extensions : .osgs                          Pseudo OpenSceneGraph
file loaded, with file encoded in filename string
       options    : OutputTextureFiles             Write out the texture
images to file
       options    : includeExternalReferences      Export option
       options    : precision                      Set the floating point
precision when writing out files
       options    : writeExternalReferenceFiles    Export option
   }
   ReaderWriter : OpenSceneGraph Native Format Reader/Writer
   {
       features   : readObject readImage readNode writeObject writeImage
writeNode
       extensions : .osg2                    OpenSceneGraph extendable
format
       extensions : .osgb                    OpenSceneGraph extendable
binary format
       extensions : .osgt                    OpenSceneGraph extendable
ascii format
       extensions : .osgx                    OpenSceneGraph extendable XML
format
       options    : Ascii                    Import/Export option: Force
reading/writing ascii file
       options    : Compressor=<name>        Export option: Use an inbuilt
or user-defined compressor
       options    : ForceReadingImage        Import option: Load an empty
image instead if required file missed
       options    : SchemaData               Export option: Record inbuilt
schema data into a binary file
       options    : SchemaFile=<file>        Import/Export option:
Use/Record an ascii schema file
       options    : WriteImageHint=<hint>    Export option: Hint of writing
image to stream: <IncludeData> writes Image::data() directly; <IncludeFile>
writes the image file itself to stream; <UseExternal> writes only the fi
lename; <WriteOut> writes Image::data() to disk as external file.
       options    : XML                      Import/Export option: Force
reading/writing XML file
   }
}





On 15 June 2015 at 07:30, Joe Kindle <seganom at gmail.com> wrote:

> Hi,
>
> Ive been struggling in saving osg and osgb files.
> When i load osgb model, and then trying to save it (using "saveNodeFile"),
> the texture is missing. (Probably not saved with the file)
> How can i solve that ?
>
> Thank you!
>
> Cheers,
> Joe
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64089#64089
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150615/f1c362eb/attachment-0002.htm>


More information about the osg-users mailing list