I need to extract the embedded textures in IVE files for use in another application.
osgconv is not an option. Need to do it programmatically via the API.
1. Is there any mechanism, direct or circuitous, for getting a handle on an embedded texture in an IVE file?
2. Is there any spec document for the IVE format?
Thanks in advance….
Just load the .ive file then use a custom NodeVisitor to traverse the
scene and on encoutering StateSet on the Node and Drawables check from
Texture, then the Image's attached to the Textures. There a examples
of NodeVisitor all over the OSG, and even some that do searches for
textures. The osgUtil::GLObjectVisitor wouldn't be a bad guide for
you.
Robert.
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Is there any documentation on the IVE format? A spec file?
-----Original Message-----
From: osg-user...@lists.openscenegraph.org
[mailto:osg-user...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Tuesday, September 23, 2008 10:28 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Extracting embedded Textures
HI Frank,
Just load the .ive file then use a custom NodeVisitor to traverse the
scene and on encoutering StateSet on the Node and Drawables check from
Texture, then the Image's attached to the Textures. There a examples
of NodeVisitor all over the OSG, and even some that do searches for
textures. The osgUtil::GLObjectVisitor wouldn't be a bad guide for
you.
Robert.
On Tue, Sep 23, 2008 at 3:23 PM, Evans, Frank <fev...@harris.com> wrote:
> I need to extract the embedded textures in IVE files for use in
another
> application.
> osgconv is not an option. Need to do it programmatically via the API.
>
> 1. Is there any mechanism, direct or circuitous, for getting a handle
on an
> embedded texture in an IVE file?
> 2. Is there any spec document for the IVE format?
>
> Thanks in advance....
It's straight forward, just look at the NodeVisitor examples I mentioned.
> Is there any documentation on the IVE format? A spec file?
No there is no spec file, it is not meant to be read in a non native
way like an interchanges format such Collada.
Given you have a perfectly serviceable loader it'd be madness to try
and read it by hand, please just use my suggestion.
Robert.
-----Original Message-----
From: osg-user...@lists.openscenegraph.org
[mailto:osg-user...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Tuesday, September 23, 2008 12:53 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Extracting embedded Textures
For various reasons, I ended up writing some IVE readers in Java.
Mostly because I had some .ive files that no version of OSG I had
available would load correctly. And partly because this is the sort of
thing that feeds an odd manic part of my brain.
At any rate, the stuff is implemented to allow code configurable
profiles because I was pretty sure I was going to have to hack a
non-standard version. The result of which is something that is almost
like documentation... in code:
http://meta-jb.cvs.sourceforge.net/meta-jb/sandbox/src/java/org/progeeks/osg/io/StandardIveConfiguration.java?revision=1.11&view=markup
Each supported object type has an individual object profile with field
types added (with an optional version designator).
I never finished it so there are some objects that aren't defined yet
but I got it to the point that it could load all of my own IVE files and
I was able to determine more about what was wrong with my bad ones.
There have also been some changes in the IVE format that are harder to
configure this way (byte ordering changes, etc.)... one day I may even
get back to it.
Not sure it's at all useful, but it does centrally describe (in a way)
the IVE format... with a little translation. Other than that, it's
probably only useful to me. :)
-Paul
On Tue, Sep 23, 2008 at 6:26 PM, Evans, Frank <fev...@harris.com> wrote:
> Thanks once again for the incredibly fast response. Up to now I've been
> using the OsgDotNet wrappers, so writing a Custom Visitor class means
> maintaining and updating the wrappers as well. At least, if I understand
> the solution correctly. I will of course make every effort to leverage
> the native loader.
Wrappers do have their disadvantages, but if you go this route then
you do need to accept that their at times when you have to dig down to
the metal to get the job done. If this means helping maintain the
wrappers then this no bad thing - you'll get updates to the latest OSG
features/bug features as well as ability to solve some of your
problems.
The alternatively of writing a whole loader for an undocumented and
varying file format sounds like far more work now and in the long run.
BTW, on the subject of Java/.NET wrappers I've had a lot of success with
IKVM in the last year.
http://www.ikvm.net/index.html
That is, maintaining code in java and compiling the jars into CLR
assemblies. I haven't tried it with JNI, but IKVM supports JNI, so it
might be possible to maintaining a single OSG wrapper library for both
runtimes. IKVM is a great tool, but its important to use it
appropriately. I use it for class loaders, and helper classes. I
wouldn't use it for rendering.
-----Original Message-----
From: osg-user...@lists.openscenegraph.org
[mailto:osg-user...@lists.openscenegraph.org] On Behalf Of Paul
Speed
Sent: Wednesday, September 24, 2008 1:11 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Extracting embedded Textures