Camera response functions as a tonemapping option

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

Re: Camera response functions as a tonemapping option

Postby Lord Crc » Wed Nov 10, 2010 9:41 pm

I've committed a small change which technically is not the correct way to handle things but still I think it has some merit.

Since a lot of the sensors seem to have some form of gamma correction built into them we can't apply the regular 2.2 correction ourself. Technically the correct thing is to simply don't do any gamma correction if CRF's are used. However this means the user can't tweak the response curve.

Thus my fix is to assume the CRF does gamma correction and remove it when loading the file. When we then apply the gamma correction ourself (with the same 2.2 gamma) we get the same result as if we did not do manual correction. However it allows the user to do the correction with a different gamma, allowing for some tweaking.

Also it fits better with luxconsole/pylux. If you specified the CRF file in the scene file/data you'd need to also supply a gamma of ~1.0. Now this is not needed, and any slight adjustments seem natural, at least on the CRF's I've used. We could introduce a flag which controls this behavior as well.

I committed this just so we could try it out and have some discussion around it, feel free to revert it :)
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4460
Joined: Sat Nov 17, 2007 2:10 pm

Re: Camera response functions as a tonemapping option

Postby Lord Crc » Wed Nov 10, 2010 10:03 pm

An alternative to the above change would be to have a separate gamma value which is used when CRF is enabled, which by default is 1.0. The UI would then expose the active gamma parameter.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4460
Joined: Sat Nov 17, 2007 2:10 pm

Re: Camera response functions as a tonemapping option

Postby jeanphi » Thu Nov 11, 2010 7:48 am

Hi,

I guess your gamma tweak will be easier to support than having 2 gamma values. It makes for a more straightforward workflow.

Jeanphi
jeanphi
Developer
 
Posts: 6580
Joined: Mon Jan 14, 2008 7:21 am

Re: Camera response functions as a tonemapping option

Postby jensverwiebe » Thu Nov 11, 2010 11:23 am

I removed my former code, so Lord´s way is now official ;)

Jens
User avatar
jensverwiebe
Developer
 
Posts: 2128
Joined: Wed Apr 02, 2008 4:34 pm

Re: Camera response functions as a tonemapping option

Postby Lord Crc » Sun Nov 14, 2010 8:49 am

I've extracted all CRF's from the "dorf" source that has all three channels available, 47 total, and ensured the channels come in the right order. I've also added a README.txt with attribution.

A zip file with these CRF's can be found here: http://www.luxrender.net/release/crf/CRFs.zip
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4460
Joined: Sat Nov 17, 2007 2:10 pm

Re: Camera response functions as a tonemapping option

Postby SATtva » Sun Nov 14, 2010 8:58 am

Thanks a lot, Lord Crc.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5500
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Camera response functions as a tonemapping option

Postby Abel » Sun Nov 14, 2010 10:31 am

Lord Crc wrote:A zip file with these CRF's can be found here: http://www.luxrender.net/release/crf/CRFs.zip

Very nice! Now in my unsatisfiable longing for new features: would it be feasible to load the whole folder and show all the options in a drop-down menu? That way, one could compare the effect much more easily.
User avatar
Abel
Developer
 
Posts: 1416
Joined: Sat Oct 20, 2007 8:13 am
Location: Helsinki, Finland

Re: Camera response functions as a tonemapping option

Postby Lord Crc » Sun Nov 14, 2010 11:30 am

Abel wrote:Very nice! Now in my unsatisfiable longing for new features: would it be feasible to load the whole folder and show all the options in a drop-down menu? That way, one could compare the effect much more easily.


Good idea. I think what I'd prefer would be a "CRF data dir" which is persisted between sessions, gui would then load all .crf files in it when starting into a combobox. One could then add manually others (which would not be persisted to keep things simple) using the "Load" button.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4460
Joined: Sat Nov 17, 2007 2:10 pm

Re: Camera response functions as a tonemapping option

Postby patro » Sun Nov 14, 2010 12:49 pm

@Daniel90 I was the starter of the "feature request" topic
viewtopic.php?f=13&t=4373
please give a look if you find something interesting to work on ;)

thank you to all for this nice and missing addition.

PS: I posted some info about the recent additions to LuxRender
viewtopic.php?f=13&t=4373&p=50860#p50860
User avatar
patro
 
Posts: 1798
Joined: Fri Feb 29, 2008 9:06 pm
Location: mount Etna

Re: Camera response functions as a tonemapping option

Postby Daniel90 » Wed Nov 17, 2010 9:30 am

Lord Crc wrote:I've extracted all CRF's from the "dorf" source that has all three channels available, 47 total, and ensured the channels come in the right order. I've also added a README.txt with attribution.

A zip file with these CRF's can be found here: http://www.luxrender.net/release/crf/CRFs.zip


Cool! Did you script something or did you extract everything manually?

I'd love to work more on Lux, but a few weeks ago my studies began and now time is a rare thing ;)
Daniel90
 
Posts: 62
Joined: Sun Aug 23, 2009 8:42 am
Location: Germany

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest