Color Mapping in LuxRender

Please use this forum for general user support and related questions.

Moderators: Dade, coordinators

Forum rules
Please include your operating system type/version, LuxRender version and Exporter version used when submitting a support post.

Make sure you have read the Release forum thread for Release and RC (Release Candidates) builds as these threads contain information on known problems and workarounds: Test Builds Forum

Color Mapping in LuxRender

Postby igall » Mon Jan 01, 2018 9:59 am

Hi,

I'm using a Spot Projector in Blender with a Projector Image containing 0 in background, and rectangles of the following gray levels:
50, 100, 150, 200, 255

This is the Projector Image (reduced size):
Image

The scene consists of a plane which is perpendicular to the camera's principal axis.
After I render the scene, I'm getting an image where the background has 0, and the squares are having, approximately, the following average gray levels:
3, 16, 40, 70, 100

Here is the resulting image (reduced size):
Image

The Auto Gain was off.

My question is:
Why do I obtain a non-linear relation between the gray levels in the projector image and the gray levels in the resulting image?
How can I configure the settings of Blender / Luxrender to get a linear relation?

Many thanks in advance,
Igal
igall
 
Posts: 21
Joined: Mon Jan 01, 2018 9:15 am

Re: Color Mapping in LuxRender

Postby Dade » Mon Jan 01, 2018 1:28 pm

The light intensity goes down with the square of the distance (in the case of a spot or point light). It is the expected result, the intensity of light measured on the plane is related to the distance of the plane from the spot light.
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Color Mapping in LuxRender

Postby igall » Tue Jan 02, 2018 2:29 am

Thank you for answering.

I did additional experiment while placing the squares exactly at the same distance from the spot and from the camera.
The spot and the camera are in the same location and co-aligned, and the squares are symmetric exactly around the center of the Projector Image.

The gray levels of the squares in the projector image are:
50, 100, 150 and 200.

This is the center AOI of the projector image:
Image

The center AOI of the resulting image:
Image

The average gray levels of the squares in the resulting image are:
8, 38, 92, 173

So if the squares' distances from the spot and the camera are the same, what could be the other causes for non-linearity between the gray levels in the projector image and the gray levels in the resulting image?
How can I configure Blender / Luxrender to eliminate those causes?

Many thanks in advance,
Igal
igall
 
Posts: 21
Joined: Mon Jan 01, 2018 9:15 am

Re: Color Mapping in LuxRender

Postby Dade » Tue Jan 02, 2018 3:09 am

igall wrote:I did additional experiment while placing the squares exactly at the same distance from the spot and from the camera.


Nope, you have to place the plane at 1.0 distance from the spot light to have something near the original values. And you will have the original values only on the very center of the image because you should use a sphere of 1.0 radius (to have a 1.0 distance from the spot light everywhere).
User avatar
Dade
Developer
 
Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Color Mapping in LuxRender

Postby igall » Wed Jan 03, 2018 7:40 am

Thank you for answering.

I did as you suggested: placed the plane 1m from the spot light, and measured exactly in the center.
This time it was with different spot power.
Here are the values that I received:
Projector image: 0, 50, 100, 150, 200
Resulting image: 0, 11, 54, 129, 243

Is there maybe a gamma for the projector?
I found a projector gamma in http://www.luxrender.net/wiki/LuxCore_SDL, at Type: projection;
How can I access this gamma parameter from Blender python?

Any other reason you could suggest for this non-linearity?

Many thanks,
Igal
igall
 
Posts: 21
Joined: Mon Jan 01, 2018 9:15 am

Re: Color Mapping in LuxRender

Postby B.Y.O.B. » Wed Jan 03, 2018 7:59 am

igall wrote:Is there maybe a gamma for the projector?
I found a projector gamma in http://www.luxrender.net/wiki/LuxCore_SDL, at Type: projection;
How can I access this gamma parameter from Blender python?

This property is not exposed in LuxBlend.
You can add it here: https://bitbucket.org/luxrender/luxblen ... hts.py-322

edit: I exposed the property. https://bitbucket.org/luxrender/luxblen ... at=default
You can update LuxBlend (see my signature) and you should see a "Gamma" property on spot light.

igall wrote:Any other reason you could suggest for this non-linearity?

Are you using linear tonemapper with gain 1?
User avatar
B.Y.O.B.
Developer
 
Posts: 5181
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Color Mapping in LuxRender

Postby igall » Wed Jan 03, 2018 8:48 am

Thanks for the answer.

B.Y.O.B. wrote:Are you using linear tonemapper with gain 1?

Yes. I'm using TONEMAP_LINEAR with gain 1.

How can I take the update that you did in the python files?
I'm using a compiled version of LuxRender for Windows.

Many thanks,
Igal
igall
 
Posts: 21
Joined: Mon Jan 01, 2018 9:15 am

Re: Color Mapping in LuxRender

Postby jensverwiebe » Wed Jan 03, 2018 9:01 am

igall wrote:Thanks for the answer.

B.Y.O.B. wrote:Are you using linear tonemapper with gain 1?

Yes. I'm using TONEMAP_LINEAR with gain 1.

How can I take the update that you did in the python files?
I'm using a compiled version of LuxRender for Windows.

Many thanks,
Igal


In blender open addon prefs and search for luxrender, then use the update function there.
Reboot blender after this action and you will see "gamma" for spotlights.
Wiki here (bottom image ): http://www.luxrender.net/wiki/LuxBlend_ ... structions


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

Re: Color Mapping in LuxRender

Postby igall » Thu Jan 04, 2018 2:55 am

Thanks for replying.

jensverwiebe wrote:In blender open addon prefs and search for luxrender, then use the update function there.
Reboot blender after this action and you will see "gamma" for spotlights.
Wiki here (bottom image ): http://www.luxrender.net/wiki/LuxBlend_ ... structions
Jens


Should I update LuxBlend only or should I update both LuxBlend and LexRender?
I think that my update function of LuxRender failed. I tried to download manually from couple of links but they seem broken.
Is there a place from which I can download and update manually?

The LuxBlend update seems worked, but when trying to run render I got the following error message:
Image

What should I do?

Many thanks,
Igal
igall
 
Posts: 21
Joined: Mon Jan 01, 2018 9:15 am

Re: Color Mapping in LuxRender

Postby igall » Thu Jan 04, 2018 3:49 am

After some more efforts it seems working.

What I did:
1. Change rendering engine to Path instead of Biased Path
2. Changed the projector gamma to 1

Now the results are linear.

Many thanks for the help of everybody!
igall
 
Posts: 21
Joined: Mon Jan 01, 2018 9:15 am

Next

Return to LuxRender User Support

Who is online

Users browsing this forum: No registered users and 1 guest