Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ACEScg primaries vs Arnold

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
504 Views, 4 Replies

ACEScg primaries vs Arnold

Hi guys,

Now that the ACEScg is getting adopted by more and more peoples, I would suggest having an option of some shader that are still generating colour with sRGB primaries.

I am thinking about the physical sky or the melanin input in the hair shader but I may forget others one.

Does it sound relevant for you?

Tags (2)
Labels (2)
4 REPLIES 4
Message 2 of 5
madsd
in reply to: Anonymous

vec3 aces(vec3 x) {
  const float a = 2.51;
  const float b = 0.03;
  const float c = 2.43;
  const float d = 0.59;
  const float e = 0.14;
  return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);
}

float aces(float x) {
  const float a = 2.51;
  const float b = 0.03;
  const float c = 2.43;
  const float d = 0.59;
  const float e = 0.14;
  return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);
}


This is I suppose pseudo from/to you can try call this function infront of a small OSL shader.You can wrap any texture/color through this.Maybe I missed the target, but it sounds like you want to confrom into ACES and thats what this function attempts.


#define vec3 vector

vec3 aces(vec3 x)
{
  float a = 2.51;
  float b = 0.03;
  float c = 2.43;
  float d = 0.59;
  float e = 0.14;
  
  return clamp((x * (a * x + b)) / (x * (c * x + d) + e), 0.0, 1.0);
}

shader ACES
(
    color in = 0,
    output color ACES = 0,
)
{
    ACES = aces(in);
}


Last block should be compilable.

Message 3 of 5
Anonymous
in reply to: Anonymous

Hi Mads,

Not quite the answer I was expecting. I know how to apply a colour matrix to convert sRGB primaries to Aces CG primaries.

But what about for someone less tech-savvy?

While I could see how you will apply it after the physical_sky, how would you apply this code for the melanin parameters that are embedded in the hair shader?




Message 4 of 5
alan.kingFCDLA
in reply to: Anonymous

Hello Harry,

Shaders having a spectral effect were modified to work the selected rendering color space as a part of the color spaces feature that was introduced in Arnold 5.0:

  • Rendering color space: using specific implementations of a color manager it is now possible to specify Arnold's rendering color space. Arnold's default rendering color space is Linear sRGB. For other color spaces Arnold will try to auto-detect chromaticities and illuminant, and will expect all data (textures and .ass file parameters) in that same color space. An important note is that different rendering color spaces will yield different render results when compared with the default sRGB linear. These color and intensity shifts will be more visible with transmission, but will also affect illumination and subsurface. Because of this, shader adjustments and texturing should happen in the same color space as the rendering one. (#5262, #5527, #5819)

Is this what you were referring to? Like most other shaders, these shaders expect their other parameters like textured or color-picked tints to have the same chromacities as whatever the linear rendering color space is configured to be.

Message 5 of 5
Anonymous
in reply to: alan.kingFCDLA

Hi Alan,

Thanks you for your clarification. Your explanation did highlight an issue with our OCIO config hence my issue with primaries when using shader with spectral effect. The way Arnold handle it is pretty neat I have to say.


Thanks again to put us back into the right direction.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report