Random film grain texture placement and overlay

I have a film grain texture in unreal engine 5 that I’m lerping with the postprocessinput0 to mix it together and have a custom film grain effect. The problem is, I just have a static film grain texture at the moment. I want it to have an offset to a random position every frame so it looks like real film grain that’s moving. The issue is that I’m a beginner here and I don’t even know where to start. I would also need to somehow remove the black background of the grain texture, so it doesn’t darken the final image, but only acts as an overlay.

You need to be able to move the random pattern around quickly.

One way, is using a panner node, but it’s very hard to make it look like it’s not panning :slight_smile:

Until I ( or any else ) finds a fancy way of making pseudo random numbers in a material, you’re stuck with writing to parameters from blueprint. Here, I’ve used a material parameter collection, because it’s much easier than fiddling around with a material instance

I wrote to it from the level BP with

film grain

How exactly you do that last step is up to you. This also works

image

Also, the texture matters a lot, I found this good

image

which is from

https://www.unrealengine.com/marketplace/en-US/product/luos-s-noise-texture-pack

Thank you so much, this really worked wonderfully!

There’s a small issue though. With the grain that I used (which more closely resembles the old camcorder/■■■■■■ phone camera look that I’m going for), your approach of overlaying it doesn’t really work as well as with your grain texture. I’m trying to preserve the colors of the grain, and the approach you used makes the effect almost unnoticeable when using my grain texture.

Is there any other way to overlay the texture, perhaps making it translucent without having the black background darken the whole image?

1 Like

Can you upload the texture, or PM it to me, and I’ll take a look?

Thanks a lot for the help here, I really appreciate it.

Texture2
Texture1

Here are some of the textures I’ve been messing around with. It doesn’t necessarily have to be one of these exactly, but just something along the lines of this, to have that colorful old camera grain effect.

1 Like

So this texture is basically just noise on 3 channels. Here’s the red, for example

So, we can sort of apply the color output in an overall sense to the scene texture, like this

which gives

color1

But you can see, the pink ( red ) is dominant. And we’re already ‘faking’ the lerp input from the 3 black and white channels together, so we might as well fake the whole thing, and have control over how much of each color we have, like this

You see, I am just taking the b&w source from each channel. I have to multiply it by various amounts, because the colors have different strengths in the original texture, then lerp it. The only advantage I get from using the different channels is the fact that the noise is in different positions. Now we get

color2

It’s a bit much, maybe. We can reduce it like this

color3

Finally, I ended up with this sort of MI configuration

image

I dropped the blue because the noise for that channel was almost in the same position as the red.

color4

I really don’t know how to thank you for this, this must have taken a lot of time and effort to figure out. This fixed the issue though. Thanks again!

1 Like

You’re welcome :blush: