Re: Trasparency Again

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (angus++at++division.demon.co.uk)
Fri, 10 Mar 1995 16:15:54 +0000


> Hi again,
>
> I'm sorry about this but it's not true that
> I found out the solution to my transparency problem...
> I'm a little confused at the moment (friday?)...
> So I have the same problem that I wrote in my previous message:
> Anyone of you knows if is it possible to render a Multigen object
> that has been built as an opaque object as a transparent object?

At first it seems that you might be able to set the transparency state on and
then override that state using pre and post draw callbacks. Unfortunately this
doesn't work because the model has no alpha information. One approach would be
to model the object with transparency and override it to PFTR_OFF when you
don't need it. This has the advantage that you don't have to worry about the
models position in the scene graph because without callbacks it will be sorted.
Unfortunately this doesn't allow you to vary the alpha value. Another method is
to apply a transparent material in pre draw then override the material on. You
must also apply and override pfTransparency(PFTR_ON) and start worrying about
the objects position in the scene graph unless you use screendoor transparency.

If you use the second method you can vary the degree of transparency of an
object by calling pfMtlAlpha(). In order for alpha transparency to work on a
particular material material you must call:
pfMtlColorMode(mat, PFMTL_BOTH, PFMTL_CMODE_COLOR);

Good Luck.

-- 
 Angus Dorbie                Division Ltd,
 Software Engineer           19 Apex Court,
 Tel: (01454)615554          Woodlands,
 Fax: (01454)615532          Bristol BS12 4JT,
 angus++at++division.demon.co.uk  UK

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:03 PDT

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