Rob Mace (mace++at++lum.engr.sgi.com)
Thu, 21 Mar 1996 23:13:45 -0800
Support for the .pfb format is now available for ftp and beta testing.
.pfb is the newest Performer file format. It was designed with load speed
in mind. For example Performer town converted to this format loads in
2.8 seconds on a 200 Mhz Indigo2 IMPACT, and skiff_o.stla after conversion
loads at the rate of 190,000 primitives a second. An added benefit is
that .pfb files tend to be around half the size of their pre converted form.
.pfb files are created using pfdStoreFile_pfb() and loaded using
pfdLoadFile_pfb(). These are written to preserve as much as possible
an exact snap shot of your Performer scene graph. It should support
all legal Performer scene graphs.
A new utility called pfconv is also provided. It will convert from
any format for which Performer has a loader to any format for which
Performer has a storer. An example of it's usage would be:
pfconv town.flt town.pfb
You can get a copy of libpfpfb and pfconv from:
ftp://sgigate.sgi.com/pub/Performer/src/pf2.0/libpfpfb.beta1.tar.Z
If you have a bit of time please try it with your data. We are planning
to release it with 2.1 and would like to shake out any last bugs that might
remain.
Here are some things to note.
pfconv does a pfFlatten() and pfdCleanTree() after loading from the old
format and before storing to the new. You should edit pfconv.c if
this behavior is not good for your data.
When saving textures pfdStoreFile_pfb() checks to see if it can find a
file matching the texture name. If it does it will not save an image
for this texture and pfdLoadFile_pfb() will get the image by reading the
image file. If it can't find a matching file it will save the whole
image.
pfdLoadFile_pfb() will share the following objects when multiple files
are loaded:
pfGeoState
pfTexture
pfMaterial
pfLightModel
pfLight
pfTexEnv
pfFog
pfTexGen
pfColortable
pfHighlight
pfFonts are not currently shared. This means that loading multiple
files with the same pfFont will result in a copy of that pfFont for
each file loaded.
pfGetLODTransition() had a bug in it that it would return -1 and
print an error for any Transitions that are not set. This means
that pfconv will likely report lots of these false errors when
converting a file with a pfLOD in it. When pfdStoreFile_pfb gets
this error it sets that transition to be the same as transition 0.
This may or may not be the default transition. This bug is fixed
in Performer 2.1.
pfUserData is only saved if it is allocated with pfMalloc(). This is
because it is only through pfGetSize that the size of the user data
can be known.
Here are a few of the future enhancements planned:
Control of texture saving behavior.
User definable pfUserData save routines.
Control of pfFont saving behavior.
Control of object sharing behavior.
Encryption.
The .pfb format is designed for backwards compatibility with future
versions of Performer. This means you will not have to reconvert
your data when you get a new Performer version. However this version is
still in beta and I am not going to guarantee compatibility of files
created with this beta version and future versions of .pfb.
I will be sending more info and caveats later.
Please report any problems, observations, etc. either directly to me
mace++at++sgi.com or through the Performer mailing list.
Thanks,
Rob Mace
mace++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:34 PDT