I need help!
After add DefaultRenderingPipeline, node part blue to pink in my scene.
What is the problem and how to overcome it?
You must activate tone mapping in the image processing configuration, otherwise you’ll get these artifacts due to color saturation:
set toneMappingEnabled = true,color change
Compare color changes by commenting out 16 lines of code.
Selecting the same position color block with color change
If a model has a physical material, toneMappingEnabled=true, the material will be darkened.
Yes, tone mapping will remap colors, but I don’t see any other solution if we want to remove artifacts due to color saturation.
Let’s turn to @PatrickRyan, who’ll know better than I.
@lxq100, I guess I am trying to figure out what your target it here and why you are on the path you are. In your original playground you have enabled the defaultRenderingPipeline
and asked for the pipeline to use high dynamic range textures by setting the second argument to true. What this is doing is shifting all of the values in your render into high dynamic range values, meaning that instead of all color channels being in a range of 0-255, they are now able to be set at values far above that. When you enable the default render pipeline to use high dynamic range textures, you will get more accuracy for something like bloom, but it does mean you also need to tone map your final render.
Monitors that are not HDR capable will require a render be displayed in low dynamic range which is where your scene started before enabling the default render pipeline. Here’s a good comparison. On the left is your scene without the default rendering pipeline enabled and on the right is your scene with the default rendering pipeline enabled but we tell the pipeline to use low dynamic range textures in the pipeline:
You can see that the renders are much darker than your screen shots, but importantly they render exactly the same. Enabling high dynamic range textures in the default rendering pipeline shifts the output from LDR to HDR, but if it is displayed on an LDR monitor, you will see clipping for colors that go outside the range that can be rendered in LDR. This often results in random color shifts like the pink in your screen shot. This is happening because you have a gradient on opacity for your emissive texture on your material. Where the opacity is low enough to keep values from clipping, they render somewhat as you would expect (minus the color shift to HDR). When the opacity gets high enough for the colors to clip outside the LDR range, you see your color shift to pink.
This is where tone mapping comes in. Tone mapping is a curve applied to the scene to bring HDR values back into a range that can be displayed on an LDR monitor. There are different tone mapping curves that can be applied, and we have three available by default in the default rendering pipeline - Standard, ACES, and Khronos PBR Neutral. Each curve is slightly different, and there are reasons you would pick one over the other. All tone mapping curves, however, are opinionated about how tones are mapped from HDR to LDR. Each one will prioritize different parts of the curve based on usage. For example, ACES is popular for tone mapping values on a screen that will be viewed in a dark room, so it is balanced to make values darker since the ambient light around the screen is less making the render more pleasing to the eye.
So, if you are going to enable the default rendering pipeline and ask for the pipeline to use HDR textures, you will need to also enable a tone mapping to bring those HDR values back into LDR space for display. And since all tone mappers are opinionated about the mapping back to LDR, you will need to adjust your color input to reach the look you desire. The best way to do this is to look at your assets and textures in the same space when authoring it. For example, if you are using ACES in your scene, enabling HDR with ACES tone mapping in your texturing software will get you there the quickest. If you don’t have the ability to match tone mapping in your texturing package, then bringing your textures into the final scene with your tone mapping and final lighting will tell you where you need to shift your texture colors or contrast.
There’s no single switch you can flip to correct everything here. If you need to be rendering in HDR with the default rendering pipeline, you will need to tone map, and if you tone map, you will need to adjust the input to hit the art target for your output. I hope this helps explain what is happening here so you can decide on the best path forward.