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 jeanphi » Mon Aug 09, 2010 11:09 am

Hi,

Especially if there are hundreds of data sets, I think we should rely on files :)
I don't think it's worth restricting the function to the linear tonemapper (it's even going to be almost impossible).
Regarding PBRT, I don't know your math knowledge, but it's a very valuable book which takes one step at a time trying to explain thinks in a pragmatic way so I find it a much better introduction than a paper like Veach's thesis which is another great reference but much more abstract.

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

Re: Camera response functions as a tonemapping option

Postby tomb » Mon Aug 09, 2010 11:22 am

jeanphi wrote:Hi,

Especially if there are hundreds of data sets, I think we should rely on files :)
I don't think it's worth restricting the function to the linear tonemapper (it's even going to be almost impossible).
Regarding PBRT, I don't know your math knowledge, but it's a very valuable book which takes one step at a time trying to explain thinks in a pragmatic way so I find it a much better introduction than a paper like Veach's thesis which is another great reference but much more abstract.

Jeanphi


Indeed. And be sure you get the 2nd edition, not the 1st! :)
User avatar
tomb
Developer
 
Posts: 1918
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: Camera response functions as a tonemapping option

Postby Daniel90 » Wed Aug 11, 2010 9:00 am

Here I have some crf files (the ones that were used for the examples with the macbeth chart a few posts back):

PS: I'll get the pbrt book. second edition :) but not until in a month :(
Last edited by Lord Crc on Sun Nov 14, 2010 8:30 am, edited 1 time in total.
Reason: removed CRF files, see later post by me for proper link
Daniel90
 
Posts: 62
Joined: Sun Aug 23, 2009 8:42 am
Location: Germany

Re: Camera response functions as a tonemapping option

Postby jeanphi » Fri Nov 05, 2010 1:01 pm

Hi,

I've reworked a bit this code and integrated it.
You can't yet change the function at run time but the basic functionality is there.

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

Re: Camera response functions as a tonemapping option

Postby patrickwalz » Fri Nov 05, 2010 1:54 pm

nice to see this function worked its way into the code base -- do we need any help cleaning up the database of response functions? i was looking at it and noticed some of the data is grouped rather strangely and i believe daniel saying something about some of the response functions dont have all the data?
patrickwalz
 
Posts: 75
Joined: Sun Mar 07, 2010 12:54 pm

Re: Camera response functions as a tonemapping option

Postby dougal2 » Fri Nov 05, 2010 2:53 pm

I pushed a fix to prevent crash if the CRF file is invalid; I also re-arranged things a minimal amount to allow it to be changed at run time via the queryable interface ('film', 'CameraResponse').
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: Camera response functions as a tonemapping option

Postby SATtva » Tue Nov 09, 2010 6:00 am

Am I the only one receiving this on Linux?

Code: Select all
[ 30%] Building CXX object CMakeFiles/lux.dir/film/fleximage.o
/root/luxbuild/lux-v08dev-101109-820c67a00ef2/film/fleximage.cpp: In member function 'void lux::FlexImageFilm::WriteImage2(lux::ImageType, std::vector<lux::XYZColor, std::allocator<lux::XYZColor> >&, std::vector<float, std::allocator<float> >&, std::string)':
/root/luxbuild/lux-v08dev-101109-820c67a00ef2/film/fleximage.cpp:872: error: 'class lux::CameraResponse' has no member named 'fileName'
[ 31%] Building CXX object CMakeFiles/lux.dir/filters/gaussian.o
make[2]: *** [CMakeFiles/lux.dir/film/fleximage.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/lux.dir/all] Error 2
make: *** [all] Error 2
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Camera response functions as a tonemapping option

Postby jensverwiebe » Tue Nov 09, 2010 6:11 am

Nope, Lords last commit is culprit --> investigating whats wrong atm...

EDIT:
Dunno what Lord wanted explicitly, but here´s a dirty compilefix:
Code: Select all
diff -r 820c67a00ef2 core/cameraresponse.h
--- a/core/cameraresponse.h   Tue Nov 09 06:55:56 2010 +0100
+++ b/core/cameraresponse.h   Tue Nov 09 12:46:36 2010 +0100
@@ -31,7 +31,7 @@
public:
   CameraResponse(const string &film);
   void Map(RGBColor &rgb) const;
-
+   string crfFile;
   bool validFile;
private:
   float ApplyCrf(float point, const vector<float> &from, const vector<float> &to) const;
diff -r 820c67a00ef2 film/fleximage.cpp
--- a/film/fleximage.cpp   Tue Nov 09 06:55:56 2010 +0100
+++ b/film/fleximage.cpp   Tue Nov 09 12:46:36 2010 +0100
@@ -869,7 +869,7 @@
         if (response == "")
            cameraResponse.reset();

-         if ((!cameraResponse && response != "") || (cameraResponse && cameraResponse->fileName != response))
+         if ((!cameraResponse && response != "") || (cameraResponse && cameraResponse->crfFile != response))
            cameraResponse.reset(new CameraResponse(response));

         crf = cameraResponse;



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

Re: Camera response functions as a tonemapping option

Postby SATtva » Tue Nov 09, 2010 6:59 am

Thanks Jens, that fixed the compilation.
Linux builds packager
聞くのは一時の恥、聞かぬのは一生の恥
User avatar
SATtva
Developer
 
Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

Re: Camera response functions as a tonemapping option

Postby Lord Crc » Tue Nov 09, 2010 5:04 pm

Arrrgh, sorry again guys, need to clean up my repo, way too many local changes to keep track of :(

edit: pushed the missing files.

edit2: made my very own clone repo for all local mods, keeping the main one clean, this won't happen again...
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4450
Joined: Sat Nov 17, 2007 2:10 pm

PreviousNext

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 1 guest