Hard light blending Photoshop style?

Does anyone ever recreated hard light blending ? Like in Photoshop?
I mean in shader editor?

It’s fairly simple math- the equation is here:

Well, I see no formula there actually and how that combination is supposed to be done with shader nodes? It’s a bit cryptic description IMO. I assume I would need something like “if else” but can’t find such a node.

Oh. it’s less than and greater than.

ps. Thanks Joseph

Well… it’s math… the most accurate language to describe the behaviou of a function…
:person_shrugging: :stuck_out_tongue_winking_eye:

Well,

Hard Light

Hard Light is also a combination of Multiply and Screen. Hard Light affects the blend layer’s relationship to the base layer in the same way Overlay affects the base layer’s relationship to the blend layer. The inverse relationship between Overlay and Hard Light makes them "commuted blend modes

I see no actual math examples here. Chat GPT gave me something I couldn’t recreate with blender nodes for some uncertain reason. Looks nothing like what I expected.

As you also can see there are no fixed definiton (or names) for some… for example the next one softlight… some companies just do what they want…

I also remember… in the past the Krita Docu was mentioned often… ( but they seem to have changed it for a more general explanation ?? ) :

It’s the inverse of the Overlay function, which is provided, which I believe means switch A and B in the function

1 Like

no math examples to follow too

Well then… have a search… ??

I think this one…

http://www.simplefilter.de/en/basics/mixmods.html

1 Like

oh. thanks Joseph , it’s actually what chat gpt shows. Perhaps I have messed something

Thanks Okidoki
it’s a great find. explains things mush better

So basically if I take current “mix color” node in “overlay” mode in drop down and switch A and B inputs I would get hard light blending?

And what’s background among those A and B in Blender?

There is a whole mess about those A and B . In Wikipedia B is upper layer
in the link Okidoki posted B is background . I am totally lost now.

That’s why i mostly don’t care and just mx it :stuck_out_tongue_winking_eye:

From the link:

Hard Light a combination of the Linear Dodge blend mode on the lighter pixels, and the Linear Burn blend mode on the darker pixels. It uses a half-strength application of these modes, and logic similar to the Overlay blend mode, but favors the active layer, as opposed to the underlying layers. The effect is more intense than the Overlay blend mode, and results in harsher light. Another thing to note about the Hard Light blend mode, is that it and the Overlay blend mode are commuted versions of each other. This means that if you apply the Hard Light blend mode to the active layer, you will get the same effect if you apply the Overlay blend mode to the layer below, and then switch the order of the layers.

1 Like

So just to be sure If I take Blender overlay mix colors node and switch A and B I will get hard light ?

I suggest you make two color swatch inputs, try that combination, and see what you get on the screen.

1 Like

Maybe i’ts time to make a counter question:

What for do you need a “hard light” blending node… what’s the wanted effect… or the context… maybe you are better off with using somethgin completly different ?

Because like also for example here:

There is some reference to Adobe… but not real explaination how in photoshop this filter is “defined”…
Also i do especially quotet his:

Ultimately, it is a meaningless blend mode within a raytracing context.
since you also mentioned it in the title of this topic…

What i mean is… maybe the general idea of hard liht is somehow differently interpreted by Adobe… or even the general idea ( https://en.wikipedia.org/wiki/Hard_and_soft_light ??) can be meet better with an 3D rendereing app than with any photo filter ???

Also this…

…is not really… :thinking: accurate…

Or maybe you want somethign maybe more like this:

( the link to www.minimaexpresion.es … comic style filter/ render is still online )

…so maybe the context is more significant tthan the term or get-used-version from any company ??

3 Likes

I agree In fact there is simpler ways to blend things . It’s just we already have “hard light” blending in game shaders with some weird look and I try to figure out what’s wrong.

Starting to agree it doesn’t have sense at all. Can’t make it looking same way Photoshop does in Blender too.

Oki makes a good point here. Photoshop sometimes has unique ways of doing math to create the result they want.

Earlier this year, I ran into this noticing that blenders desaturation is not the same as photoshops desaturation. It took a bunch of math and experimentation to figure out how to make it nearly match. It might not be exact, but it’s close enough that I could not visually tell the difference.

So, just be aware when you’re chasing the hard light result that it might be hard to hit it 100%, even if you have the basic layer + math combination.

2 Likes

Looks like Photoshop does some undocumented extra Voodoo .