Hi folks,
An experimental version supporting tonemapping can now be found at:
https://github.com/POV-Ray/povray/releases/tag/v3.7.1-alpha.8558038%2Bav124
So far only a 32-bit Windows binary is available, but the usual other
binaries will be added as their build completes.
To use tonemapping, the user needs to supply one or more functions
computing the effective output data from the raw data: One or three
functions to manipulate the colour data, and optionally a second or
fourth function to manipulate the transparency. By default, each
function takes the corresponding channel's raw data as a single
parameter, but the user can specify a different set of data to be passed
to all functions.
The syntax is
global_settings {
tonemapping {
parameters { CHANNEL ... }
FUNCTION ...
}
}
where each `CHANNEL` may be any of:
- `channel` (for the channel's raw data)
- `red`, `green`, `blue`, `filter` (for the named channel's raw data)
- `gray`, `grey` (for the raw grayscale value)
- 'x', 'y' (for the screen coordinate ranging from left/top = 0 to
right/bottom = 1).
Each `FUNCTION` may take either the following forms:
function { EXPRESSION }
function(IDENTIFIERS) { EXPRESSION }`
with the latter form allowing to specify the identifiers by which the
chosen data channels will be referred to in EXPRESSION (defaulting to
`x`, `y` and `z`)."
The following example adds the red channel to all colour channels
(including itself):
global_settings {
tonemapping {
parameters { channel,red }
function(c,r) { c+r }
}
}
The following example swaps the red, green, blue and alpha channels
around (note that the tonemapping operates on the transmit channel,
which is equivalent to 1-alpha):
global_settings {
tonemapping {
parameters { red,green,blue,transmit }
function(r,g,b,tr) { g }
function(r,g,b,tr) { b }
function(r,g,b,tr) { 1-tr }
function(r,g,b,tr) { 1-r }
}
}
The feature can even be used to do something useful, such as simulating
film exposure:
#declare Exposure = 1.6;
#declare ExposureGain = 1.0;
global_settings {
tonemapping {
function { ExposureGain * (1 - exp(-Exposure * x)) }
}
}
So here's the deal: Get the thing, test the shit out of it and enjoy! :)

El 10/04/16 a las 17:02, clipka escribiÃ³:
>> So here's the deal: Get the thing, test the shit out of it and>> enjoy! :)>> Hmm... no takers yet? Or is that just the spring weekend dragging> people outside?>
Just tried it for noise:
tonemapping {
parameters { red,green,blue }
function(r,g,b) { r*f_granite(g*image_width,b*image_height,0) }
function(r,g,b) { g*f_granite(r*image_width,b*image_height,0) }
function(r,g,b) { b*f_granite(r*image_width,g*image_height,0) }
}
I don't know if I've used it correctly there, but looks nice without
aa. With aa it loses most of the noise (and a later conversion to jpg
makes it almost unnoticeable). I guess that's one of the things that
will do better with the future post-aliasing "postprocesing" feature.
--
jaime

El 09/04/16 a las 04:33, clipka escribiÃ³:
> So here's the deal: Get the thing, test the shit out of it and enjoy!> :)>
Ok, first suggestion: how about a way to accumulate several effects,
perhaps using multiple tonemapping{} statements?
--
jaime

Am 11.04.2016 um 20:06 schrieb Jaime Vives Piqueres:
> Ok, first suggestion: how about a way to accumulate several effects,> perhaps using multiple tonemapping{} statements?
Jotted down on the to-do list for future versions.
The present implementation is driven by the following goals:
(1) Achieve "gamma complete" status in 3.7.1 proper; to this end, it
seems necessary to provide _some_ mechanism by which users can effect
"artistic gamma" without having to misuse any of the existing technical
gamma handling mechanisms.
(2) At all costs avoid implementing a dedicated "artistic gamma" feature
that would become obsolete just one version later.
(3) Keep the first implementation simple to avoid excessively stalling
the release of 3.7.1 proper (*).
(* Sorry, no -- it's still too soon to hold your breath. Most notably
there's still plenty of work to do on the inbuilt help of the Windows
version.)

A simple question from a simple mind: what #version statement needs to
be used? It's gagging on the "tonemapping" statement.
On 4/10/2016 9:02 AM, clipka wrote:
> Am 09.04.2016 um 04:33 schrieb clipka:>> An experimental version supporting tonemapping can now be found at:>>>> https://github.com/POV-Ray/povray/releases/tag/v3.7.1-alpha.8558038%2Bav124> ...>> So here's the deal: Get the thing, test the shit out of it and enjoy! :)>> Hmm... no takers yet? Or is that just the spring weekend dragging people> outside?>

Am 12.04.2016 um 06:44 schrieb Tim Riley:
> A simple question from a simple mind: what #version statement needs to> be used? It's gagging on the "tonemapping" statement.
As far as the tonemapping statement is concerned, the experimental
version doesn't care what "#version" statement you use.
If you post the scene that gives you the error message, I should be able
to tell you whether it is a problem with the scene or a problem with the
version of POV-Ray you're using.