Author Topic: Output Z-Depth sRGB?  (Read 2830 times)

2018-10-18, 23:34:55

Ben

  • Active Users
  • **
  • Posts: 11
    • View Profile
Hello everybody,

I encountered some strange behavior with the Output of the zDepth-Channel of Coronas Multipass. To start at the beginning:

I read an article about When to NOT Linearize Your Textures by Mike Boers. I tried to rebuild his setup in a similar manner with the only difference, that I rendered my greyscale-map through the zdepth-channel, the setup looked like this:



The flying planes range from 0 to 100 cm in height. The resulting map I wanted to use for the displacement looked like this:



So far so good. Now I did some testing: I tried to displace a flat plane of same size with this map (EXR) and the bitmap-loader. No matter what setting in the input (embedded, linear, sRGB), the result was always like this:



I would have expected this kind of curve if I told corona to override my linear EXR with 2.2 gamma (if doing this now the curves becomes even steeper of course). The only way to correct the gradient to a correct (linear) stepping was to use an override gamma value of 0.45. So I thought there must be something wrong with the output and in fact, when I color pick the different values of my 32-bit EXR in photoshop they do not represent my intended linear 10%-stepping:



I was sure that the EXR output from corona would be linear, even for the multipass channels. To complete my confusion I then noticed, that when color picking in the VFB it is giving exact linear values after all!



Is there someone who could explain to me why this transition is happening? The background to these experiments is that I usually create my displacement maps by simply rendering them from modeled geometry (since c4d texture baking is not working with corona as far as I know). Do I have to override the gamma value by 0.45 from now on or is there another way?

Just for displaying purposes the comparison of the 10%-step-gradients in linear and sRGB next to each other.



Cinema 4D Studio R17
Corona Renderer 6 rc 2

2018-10-19, 08:33:49
Reply #1

Eddoron

  • Active Users
  • **
  • Posts: 552
  • Achieved Pedestrian
    • View Profile
Welcome to Corona's great mysteries!

We haven't heard from the devs yet, I wish I could help.

2018-10-19, 09:48:49
Reply #2

Ben

  • Active Users
  • **
  • Posts: 11
    • View Profile
Ah thank you. I saw the other post but I thought there might be some difference for he was working with his MARI textures. But yes, it affects value driven shaders (in my case displacement, in his glossiness) and the inverse gamma value corrects it, sorry for creating new topic.

While at it I will also test my normal maps as I render these out the same way, let's see what happens there. Thanks for your efforts.
Cinema 4D Studio R17
Corona Renderer 6 rc 2

2018-10-19, 18:58:40
Reply #3

Eddoron

  • Active Users
  • **
  • Posts: 552
  • Achieved Pedestrian
    • View Profile
Well, it's not just MARI, I tried it with a map I did in Photoshop and got the same erroneous result.

2018-10-19, 20:21:53
Reply #4

burnin

  • Active Users
  • **
  • Posts: 1532
    • View Profile
Welcome to Corona's great mysteries!

We haven't heard from the devs yet, I wish I could help.
Not a mistery - know your color spaces.

2018-10-21, 02:48:59
Reply #5

Eddoron

  • Active Users
  • **
  • Posts: 552
  • Achieved Pedestrian
    • View Profile
Welcome to Corona's great mysteries!

We haven't heard from the devs yet, I wish I could help.
Not a mistery - know your color spaces.

Sure, we haven't heard or worked with different colorspaces before.

Quote
My conclusion is - It's nothing wrong with Corona (except the need to do this automatically) - feature request! ;)

This is like designing a dog with shopping cart wheels for legs and asking: "Where's the problem? It can move forward!"
« Last Edit: 2018-10-21, 03:38:26 by Eddoron »

2018-10-21, 16:27:24
Reply #6

burnin

  • Active Users
  • **
  • Posts: 1532
    • View Profile
I hope this clears some of confusion you're having.

Linear Workflow Color Management (@ Renderman)

Specifically, pay attention to: "Values are not color corrected, only colors are."

...Do I have to override the gamma value by 0.45 from now on or is there another way?
... so, yes.

And yes, C4D is lacking full & proper color management pipeline. But for most of everyday works it's moving fine ;)
That is, unless you also want it to be a fish capable of climbing up a tree.
« Last Edit: 2018-10-21, 16:36:21 by burnin »