Paul Martz wrote:
> Hi Chris -- I have a question for you on this.
> Suppose I have a DB consisting of two .ive files: a master file that
> contains 100 ProxyNodes referring to the second file, a subordinate .ive
> file (to render 100 instances of the subordinate).
> What would my output be if I used your change and converted this
> database to .osg? Would I get:
>  - One .osg file? (With all the instances baked in)
>  - Two .osg files? (1-to-1 correspondence with input)
>  - 101 .osg files? (Multiple copies of the subordinate input file)
>  - Something else?

  I believe you will end up with two .osg files. During the recursion-queuing 
stage when I
collect dependent subfiles from the in-memory scenegraph, I only insert a 
subfile into the
conversion batch if it it not already there (indexed by file path/name). So, as 
long as
the source graph actually is referring to only one subfile and it's represented 
by the
same path everywhere, it should only be converted once.

  Of course, this is untested, since I didn't have any databases like this. ;)

> Does your change include any options to control this behavior?

  No options are needed, it is the default, and only sensible behaviour I could 
imagine.

> I have some large ProxyNode-nested DBs that I'll use for testing. Should
> I wait for these submissions to roll into svn head, or start playing now?

  Give 'em a whirl right now if you like. My changes are in 
infrequently-altered sources
files taken from a relatively-recent (1-2 month old) svn truck checkout, so I 
think they
should be safe to apply on your own.

  All feedback welcomed. Even though my customer won't foot the bill for 
changed outside
of VPB/PagedLOD support, I'll personally make sure it works for any cases I can.


  Note: While osgconv supports converting multiple source files en-batch on one
command-line, this option is not compatible with the recursion visitor method I 
use, and
only the first database loaded on the command-line will have the correct paths 
when
output. Fixing this would have required substantial changes to readNodeFiles 
(or basically
building readNodeFiles into osgconv and hacking it there) which I thought was 
not
defensible practice.

  A sample command-line for a VPB database might be:

osgconv -O OutputTextureFiles -R .osg inputpath\InputFile.ive 
outputpath\OutputFile.osg

  This will convert inputpath\InputFile.ive from IVE to OSG, creating detached 
DDS texture
files as it goes. "outputpath" must exist, but doesn't need any subdirectories 
-- they
will be made as needed while crawling the input path folder structure.

> Paul Martz
> Skew Matrix Software LLC
> _http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
> +1 303 859 9466

-- 
Chris 'Xenon' Hanson, omo sanza lettere                  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to