|
|
Hello everyone,
I recently updated my version of Povray (form 3.62 to 3.7) and unfortunately, my
I think that my problem probably comes from the fact that objects are now
blended, taking into consideration the color of the background.
As a result, my pictures containing object with only interior (and no texture)
and transparent background do not have the same aspect than before. They are
completely transparent.
In short, I would like to create a light sword on a transparent background.
Do you know what should I do to solve my problem?
Regards,
JB
Post a reply to this message
|
|
|
|
On 01/28/2014 12:55 PM, JB wrote:
> Hello everyone,
>
> I recently updated my version of Povray (form 3.62 to 3.7) and unfortunately, my
>
> I think that my problem probably comes from the fact that objects are now
> blended, taking into consideration the color of the background.
>
> As a result, my pictures containing object with only interior (and no texture)
> and transparent background do not have the same aspect than before. They are
> completely transparent.
>
> In short, I would like to create a light sword on a transparent background.
>
> Do you know what should I do to solve my problem?
>
> Regards,
>
> JB
>
>
>
>
most likely specific to your problem:
http://wiki.povray.org/content/Reference:Background
other changes (summarized) that you /might/ also be of interest:
http://wiki.povray.org/content/Documentation:Tutorial_Section_1#Changes_and_New_Features_Summary
Post a reply to this message
|
|
|
|
Am 28.01.2014 18:55, schrieb JB:
> Hello everyone,
>
> I recently updated my version of Povray (form 3.62 to 3.7) and unfortunately, my
>
> I think that my problem probably comes from the fact that objects are now
> blended, taking into consideration the color of the background.
>
> As a result, my pictures containing object with only interior (and no texture)
> and transparent background do not have the same aspect than before. They are
> completely transparent.
>
> In short, I would like to create a light sword on a transparent background.
>
> Do you know what should I do to solve my problem?
There are two issues that might come into play here:
(1) What you are seeing might be the difference between two ways of
alpha handling: "straight" (aka "non-premultiplied") vs. "premultiplied"
(aka "associated").
When displaying an image with alpha channel in front of some background
image, the resulting colour of a given pixel may be computed according
to the following formula:
R" = A * R + (1-A) * R_back
G" = A * G + (1-A) * G_back
B" = A * B + (1-A) * B_back
where R,G,B are the colours the object would have if it was fully
opaque. This is the so-called "straight" or "non-premultiplied" alpha.
However, the multiplication with A can already be done when the file is
generated, saving some time when displaying the image:
R" = R' + (1-A) * R_back
G" = G' + (1-A) * G_back
B" = B' + (1-A) * B_back
where R',G',B' are the colours the object would have if it was displayed
in front of a black background. This is the so-called "premultiplied" or
"associated" alpha.
Note that the above formulae are what is used in the /displaying/ software.
Previous versions of POV-Ray did a particularly poor and inconsistent
job with respect to this distinction: Entirely ignoring any file format
specifications, POV-Ray 3.6 invariably expected input files to use
"straight" alpha, but also invariably generated output files using
"premultiplied" alpha.
In POV-Ray 3.7, this has been changed to conform to the PNG file format
specification, which mandates that "straight" alpha is to be used.
There is currently no way to coax POV-Ray 3.7 to violate the PNG file
format specification. However, POV-Ray 3.7 also supports the OpenEXR
file format for output, which is specified to always use "premultiplied"
alpha handling.
(2) What you are seeing might also be the effect of a change in the
background and sky_sphere colour handling. POV-Ray 3.6 was an
inconsistent mess in this respect as well.
However, this should be easy to fix by specifying "#version 3.6;" at the
start of your scene file.
There is also a fundamental problem with the PNG output file format when
it comes to emissive-only objects in an otherwise transparent image,
because of ambiguity as to what the alpha value should actually denote
in this case: Should it specify (a) how "visible" the foreground object
is, or (b) how "invisible" the background is?
"Straight" alpha handling insists that both must be the same. There is
no way to tell PNG spec conformant display software that both the
foreground /and/ background should be 100% visible.
"Premultiplied" alpha file formats are much better suited for such
effects, as the "visibility" of the foreground is already accounted for
in the stored R,G,B values, while the alpha value is unambiguously
dedicated to specifying the "invisibility" of the background.
Post a reply to this message
|
|