realbasic-games
[Top] [All Lists]

Re: Change translucency on the fly?

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Change translucency on the fly?
From: Michael Diehr <md03 at xochi dot com>
Date: Sun, 26 Sep 2004 15:57:45 -0700
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <p0611041dbd7cb697e2eb at [10 dot 0 dot 1 dot 5]> <87D83368-0FF4-11D9-9105-0003933EA538 at chaoticbox dot com> <p0611041ebd7cde93be12 at [10 dot 0 dot 1 dot 5]> <807BB9E8-100D-11D9-95ED-0003933EA538 at chaoticbox dot com>
I was thinking about other ways to fake this using RB3D. What if I were to have two object3D pictures, made with AddShapePictureWithMask, and I made them both 50% translucent. Then, I would put one of them near the camera, and one far away (but scaled so that it had the same apparent size). Then, use two Light3D objects, one pointed at each picture. Perhaps, if everything were adjusted just so, could I simulate the cross-fade by ramping one light up and the other down? It seems like if Light 1 were using mode 2 attenuation, then it would not "reach" picture 2 if the distances were correct. Note that Pic 2 is scaled larger so that it appears to be the same size as Pic 1 from the camera's point of view...

Problem with this is that the picture in front will always draw over the one behind it, even if it's not lit, so you'll be darkening the second image at that point. You'll also never achieve 100% of either picture, which probably isn't what you're looking for...

Frank.

Yup. I've done some quick & dirty tests, and what you say is true -- it looks like it may be hard to do a true cross-fade (if I bump up the brightness on the far light/picture, I get contrast changes instead of just brightness changes).

On the other hand, I'm more interested in it looking "good" than being a totally accurate mathematical cross-fade, so maybe some compromises are ok.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>