This project is read-only.

Post processing and brightness

May 28, 2014 at 7:23 PM
Edited May 8, 2015 at 9:47 AM
Hi, I've added my own sky shader and it works fine when my camera doesn't have any post processing enabled.

Once I enable it, the sun gets dull and sort of blurry. Any ideas why? I've tried disabling everything, I think it might be tone mapping but I can't find out how to disable tone mapping.

On the left is no post processing, on the right is it enabled:

Also, if I needed to render just the sky to a separate camera and then apply it, do you have any idea how I'd do that?
May 29, 2014 at 1:49 AM

This is probably the effect of the tone mapping. But I guess it is working like it suppose. Let me explain it.
When you work in High Dynamic Range (HDR) you want to represent very different bright intensities. Bright sources (like the sun) has way more intensity that a, lets says, white paper. Moreover, the sun has a lot more intensity that an artificial light. In your application you have to represent your sun color with a bigger value (yes more than 1 if you want).

How bigger? It depends of the color representation you are using. It is a good idea to TRY using radiometric units to represent your colors but for an indie development could be too much effort. Then you need to configure your tone-mapping curve and exposure to work with your color representation. Finally the bloom shader grabs the brightest sources of lights and apply a blur filter on top.

Do you speak Spanish? My thesis explain the theory but it is in Spanish.

You could configure a second camera and create two layers. In the first one you put everything except the sky and in the other one you put the sky somehow. Then you have to merge both. I just recommend you to learn more about HDR. Color representation is a very useful topic.

By the way, watch the new Metal Gear Solid: The Phantom Pain trailer for the E3 (when we finish it).

May 29, 2014 at 8:11 AM
Edited May 8, 2015 at 9:47 AM
Hi José, thank you for your input. I went with your advice and tried to fix the color output, it worked pretty much perfectly. Thanks. I just had to adjust the final float4 of my atmospheric scattering shader. It was actually very easy.

Here is a photo of the new outcome with all the post processing applied:

I have another question, if it's not too much for you. I'm trying to get a per-object glow effect, similar to this:

Now, I could just use some rather bright emissive textures, or, how would I go about getting this (if it's not already with the bloom shader)?

Thanks José

Also, which trailer? I watched this one, but, it might not be the one you're talking about:
May 29, 2014 at 8:41 AM
Great!! It works!!

About the glow... Good news... and bad news. Just render the glowing objects using a color intensity higher than Low Dynamic Range colors. The problem is that I did not create a material for that. Basically, you have to apply an intensity to the output of any material (outputColor.rgb = outputColor.rgb * intensity). Then, the bloom will catch that color and create the appropriate glow automatically.

The trailer is not yet released because is still work in progress. Wait for the E3. Sorry, I was just eager and wanted to comment it. I was not clear.

Good luck!!!