My rationale for reducing the R&G by the net amount I increased the blue by was to prevent bounces from having more energy than the albedo could actually reflect. It may warrant more tweaking, but like Ibex said, I also found about 4-5% extra to be a good balance. Greater than that made it noticeably blue.
Not sure how Ibex did it, but I simply used a raytracing quality switch node.
I think that the incomplete precision of blue causes it to lose energy, so I would only add blue, but it would not be 5%, because there are not 10 possible errors, if not 9, since 0 or 10 would not be an error since it is fine inside of precision, so I would add 4.5%, more than that would cause there to be more energy than there should be
Edit: Okay I did some more experimenting. It actually seems that both of our numbers still have less light energy compared to the path tracer. Color value is 0.7 as before.
Path-tracer:
When inspecting the histogram of these images, I found 4.5% and 5% both still had less mean average blue levels than a true white or our reference, and they had lower luminance. In this specific scene, increasing the indirect light intensity to 1.11 compensated for the lower light energy compared to the path tracer pretty well.
Histograms:
Path Tracer: Mean RGB ( 66.85, 66.99, 66.82) Luminosity (66.99)
4.5% blue-shifted lumen Mean RGB ( 63.06, 63.2, 61.64) Luminosity (63.07) 6% blue-shifted lumen with 1.1 GI boost Mean RGB ( 66.65, 66.77, 66.71) Luminosity (66.75)
Difference from Path tracer (darker = more similar)
6% + GI Boost:
For the purpose of these tests I did not reduce the other channels, since we we’re already darker than the reference, and it was fewer variables to explore.
Obviously this is just one scene, so I can’t be sure that these numbers are generally useable outside of this instance, but in this instance 6% extra blue corrects the color the best, and boosting the indirect lighting intensity to 1.11 corrects the lost light energy quite well in this case.
I was also doing more experiments, and I think the amount of blue to add is not the same, in a scene with the same increment it can look more yellow than the path tracing, or more blue, and about the energy loss, I also noticed that lumen has a little less energy, I will do more experiments and I will pass comparative photos
I thought you were doing something more internal into the engine. The problem now is that it must be applied to eevery material.
So, I have making some quick tries with a Post Process material, more “global”, and it seems to work too (maybe not so great as applying it to the “source” material directly). But I can’t find the way to disable it when rendering with Path Tracing view.
You would just add it to your master material as a bool, so that it can be enabled as needed on any instances with the click of a button. The issue with tinting the scene blue as a post process is that areas that are in direct light don’t need to be adjusted, so you cannot linearly apply color correction to the screen.
I have also figured that it is best to cut the R&G instead of boost the B. This is because albedo is clamped from 0-1. In the unlikely event that you have a very high albedo value, boosting will get clamped and not correct the scene. So for example you might multiply the RT pass by ( 0.946, 0.946, 1) instead of ( 1, 1, 1.054). I tried more scenes and lighting configurations and found that the 4-6% range generally offered the most aesthetically pleasing results.
Both R&G and B will suffer from lost precision at certain values in the GI texture. So my theory is the important figure is the difference between how imprecise they are.
I believe the range, more specifically 5.4% or (0.946 RG) is the ideal ratio for white balance after doing lots of math and testing.
Based on the images below. I’ve tested the RGB values in multiple lighting setups and this offers the consistently truest white based on my experiments. Using these values, here are the histograms side by side.
EDIT: swapped comparison out for a brighter image to better show differences.
OG Lumen Left, Shifted Lumen Middle, PT Right:
Note that the color shifted lumen does a good job of shifting the color peaks to by synchronized. It’s not perfect, but this is in an extreme case with an albedo of 0.9. I did not increase the indirect light intensity of this example.
Edit: For science, here’s the histogram of shifted + boosted Lumen (left) vs Pathtracer (right). I didn’t fine tune the indirect light boost, just got it roughly by eye. Once again, still more color inaccuracy than the PT, but the peaks and troughs are all in the right place and the RGBs mostly overlap.
In this specific scene I had to double the indirect light intensity of Lumen to roughly match the Pathtracer. I don’t think that is representative of a typical case - we’re just in an almost pure white box and the PT does a better job of bouncing all that light around.
Did a few more experiments to drill down on the blue shift value more. As I still wasn’t happy with the 5.4% figure, even though it looked good in most cases. We can see from my last post’s histogram that it was just a hair too blue.
So I went back to the baseline and tested a bunch of levels. 4.5% works great at most points as Ibex predicted, but it specifically falls apart when the albedo gets very high (above 0.95) and begins to turn yellow again. I didn’t notice anywhere else that it didn’t perform well, as you’ll see below.
Maybe this doesn’t matter, as Krzyztof said, as no materials reflect this much light except mirrors. But I wanted to push on anyway. I found a value of 6.8% corrected the yellowing at a value of 1.
So I decided to color correct using a remapped range. Anything below 0.95 would use a 4.5% adjustment, and anything above 0.95 would begin to lerp towards 6.8%.
Here is an image and histogram of every 0.05 increment from 0.6-1.0 showing proper white balance across the full range of values.
Its not perfect, but it seems nearly so across the full range. At low albedo levels I would disable the effect, as the reflected light no longer contributes enough to be noticeably colored, but the slight tint in reflections would be.
I don’t expect this will come up often or ever realistic scenes. Maybe in a bright, white marble room.
Here’s an example node group. From here on out I propose this technique be nicknamed Blumen.
Unless you actually need to use the 0.95 range for some reason, I’d probably start with a flat figure like 4.5 and then adjust as needed.
Anyway, I think I’ve beat this horse past dead so I’ll move on from here and hopefully this proves useful to some of you.
Maybe they could (something like) include those nodes internally just before the base color pin.
You commented to disable it for low albedo whites. It could be interpolated with a lerp too. When near to 0, applies 0, and viceversa.
About the reflections, well, I imagine th edifference between the RT part (more blueish now) and the screen traces ones, but it would different too when comparing the yellowish RT part with the screen trace one, isn’t it? Just changing the color, nothing dramatic.
PS: even if it’s the ideal approach, I still see it like a headache to add it for every material, as lot of people don’t have an unique master material.
PS2: Oh, even if somone said, I think it’s quite usual to have interiors with whites higher than 0.8 or 0.85, so this is still quite useful.
You could lerp it to 0% increase, but disabling it saves a few instructions.
The reason that the yellow screen-traces don’t cause an issue is because when it is not adjust is that it will be yellow in both the screen-trace and the reflection.
Bluing adjusts the ray-traces only, not the screen-traces. This causes it to become white in the screen-trace but blue in the ray-trace. It’s not horrible, but it is noticeable.
As to to the P.S., this is exactly why every large project should probably use master materials. You will often find in a production environment you want to deploy a change across a wide number of materials, which is trivial when set up this way. Alternatively, only add it to the few materials that actually need it. I don’t think this is going to be a common issue.
As to the P.P.S.: True. I will add that if I’m looking for the difference, I can spot it down to about 0.3. When I’m not looking for it, Lumen starts to appear visibly warm to me around 0.7.
I guess maybe Archvis might get some use out of it - they love their bright modern walls, but they’re also the most likely to run into the issue of reflections being too blue.
For the Blumen, I will say the contrast between the lights/darks is a BIT more stark than PT, but in a soft way that makes them pop w/o being noticable.