So we are trying to achieve a similar effect to Color Dodge Blend Mode from PS for some of 2d sprites in our game.
We've tried using Blend Function - Color Dodge and all existing Blend Modes, but for some reason it just doesn't do anything similar to PS.
Any suggestions on what we are missing? Or maybe another approach we should take?
Replies
"The Color Dodge blend mode divides the bottom layer by the inverted top layer." - taken from the Wikipedia page
Edit: It seems to work fine for me and gives me a near identical result. There are a few discrepancies, but if I didn't have both the Photoshop and the editor blends open at the same time, I wouldn't really notice. The function does use the same method that I quoted.
Then probably I'm using it wrong))
I have following setup for the material:
What should be added as a Base and what should be a Blend?
The only issue I can see with the material setup is Additive might change how it appears in the scene when it's in front of other objects, depending on their overall luminance. You can double check in the material if the blend looks correct just by previewing the blend node.
I mean, I'm trying it like this:
But maybe I just don't understand what SceneTexture is doing and it should be something completely different.
From the hlsl code:
define BlendColorDodgef(base, blend) ((blend == 1.0) ? blend : min(base / (1.0 - blend), 1.0))
The question for me is what inputs for this function I should use. Like in my screenshot above, I input SceneTexture:DiffuseColor as a Base and a Color as a Parameter as a Blend, is it the right approach or do I need to use something different as a Base?
Here I'm just adding PNG in attachments as a layer with ColorDodge to a screenshot of our gamescene in Photoshop.
But I don't understand how to make it mix with other sprites in scene like this in UE. Can you show me an example of how ColorDodge function is used in some material in UE? Any tutorial?)
Now if you wanted it to be only on certain meshes, you'd either have to add it to each shader(which isn't hard if everything is using a master material) or use the Custom Depth in the shader to single out the mesh for Post Process.
So you're saying material+node setup should be something like this:
Then I should apply it to any sprite I want to work as a ColorDodge layer in PS? When I try to do it, sprite just become transparent (I've tried added PostProcess Volume and making it unbound but it doesn't help).
If I set it other way around (Meaning Color going into Base it fills sprite with just white).
Am I missing something?
If you want to Color Dodge a single asset, you'd do the Color Dodge on your Base Color inputs, not the SceneTexture node. Your Material Domain would be Surface, but the Blend mode would be up to you depending on what it was. For a light beam, it'd probably be Translucent or Additive, although Color Dodging something with that bright of a color when using Additive might make it seem more opaque. I guess the same goes for any Blend Mode, if your Base input is pretty bright already, Color Dodging it with white will probably just blow it out