From: Mark Gill (Mark.Gill++at++usm.edu)
Date: 03/21/2001 06:29:01
Ive,
Finally, a question that I know something about.
First of all, get away from using .3ds files in performer. The 3ds loader
is a little unreliable, and doesn't take into account changes in the .3ds
format since the loader was written. (It's been the same since 1995, I
think).
What are you using generate your 3ds file? If you're using Max then there
is a much better way of getting your textures on your models.
1) Make sure all your textures are SGI .rgb format textures. Max (At least
version 3.1 and higher) support it. Locate your textures on your models
within Max.
2) Export your model as a VRML 1.0 file. This will contain all the model
data as well as textures and materials.
3) Convert the VRML 1.0 file into an Inventor 2.0 file by changing the
header, and the file extension. For basic models and materials the VRML 1.0
format is essentialy the same format as open Inventor 2.0. I just change
the first line which reads
#VRML V1.0 ascii
to
#Inventor V2.0 ascii
and performer will be able to load the file with a
pfNode = pfdLoadFile ("filename.iv")
It will load into your scene graph with no further texture work required.
The only shortfall for this approach is transparency. Inventor doens't
support transparency controled by the alpha channel of a 32 bit rgba file,
so there's no way for it to supply those command to Performer. If you want
an opacity mapped effect, you'll need to create that geometry
programatically, or write another loader.
Hope this helps,
Mark Gill Visualization Researcher
CHL Stennis Space Center
Mark.Gill++at++usm.edu
----------------------------------------------
This archive was generated by hypermail 2b29 : Wed Mar 21 2001 - 06:28:50 PST