Material Alpha values and flt loader

New Message Reply Date view Thread view Subject view Author view

Scott Herod (herod++at++aspen.evt.com)
Wed, 07 Apr 1999 15:33:02 -0600


I'm building simple models with materials that can have
their alpha values dynamically adjusted. If, in addition
to my model, I load an flt model (for example cane.flt)
with the MultiGen loader, zero alpha on my models make
them invisible. My model without the flt model or with
an obj model (at least, I've not checked other formats)
is roughly 75% opaque if I set the material to zero alpha.
I really want to make zero alpha mean transparent. Could
someone suggest what the flt loader is doing to change how
transparent materials are displayed?

Thank you,

Scott Herod
scott++at++evt.com

Some details:

I've seen this on O2, MXE, and RE running 6.5 with Performer
2.2.3.

  mat->setAlpha( material->alpha() );
  mat->setColorMode( PFMTL_BOTH, PFMTL_CMODE_OFF );

  pfGeoState *geostate = new pfGeoState;
  geostate->setMode( PFSTATE_TRANSPARENCY, PFTR_BLEND_ALPHA );
  geostate->setMode( PFSTATE_ENLIGHTING, PF_ON );
  geostate->setMode( PFSTATE_CULLFACE, PFCF_BACK );

  geostate->setAttr( PFSTATE_FRONTMTL, mat );
  geostate->setFuncs( preFunc, postFunc, NULL );

  The predraw function preFunc is there to grab the current
pfState:

int preFunc ( pfGeoState* gstate, void* udata )
{
  pfState* state = pfGetCurState();
  pfPrint( state, PFTRAV_SELF | PFTRAV_DESCEND, PFPRINT_VB_DEBUG, NULL
);
  return 0;
}

ENTEXGEN, ENLPOINTSTATE, and ENCOLORTABLE. I've also tried
turning these off myself with no effect.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Apr 07 1999 - 14:33:09 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.