Isotropix Forums

HDR textures on EnvLight and Arealight don't act the same

General Discussion about Isotropix and CG related topics

HDR textures on EnvLight and Arealight don't act the same

Unread postby bjoern » Wed Apr 04, 2018 7:12 pm

I don't know if I found a major bug or if this is intended as is. But I find it extremely counter productive for lighting.
If I have an HDR assigned to a Environment light depending on how strong the light source is (stops) the IBL emits more light. which makes sense.
I would expect the same from an Arealight.
What is conman procedure in VFX is to paint out the light-source in the IBL so that the Ambient light remains. Then you take the painted out light-sources (cropped images from the IBL) and map this HDR textures on the arealight and place the Arealight in the Right location in regards to its position on set.

The problem is that the intensity (stops) of the light texture seem to have no effect on the Arealight. It is just coloring. Is this a bug or intended?
In Arnold for example a Arealight behaves the same way as an EnvLight. Aka, Intensity in the HDR texture drives Light emission and the exposure slider acts as a multiplier.
bjoern
 
Posts: 237
Joined: Thu May 11, 2017 12:43 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby esmith » Thu Apr 05, 2018 8:48 am

Hello, I'm going to take a look at this. It's a very established workflow....
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby bjoern » Thu Apr 05, 2018 8:52 am

thx! :)
I also just noticed that a multiply-node piped on the color input (area light) has no effect effect on light intensity. So its not just a textureMap issue I guess
bjoern
 
Posts: 237
Joined: Thu May 11, 2017 12:43 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby esmith » Thu Apr 05, 2018 12:13 pm

Ok, so this is a known issue and has been fixed, and will be in a maintenance release.

As far as workflow, my recommendation is to normalize both your HDR images to your liking and then adjust exposure values on the lights itself. Rather than going back into 2d to adjust exposure, at least until we can get the fix in an upcoming release.
User avatar
esmith
 
Posts: 162
Joined: Mon May 22, 2017 4:11 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby bjoern » Thu Apr 05, 2018 12:16 pm

That is a good workaround! Will do that for now. Thank you
bjoern
 
Posts: 237
Joined: Thu May 11, 2017 12:43 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby bjoern » Fri Apr 06, 2018 9:08 pm

mhhh,what would be helpful at this point is an exposure node to reduce the textures intensity. This way one could add the
reverse on the light.This would give you a precise setup. Is there a solution maybe via OSL? Could not find anything.
bjoern
 
Posts: 237
Joined: Thu May 11, 2017 12:43 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby dboude » Tue Apr 10, 2018 9:04 am

Hi,

You can use this OSL script posted by FilipO to control the exposure of textures.

Code: Select all
shader ClarisseOSLTextureGrade
(

    color input = color(1,1,1),
    color lift = color(0,0,0),
    color gain = color(1,1,1),
    color multiply = color(1,1,1),
    color exposure = color(1,1,1),
    color offset = color(0,0,0),
    color gamma = color(1,1,1),
    color hsv = color(1,1,1),
   
    output color result = 0

)

{
   
    float R = input[0];
    float G = input[1];
    float B = input[2];
   
    //Lift
    R = R + lift[0];
    G = G + lift[1];
    B = B + lift[2];
   
    //Gain
    R = R * gain[0];
    G = G * gain[1];
    B = B * gain[2];
   
    //Multiply
    R = R * multiply[0];
    G = G * multiply[1];
    B = B * multiply[2]; 
   
    //Offset
    R = R + offset[0];
    G = G + offset[1];
    B = B + offset[2];
   
    //Gamma
    R = pow(R, 1/gamma[0]);
    G = pow(G, 1/gamma[1]);
    B = pow(B, 1/gamma[2]);
   
    color test = color(R,G,B);

    //HSV
    color myhsv = transformc ("rgb", "hsv", color(R,G,B));
    myhsv = color(myhsv[0]*hsv[0], myhsv[1]*hsv[1], myhsv[2]*hsv[2]);
    color myrgb = transformc ("hsv", "rgb", color(myhsv));
   
    //Color Out
    color Cout = myrgb;// color(R,G,B);;

    //Result
    result = Cout;
}


Cheers ;)
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1249
Joined: Mon Jul 03, 2017 10:51 am

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby bjoern » Wed Apr 11, 2018 7:43 am

perfect! thank you.
bjoern
 
Posts: 237
Joined: Thu May 11, 2017 12:43 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby FilipO » Wed Apr 11, 2018 9:37 am

seems like hte exposure part of that code is missing for some reason :P

//Exposure
R = R * exposure[0]^2;
G = G * exposure[1]^2;
B = B * exposure[2]^2;

or

//Exposure
R = R * exposure[0]**2;
G = G * exposure[1]**2;
B = B * exposure[2]**2;

dont know osl that well, and have not tried the code above, but someone in this forum will hopefully help out :)

Might be a good idea to have a OSL library for tested OSL files used in clarisse on the website somewhere.
FilipO
 
Posts: 111
Joined: Sun May 29, 2016 3:01 pm

Re: HDR textures on EnvLight and Arealight don't act the sam

Unread postby bjoern » Fri Apr 13, 2018 4:04 pm

jep, gives an error. I have no knowledge of OSL either...
If someone got an idea!? Super welcome :)
bjoern
 
Posts: 237
Joined: Thu May 11, 2017 12:43 pm

Next

Return to General Discussion