On Wed, May 11, 2011 at 1:27 PM, Paul Martz <[email protected]> wrote:

> On 5/11/2011 11:20 AM, Ryan Pavlik wrote:
>
>>
>>
>> On Tue, May 10, 2011 at 8:24 PM, Paul Martz <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>>    On 5/10/2011 7:11 PM, Paul Martz wrote:
>>
>>        On 5/3/2011 3:02 PM, Ryan Pavlik wrote:
>>
>>            I'd like to propose my fixes that I sent in on -submissions
>>            pre-2.8.4: all
>>            except the VC2010 build fix still apply. They are these two:
>>
>>            Improvements to osgconv:
>>
>> https://github.com/rpavlik/osg/compare/OpenSceneGraph-2.8...improve-osgconv
>>
>>            (I've also forward-ported these to trunk:
>>
>> https://github.com/rpavlik/osg/compare/master...improve-osgconv-trunk )
>>
>>
>>        So, if I understand correctly, you did not post this change to
>>        osg-submissions
>>        for inclusion in OSG's svn trunk, is that correct? Or, you did post
>>        them, but
>>        they are awaiting action by Robert?
>>
>>        Has anyone other than you tested the changes?
>>
>>        What, exactly, are these improvements to osgconv? (No, I haven't
>> looked
>>        at the
>>        code -- yet.)
>>
>>
>>    Having reviewed the code, I see two changes:
>>
>>    1) A simple change to an error message in osgconv.cpp. Looks
>> straightforward.
>>
>>    2) A change to the image file name format as output by the dot OSG
>> plugin.
>>    Not sure I understand this one, but it doesn't appear to be an
>> "improvement
>>    to osgconv". Did you include this by mistake?
>>
>>       -Paul
>>
>>
>> No, the .osg plugin modification essentially only affects use of osgconv.
>>  What
>> it does is, if  the OutputTextureFiles option is turned on (such as by
>> passing
>> -O OutputTextureFiles to osgconv),
>>
>
> ...or anytime "OutputTextureFiles" is present in the Options string. This
> functionality is orthogonal to osgconv. Any application can access it
> anytime they write a dot OSG file. This change will affect more than
> osgconv.
>
>   -Paul
>

Well, yes. In retrospect, I didn't name the patch very accurately given its
contents - I created it while working on osgconv which is presumably why I
mentioned osgconv in the name.

In any case, we can consider it as a separate patch, to the .osg writer
plugin. My intent was to make saving models with textures to OSG format work
better.  In all of the following cases, insert the qualification "with
OutputTextureFiles enabled" - behavior does not change unless this option is
added. Before and after the patch, loading an .osg model in the place where
it was initially saved works. After the patch, however, the textures go to a
subdirectory named in a way that clearly links it with the model that uses
it, and loading the saved model from another location as long as the
textures were also copied/moved works correctly.  The only case I can see
that worked before and won't work after, is if the .osg file alone is
moved/copied somewhere else, but the textures remain in the
originally-exported location. (This is due to the fact that it now exports
relative paths.)

As a useful side-effect (for privacy/security) of using relative paths, .osg
files saved with this option turned on don't reveal details about the file
organization of the computer they were saved on.

Would this be an improvement that would better be separated into a distinct
option string like OutputRelativeTextures or something like that?

Ryan

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[email protected]
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to