jeanphi wrote:The premultiplication must be handled before the splatting on the film to be most usefull so the option should stay for the splatting but shouldn't be used afterwards.
Note regarding the premultiplied alpha option:
OpenEXR requires that the colors are premultiplied, while PNG requires that the colors are NOT premultipled (straight). TGA output is "raw" and outputs either straight or premultiplied depending on the premultiplied alpha flag.
LuxRender tries to adhere to this, however due to technical reasons one might experience that PNG output is suboptimal when using premultiplied alpha. Similarly one might experience that OpenEXR ouput is suboptimal when NOT using premultiplied alpha.
As such it is recommended that one uses the OpenEXR or TGA output when the premultiplied alpha option is enabled, and PNG otherwise. When using premultiplied alpha it's required to use alpha channels for OpenEXR and TGA.
jeanphi wrote:Is that a requirement from the file format standard or just the way it works in LuxRender?
jeanphi wrote:Is it absolutely necessary to keep this behaviour? I think it'd be much easier and less surprising to have the same output for all formats (I guess most users won't understand why they see the background during the render and not in their EXR file). For PNG writing you can't unmultiply alpha, that's absolutely impossible because in the same pixel you might have stored values with alpha=1 and values with alpha=0 (glass transmission and glass reflection), so trying to adhere to such a spec is impossible. Better do what the user asks for and let the standard aside in this particular case.
I think we should get back to the previous and simpler version but making sure we have consistent behaviour between all file formats.
jeanphi wrote:I think there's a typo in your last commit:
film/fleximage.cpp:950: I find the ! before premultiplyalpha bogus
Users browsing this forum: No registered users and 3 guests