Marcus Barnes (marcus++at++multigen.com)
Wed, 24 Jan 1996 12:43:46 -0800
What you are seeing is the modulation of the color in the model with the
default material created by the OpenFlight loader. Everything in the model
that doesn't have a material is given the default material, just as polygon
normals are computed by default. The default material attributes are the same
as in MultiGen:
ambient { 0.3f, 0.3f, 0.3f }
diffuse { 0.7f, 0.7f, 0.7f }
specular { 0.2f, 0.2f, 0.2f }
emission { 0.0f, 0.0f, 0.0f }
shininess { 0.0f }
alpha { 1.0f }
This is an artifact of the way pfMtlColorMode( PFMTL_CMODE_AD ) works which the
loader uses by default. You can change this to PFMTL_CMODE_COLOR whereby the
loader doesn't need to modulate the colors (rather the materials) by calling:
LoadFltMode( PFFLT_AMBIENT_IS_DIFFUSE, FALSE );
before loading the file. This can also be done from perfly 1.2 command line
with the -o option:
% perfly -o5 file.flt
> For example a test database with a single polygon whose colour is
> (R=0, G=255, B=0) ends up as a GeoSet with an overall colour set to
> (R=0, G=178, B=0) (as reported by perfly -w). Does anyone know if this
> apparent factoring of 0.7 is consistent.
Not exactly. Polygons that have a material will be modulated with that
materials diffuse component ... which may not be { 0.7. 0.7, 0.7 }. If for
example you define a material with diffuse { 1.0, 1.0, 1.0 } and still use
PFMTL_CMODE_AD then the modulation will be a no-op.
The man pages to study are lmcolor(3) and pfMaterial(3) and even lmdef(3) for
both IRIS GL and Performer based details.
[munch]
>-- End of excerpt from Mark Baranowski
Regards.
--
__ ___ ____ _ ______ Marcus Barnes, Member Tech. Staff
/ |/ /_ __/ / /_( ) ____/__ ____ MultiGen Inc, 550 S. Winchester
/ /|_/ / / / / / __/ / / __/ _ \/ __ \ Blvd. STE 500, San Jose CA 95128
/ / / / /_/ / / / / / /_/ / __/ / / / PH:1-408-556-2654 FX:1-408-261-4102
/_/ /_/\__,_/_/\_\/_/\____/\___/_/ /_/ EMAIL: marcus++at++multigen.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:18 PDT