I had to deal with this recently, so I thought it may be useful.
The problem:
We want to obtain an exact RGB value for some (small) surface in our image. Let’s say the RGB value is xr, xg, xb which range from 0 to 255.
The solution:
1) Render the scene in any way you want with any settings you want, but make sure you use Linear color mapping with 1.0 for both Bright and Dark multipliers and the “Clamp output” option is off, and you are using the V-Ray camera “Exposure” setting. It would also be handy if you render to the V-Ray VFB.
2) Measure the RGB value at the pixel you need to match. If the values are, let’s say (pr, pg, pb) again from 0 to 255, adjust the V-Ray camera “White balance” to be (pr*255/xr, pg*255/xg, pb*255/xb) and multiply the camera ISO setting by (xr+xg+xb)/(pr+pg+pb).
Note that this works only for Linear color mapping. In principle it can be done for any color mapping, but the numbers are hard to find by hand.
I hate math with a passion (im left handed after all LOL) But if I squint and take a second, it seems pretty straightforward to me. You just have to apply yourself… :lol:
A little help with the math please. I have a white box in my scene and when I render I get 255,255,187. I am using vraysun/sky with an ISO of 100. I am using LWF with gamma 2.2 in both vray color mapping and MAX. What would the equation look like?
(255*255/255, 255*255/255, 187*255/255) work that out and set it as your whitebalance
and multiply your camera iso by (255+255+255)/(255+255+187)
So basically put 255/255/187 in your whitebalance and times your ISO by 1.0975609756097560975609756097561 you can round it down if you want Smile
Thats it I believe.
Also read vlados post again. Says it only works with Linear color mapping. As using other methods makes it pretty hard to find the right numbers.
See how you go Smile
Dear glorybound,
As an additional side note …
Just in case you aren’t familar with the algebra expression from vlado.
Well sometimes your white isn’t 255 full value. Mine is often set to about
(220R,220G,220B) where “x” represents the number of RGB you are trying to
match and “p” represents the color your color picker records off the
pre-corrected rendering on the vfb.
Then it would look like this,
(255*255/220, 255*255/220, 187*255/220) for the first part …
This has never worked for me. I get close, but the numbers don’t match. I should try it at home and see if it is my office setup. One question… should this calc be done with gamma at 1 or 2.2?
As i understand it, the formula works to adjust the hue not the exposure, so in your example you’d need to adjust the exposure to be closer in range then use the formula along with the color balance to remove the sun/sky tint. Not sure if the iso formula would work to get you in range first, and I’m too lazy to try it right now. heh