[osg-users] Sharing statesets across files
pmartz at skew-matrix.com
Sun Sep 16 12:26:46 PDT 2007
OSG's OpenFlight loader supports this. A "parent" flt file contains texture
and material palettes, which, when loaded into OSG, become arrays of
StateSets with texture and material values. If the parent model then uses
external reference records, and specifies that the parent palettes override
child palettes, then all "child" models referenced by the parent model will
share the same StateSets.
Not sure about this, but I don't think the existing OpenFlight loader has
support to "page in" external reference models. If not, then this might not
be a solution for you.
Hope that helps,
Skew Matrix Software LLC
303 859 9466
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Matt
Sent: Sunday, September 16, 2007 2:25 AM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Sharing statesets across files
Is there a way of including a proxy stateset node or referencing a stateset
stored in another file? I am trying to split up a single model into smaller
pagable chunks. However, my original model makes significant use of shared
statesets to maximise reuse of textures. When I break up my model each leaf
node includes its own copy of the shared stateset. The total disk space used
by the resulting fragments is a factor of ten larger than the original file.
This in itself is not a problem but the resulting texture memory usage is
also a factor of ten larger as a result of the lack of reuse.
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users