POV-Ray : Newsgroups : povray.newusers : Controlling transmittance in texture maps with alpha channels Server Time
1 Nov 2024 11:14:19 EDT (-0400)
  Controlling transmittance in texture maps with alpha channels (Message 1 to 3 of 3)  
From: spl
Subject: Controlling transmittance in texture maps with alpha channels
Date: 21 Sep 2005 12:55:00
Message: <web.43318fec943efc7b279c3b00@news.povray.org>
Is there a way to modulate the transmittance of an object that also has an
image_map containing alpha values?

I have tried using the

transmit all <some_transmittance_value>

image map modifier but I get very bizarre results when the transmittance
value is greater than about 0.5 -- almost as if colors are wrapping around
to complementary colors (that is what should be red shows cyan).

To explain a little about what I'm attemping to do, I am using image_mapped
planes to essentially do volume rendering.  I would like to be able to fade
in the volume object by manipulating its overall transmittance.

Can I make this work or is this just a stupid idea?


Post a reply to this message

From: Mike Williams
Subject: Re: Controlling transmittance in texture maps with alpha channels
Date: 21 Sep 2005 15:18:26
Message: <G8eiwCA2HbMDFwFa@econym.demon.co.uk>
Wasn't it spl who wrote:
>Is there a way to modulate the transmittance of an object that also has an
>image_map containing alpha values?
>
>I have tried using the
>
>transmit all <some_transmittance_value>
>
>image map modifier but I get very bizarre results when the transmittance
>value is greater than about 0.5 -- almost as if colors are wrapping around
>to complementary colors (that is what should be red shows cyan).
>
>To explain a little about what I'm attemping to do, I am using image_mapped
>planes to essentially do volume rendering.  I would like to be able to fade
>in the volume object by manipulating its overall transmittance.
>
>Can I make this work or is this just a stupid idea?

One thing you could try is to use a texture_map to take the weighted
average of your existing texture and a completely transmitting texture.
As you change the weights used in the average, the transmittance of the
overall object should vary.

#declare T1 = texture{pigment {image_map ...
#declare T2 = texture{pigment {rgbt <0,0,0,1>}}

plane { z, whatever
  texture {
    average texture_map {
      [clock T1]
      [1-clock T2]
    }
  }
}


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: spl
Subject: Re: Controlling transmittance in texture maps with alpha channels
Date: 21 Sep 2005 20:25:01
Message: <web.4331f9d0f2f06250b279c3b00@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> One thing you could try is to use a texture_map to take the weighted
> average of your existing texture and a completely transmitting texture.
> As you change the weights used in the average, the transmittance of the
> overall object should vary.

Thanks Mike.

Your suggestion works.

Unfortunately, it's painfully slow and it takes close to 20 seconds per
scanline for a relatively small image -- 640 x 400.  At the resolution at
which I need to render, I have the feeling that it would be prohibitive for
animation of any length.  This is on a reasonably fast Linux box.

Anyhow, I learned a new trick, so that's a good thing.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.