Yes, you can do that, but you're thinking about it wrong. What you want to
do is output to the surface transparency the value held in an images Alpha
channel.

In your Surface Properties shader add a Texture object.
Load your texture with Alpha channel.
Set the output of the texture object (In/Out tab) to Surface:Transparency
In the Bindings tab, click the Edit checkbox and set the bindings so the
Transparency's RG and B channels (destination) are set from the source
image's A channel

At this point I'll mention I can't actually do this because RS's window is
busted and has been as long as I've known the software. When I click Edit
Binding the Source panel extends to below the bottom of the window and I see
no destination panel. No amount of opening and closing  windows and panels
and Ctrl left right shift click and dragging will expose the rest of the
interface for me. The way panels auto scale and such I've always found
awkward as they invariably produce a window far longer than my 768 pixel
height display, and often don't terminate at the bottom of the window
anyway.

Anyway, what you are doing is selecting a picture that has Red, Green, Blue
and Alpha components, and saying 'For each pixel, take the images Alpha
value and set that as the transparency value of the Red, Green and Blue
colour components of the surface.' You can just as easily create a black and
white image and set the value of surface transparency to the red component
of the image, using it as a mask.

David Coombes
[EMAIL PROTECTED]

...
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, April 29, 2006 11:56 AM
Subject: VSL: Testing an image for an alpha channel


> Hi, is it possible to test for the prescence of an alpha channel in a
> given image map inside a VSL material?
>
> Something like:
>
> Surface properties
> {
>    do stuff
>
>    if (image has alpha)
>    {
>         Apply alpha channel of image to surface transparency
>    }
> }
>
> I want to use the same structure of the VSL material for all my
> objects to let users simply change the possible parameters that match
> the in-game material properties without having to modify the actual
> VSL code.
>
> Regards,
> Fredrik Bergholtz
>

Reply via email to