From: Paolo Farinelli (paolo++at++sgi.com)
Date: 09/02/2003 16:08:25
Hi Frederic,
as far as I understand, this is how things work:
1. you set you texture name in the .flt file. Texture name may have a path
(absolute or relative) or may be path-less (Creator lets you remove paths
from texture names).
2. you set the Performer filepath through pfFilePath. This can include
multiple colon-separated paths.
3. you load the .flt file through pfdLoadFile.
In the .flt loader, texture files are located by simply calling pfFindFile,
which will first look for a file named exactly like the texture name
stored in the .flt file (with or without path).
If texture file is not found using this string alone, pfFindFile will loop
through all paths defined with pfFilePath and prepend each path to the
texture name.
If I undersrtand your email, you would want the flt loader to automatically
prepend the path to the referencing flt model to the paths provided through
pfFilePath.
As far as I can tell, this does not happen.
For example:
say your model is: /usr/demo/models/foo.flt, and that the model references
texture "foo.rgb" (note no path), which is in
/usr/demos/models/foo_textures/
You would want this to work:
pfFilePath("/usr/demo/models:./foo_textures");
root=pfdLoadFile(foo.flt");
Unfortunately this won't work, since the texture foo.rgb will NOT be looked
for inside directory /usr/demo/models/foo_textures.
In the above case, you can do one of two things:
1. Save a relative path to texture file in .flt model
("./foo_textures/foo.rgb").
Then setting pfFilePath("/usr/demo/models") will be enough.
2. Provide a full path to the texture directory by calling:
pfFilePath( "/usr/demo/models:/usr/demo/models/foo_textures");
Lastly, regarding the documentation on the FLT and PFB loaders, take a
look at man pages for:
pfdLoadFile, pfdInitConverter_flt, pfdConverterMode_flt and
pfdInitConverter_pfb, pfdConverterMode_pfb
Hope this helps.
Best Regards,
Paolo
Frederic Rouas wrote:
>Is it possible to define the directories where Performer FLT loader
>finds textures files referenced by a geometry file given in Open Flight
>format ? PFPATH does not seem to work ...
>
>Where can I find documentation about the parameters that can be use to
>tune the loaders (FLT, PFB and others ) that are delivered with Perormer ?
>
>
>Fridiric Rouas
>Directeur Technique OKTAL SE
>Til : 05 62 11 50 10
>Fax : 05 62 11 50 29
>Mail : frederic.rouas++at++oktal.fr
>
>
-- Paolo Farinelli paolo++at++sgi.com Member of Technical Staff, OpenGL Performer 1-650-933-1808 Silicon Graphics 1600 Amphitheatre Pkwy, Mountain View, CA 94043
This archive was generated by hypermail 2b29 : Tue Sep 02 2003 - 16:09:46 PDT