[osg-users] ive format and includeImageFileInIVEFile does it lose references to same image?
roger at beardandsandals.co.uk
Wed Sep 19 04:43:27 PDT 2007
Can anyone who is more familiar with ive ReaderWriter comment on the
Setting the includeImageFileInIVEFile option when writing ive files causes
very large files to be written even if the scene contains few textures. It
appears that whenever an image object is referenced in the graph a copy of
it is placed in the output stream along with a full copy of the image data.
Am I correct in this assumption?
Looking at the ive input code it appears that new image objects are created
unconditionally without checking for duplication whenever they are
encountered. It appears that this results in many copies of the same image
in the graph. Am I talking complete nonsense here?
I was just wondering whether it would be an easy change to make to get the
code that reads the mage data from the stream to tag the data with the
filename and put it in the cache. This data could then be used on subsequent
reads. Comments anyone?
I will have a go at this if it seems feasible, although a more elegant
solution that stops the duplicate data getting into the file in the first
place may be better. I suspect most of the other duplications that occur can
be removed with the optimiser.
I will not be offended if I am told the above is utter nonsense!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users