3

What is a good approach to copy the average brightness and possibly the average saturation of one texture image to another in Photoshop?

The scenario I have is this:

I'm processing several textures from various sources (photographic textures, megascans, generated from substance designer, etc.) into a coherent collection of textures that should fit together in a game without too obvious differences in overall brightness and saturation.

For example I might have a grass texture from one source but without adjustments it will end up looking too bright and/or too color-saturated in-game next to other textures.

Is there any reliable workflow in photoshop, optimally one that doesn't require much manual adjustment? I know that Photoshop has a color-matching feature but what about average brightness/saturation values only?

  • Please add some before-after examples: what you expect from a brightness change maybe not something other people expect – Sergey Kritskiy Oct 9 at 5:37
  • It might be possible to use Adobe Lightroom instead. It's non-destructive, no saving is required between edits, you can apply the same settings to every image, then tweak those settings manually on a per image basis until you are happy, and when you have finished you can output all the adjusted image files in one go. – Billy Kerr Oct 9 at 9:10
2

ABOUT THE PROBLEM: The problem is mathematically exact, but visually it is not as well defined. That's because the subjective colorfulness depend in a complex way on RGB hue, saturation and brightness. Photoshop's HSB system set B=the highest one of the RGB components/255, so the apparent brightness of full white is much bigger than say max bright red. Still both have B=100%. In addition saturation doesn't be the same as the subjective colorfulness. That quantity is called chroma.

Let's check the math side (= how to averagely match saturation and brightness). HSB separation with HSB/HSL filter obviously gives something to you. After applying it to a RGB image you have hue in R channel, saturation in G channel and brightness in B channel. After the separation you can adjust saturation and brightness curves. You can check the average by applying Blur > Average and undoing. Finally filter back from HSB to RGB.

Photoshop hasn't blur adjustment layers for fast exact processing, but you can use smart filters instead.

Here's our test images as layers. They have same hues, but the top layer is too bright. It has also too much saturation. Both layers are converted to smart objects.

enter image description here

This is our stack for the equalization:

enter image description here

Both layers have got HSB separation filters and averaging blur filters. There's a single layer mode curves layer. Its G channel is used for saturation equalization and B channel for brightness equalization. The too bright layer has blending mode difference and the goal is to make G and B channels both black in the channels panel. It can be checked best with the color picker, because black and dark grey can seem too same.

After adjustment we remove all filtering from layer Wanted. From layer "Too bright" we remove averaging and group that layer with our curves layer. The blending mode is changed back to Normal.

The group is converted to smart object and it has got filtering HSB to RGB. If the curves are adjusted ok, the result should be = the wanted.

enter image description here

We can check with blending mode Difference how close we got it:

enter image description here

It looks perfect, but there's still a percent of brightness left. I guess it is caused by lousy adjustment without the color picker.

You can rasterize the result to get a normal image layer.

The success so easily is based on a non-realistic thing: The goal needed both brightness and saturation reduction. With practical images which need increasing there can occur clipping and the result still isn't numerically right.

The visual side: CIELAB color system (=Photoshop's Lab) would be theoretically better than RGB when you want different hues which should look as bright and colorful and want to get it with numerical adjustments.

Unfortunately in CIELAB you can far too easily drift out of the color range which can be shown in RGB screens. In addition Photoshop doesn't have the polar form HCL (Hue, Chroma, Lightness) of the Lab color mode nor a handy way to separate H, C and L. Thus the Lab subject isn't digged deeper in this answer.

Be practical: I guess that without some special software you must do it visually because numerical adjustment as shown doesn't present properly the subjective appearance. Have several textures opened in separate windows at the same time and use adjustment layers to be able to tweak the colors iteratively. I guess having only 2 visible at the same time isn't productive.

Flatten the images when you are ready.

  • Thanks for the detailed elaboration of the problem! I was hoping for some Photoshop instructions like chose filter X, adjust parameter Y... record a macro of it... done. But I see now the problem is more complex than initially thought. – BadmintonCat Oct 11 at 1:27
1

Given you mention textures coming from Substance Designer, one assumes you're targeting either a PBR workflow or a PBR-like stylized workflow - you might be in your own engine or in a custom forward renderer built into an existing engine - but for the sake of this answer I will assume use of the engine with which I am personally most familiar: Unity.

  1. A simple frame challenge - look at the physical world around you where you sit right now - there is a substantial range of saturation, brightness / value in all materials around you - admittedly, there is an over-arching set of tones lent by your various real-world light sources' various colour-temperatures, and the amount of total incident and bounced (GI style) ambient light set a global level of glare / contrast, but beyond those main constraints, each "material" you see in the real world has radically differing levels of chroma, reflectance, absorbtion spectrum, etc. I'm not sure you want the overall palette so uniform. You'd get what an old colleague used to refer to as a palette which is "too blendo" - as in the tones and values are too close to easily discriminate one surface from another absent other cues.

  2. In most modern game engines (definitely in recent Unity and Unreal releases) you should be able to handle overall colour grading / tonal range post-effects in-engine at the last stage - as a camera post effect with little to no GPU or FPS cost - this may be far more efficient for your overall pipeline than spending huge effort / time to achieve a uniform value / chroma / contrast envelope in your material library.

  3. Many developers actually use Substance Designer and/or Alchemist for exactly this - one last pass of processing to achieve a uniform range of chroma / value / contrast - look into using the tools you already have which can most easily be automated - you can create nodes which set envelopes in Substance Designer and save them, re-use them per material as a final output node and that would get you what you need I suspect.

Hope this helps.

  • 1
    @GeradFalla actually I follow a PBR workflow but the use case is for a texture mod for another popular game which is supposed to use ENB PP shaders. Textures can end up looking way too saturated or bright if not careful about these measurements therefore i'm looking for a good, fast solution to equalize these on average. – BadmintonCat Oct 11 at 1:30
  • 1
    @BadmintonCat Then unfortunately photoshop is not the right tool. Best you can expect is working in Lab mode – joojaa Oct 11 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.