Tone mapping is usually one of the last operations during rendering. When you use post-processing, you have to perform tone mapping with post-processing, too. Check out the following example to see this approach in action:
I found BloomPass has four arguments, strength, kernel size, sigma and resolution, but I have not found the settings that make the scene less blurry and a bit more towards the original colors.
It seems the example you were referring is not available. Could you please point me to the place where I can learn how to properly apply the tone mapping with EffectComposer?
Yep, you can apply tonemapping either directly or via some postprocessing (if you’re not using any other postprocessing effects, applying it directly is just simpler.)
Hmmm… It seems I am doing something wrong since it has no effect on the rendering results in my case. It looks like something overrides it. Thank you, I will keep digging.
By the way, I am not using pmndrs, I use EffectComposer instead with other effects. I believe the way to do it should be the same, right?
PS: Maybe you can suggest where I can find some examples of how to tune color management to be as close as possible to Blender? Thanks!
The previous example webgl_shaders_tonemapping has been removed.
Since last summer, parts of the post processing classes have been refreshed. The idea is to use OutputPass and the end of your pass chain. It does color space conversion and tone mapping based on your renderer settings. Check out the setup in webgl_postprocessing_unreal_bloom for a code example.
@Mugen87 Thanks a lot for the example and explanation!
It seems I am doing the same stuff, but for some reason toneMappingExposure doesn’t have any effect in my case. The only thing that has effect similar to the exposure is when I change envMapIntensity for the gltf materials.
Here is how I create the renderer:
const renderer = new WebGLRenderer({
canvas,
antialias: false,
alpha: true,
});
renderer.outputColorSpace = SRGBColorSpace;
renderer.toneMapping = ACESFilmicToneMapping;
renderer.toneMappingExposure = 1;
renderer.setClearColor(0x000000, 0);
// Setting max to 2 due to performance considerations.
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
renderer.setSize(canvas.offsetWidth, canvas.offsetHeight, true);
I do have OutputPass in the very end of my post-processing pipeline, also I am using MultisapleRenderingTarget.
Could you please suggest if there is something I should pay attention at?
Thanks!