Hi,
TL,DR:
How do you stop your colours in Unreal from being washed out? How do you make sure your whites are white?
I’m a VFX artist coming into the UE4 workflow having come from a game engine that has a much more straightforward WYSIWYG relationship between the colors we assigned in our color picker, and those that would appear on our particles in game.
In League’s engine, if I put a particle to be 100% opaque, and set it to a specific color, that would be the color I would see in game.
I’m struggling with Unreal because of the impact that the tonemapper has on the colors that I assign to the particles.
Please look at the attached image. I have created several different particle systems that spawn colored planes using different methods. All of these use unlit materials. On the left is a sprite where the color is created by a texture. It has sRGB disabled, so is in Linear space. As expected, it doesn’t quite look right, as it essentially has a gamma correction applied twice. On the right hand side, the same texture is used, but with sRGB enabled, looking correct.
In the centre, there is a mesh where the colours are derived from the vertex colors of the mesh. It uses the same values as the textures. It looks incorrect, appearing the same as the linear space texture. I assume that mesh vertex colors are in linear space.
Below the mesh, there are 3 rows of particles. The top (rainbow) and bottom (blue) row simply use the vertex colors to color the particles. The middle row uses a color curve driven by a dynamic parameter.
Similar to the mesh colors, these are messed up, I’m assuming because they’re in linear space too.
Below these, you can see the set of emitters repeated. These were setup the same as the particles above them, but in their materials I corrected the gammas of all the colors by giving each a power of 2.2. These mostly behave how i’d like (except obviously the sRBG one has now been gamma darkened twice and looks too dark).
On the right, you can see these examples duplicated. The middle set of emitters is the same as the left, but with the tonemapper set to 1 with a console command. The right side set of experiments is using a post process volume to replace the tonemapper in a post process material.
These experiments I did to try to understand better how the tonemapper is affecting my colors.
The workflow I’m used to is one where we would make use of a lot of uncolored textures, and then use the particle colors or color curves to recolor particles. This means we could work in an optimized fashion with relatively fewer textures.
I have a few main issues that i’m trying to overcome.
-
When Unreal is blending colors in linear space, it is giving undesired colors. Note how emphasized the pink and orange colors are when it’s blending between the red and blue.
-
It’s really hard to pick the actual colors that I want on my particles, even using the little sRGB preview box, as I can’t click on the color I want in the color wheel, instead I have to just fiddle with the settings until I get the color I want in the preview. This is frustrating and really slows me down. As an artist, I really want to be working in as close to a WYSIWYG way as possible
-
Whites in my unlit particles are not close to being actually white. I’ve investigated this a reasonable amount. As I understand it, Unreal is attempting to work in a physically correct way, where white would only be displayed if my particle was the brightest thing in the scene. Since Unreal is trying to accomodate HDR, this means that there’s actually a very wide range of values for brightness, and simply setting my material to white won’t make it white in the render. I can multiply my emissive channel by a variable to make it brighter, but this will make stuff bloom more, and will also make my particles less saturated, due to it being “physically correct” that things get paler as they get brighter.
So from this I have a few questions:
-
When we import a texture with color information we tick sRGB so that the colors will appear how we expect in Unreal. Is there any similar setting for mesh vertex colors, particle colors, or color curves?
-
If not, Is it an expectation that if wanted to use the colors from the color picker, that I would put a power of 2.2 in the shaders I’m using? My understanding is that this is pretty expensive, and you have to do a simpler/less accurate method for mobile. Is there an alternate color picker where I select the colors I want, and it does all the color conversion behind the scenes?
-
In a situation where I wanted the screen to display white (i.e. 255,255,255), such as for the UI, or for example a particle that appears above a character’s head that shows a status effect, how would I go about that? Is there a way to exclude something from the tonemapper? I don’t really want to request that we turn off the tonemapper entirely as it’s useful and the environment and character team has authored all their assets to work around it, but I also really want to be able to have control over how my particles appear, as VFX can be used to convey important gameplay information.
Sorry for this long post, but I’d really appreciate if someone could help me out, even if it is just to understand how the systems work better.