|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Any comments on why the following doesn't work
http://local.wasp.uwa.edu.au/~pbourke/tmp/sim/testmodel.zip
It is supposed to be a rectangular cone with a light near the apex and a image
across the front of the cone. I was hoping to get a projected image onto a
second plane by using photons. It seems to work with a plane colour plane but
not with an image (with a 50% alpha value). Is alpha ignored with photons?
Post a reply to this message
|
|
| |
| |
|
|
From: Christian Froeschlin
Subject: Re: Photons and simulating a data projector
Date: 8 Jul 2008 06:25:01
Message: <4873407d$1@news.povray.org>
|
|
|
| |
| |
|
|
Paul Bourke wrote:
> Any comments on why the following doesn't work
> http://local.wasp.uwa.edu.au/~pbourke/tmp/sim/testmodel.zip
According to the docs, the alpha channel is used for *non-filtered*
transparency (i.e. transmit instead of filter), so it wouldn't affect
the light going through it, only how you see objects through it
(except for alpha 255, which casts a shadow).
Furthermore, when I open projectorimage1.tga in Gimp I don't see any
transparency (checkered background shining through). After adding some
test transparency, it seemed indeed that the non-transparent areas cast
a shadow and semi-transparent area let all photons through unfiltered.
Do you actually need alpha to vary across the image? Otherwise, just
use a solid pigment and apply "filter all 1.0" to the image_map.
Post a reply to this message
|
|
| |
| |
|
|
From: Christian Froeschlin
Subject: Re: Photons and simulating a data projector
Date: 8 Jul 2008 07:12:42
Message: <48734baa@news.povray.org>
|
|
|
| |
| |
|
|
Christian Froeschlin wrote:
> Paul Bourke wrote:
>
>> Any comments on why the following doesn't work
>> http://local.wasp.uwa.edu.au/~pbourke/tmp/sim/testmodel.zip
>
> According to the docs, the alpha channel is used for *non-filtered*
> transparency (i.e. transmit instead of filter)
I just looked into the sources and the corresponding code
lines are in image.cpp (ColourMapImage::GetRGBFTValue)
transm = 1.0f - e.filter;
filter = 0.0f;
So, if you really need it, it would probably be reasonably easy to
build your own executable which uses filter instead of transmit.
On the other hand, these lines are marked with:
// TODO - should alpha be converted to filter and transm? [trf]
// currently we just return (1.0-alpha) as transmit, this isn't
// a good solution. [cjc]
I think a clean solution would be to allow to specify
something like "filter alpha" in an "image_map" to indicate
that the alpha channel shall be used for filtering.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I just looked into the sources and the corresponding code
> lines are in image.cpp (ColourMapImage::GetRGBFTValue)
> transm = 1.0f - e.filter;
> filter = 0.0f;
I'm OK doing that but looking at image.cpp I didn't find that. I suspect you are
using a source tree more recent that 3.6.1 .... unfortunately I have other mods
I need (mostly other camera models I use). Do you know where the equivalent is
in the 3.6.1 source?
Post a reply to this message
|
|
| |
| |
|
|
From: Christian Froeschlin
Subject: Re: Photons and simulating a data projector
Date: 12 Jul 2008 08:58:39
Message: <4878aa7f$1@news.povray.org>
|
|
|
| |
| |
|
|
Paul Bourke wrote:
> Do you know where the equivalent is in the 3.6.1 source?
Actually, I just downloaded the sources for 3.7b out of curiousity
when they were announced, so I'm no expert and didn't know the 3.6
sources at all. But I just downloaded them now and my guess is
that you need to modify some assignment in "no_interpolation"
(image.cpp) depending on the image type, e.g, replacing
colour[pFILTER] += (DBL)map_colour->Filter * DIV_1_BY_255;
colour[pTRANSM] += (DBL)map_colour->Transmit * DIV_1_BY_255;
with
colour[pTRANSM] += (DBL)map_colour->Filter * DIV_1_BY_255;
colour[pFILTER] += (DBL)map_colour->Transmit * DIV_1_BY_255;
if the image has a Colour_Map.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |