Thursday, November 30, 2023
HomeVisual EffectsSphear Masked LUT - Actual Time VFX

Sphear Masked LUT – Actual Time VFX


Hey. I used to be testing an thought I had the place you turn LUT solely within the space the sphere masks is whereas preserving the remainder of the world/stage with out the LUT utilized.

I’m nonetheless looking for a solution to do it. Would admire any assist. I’m utilizing a 1d LUT btw.

That is made in UE5 btw.




1 Like

The impact ought to principally seem like this besides the B&W space ought to have regular colours with out the LUT.

The issue I’m dealing with is that I can’t discover a solution to join the SceneTexture:PostProcessInput0 node to a LUT texture and get the right outcome.

That is the fabric for the picture right here

I add the LUT to the Colour Grading LUT property

I attempted this

However ofc it doesn’t work because the Scene has 3 shade channels and the UV solely takes in 2.

And what append if you happen to make the scene texture a float2 ? If it doesn’t work you possibly can nonetheless strive utilizing a lerp and utilizing the scene texture as alpha however you should have much less management and chance.

For those who make it a float2 you lose the colour data from the excluded channel. For instance, if we make it RG all the things that’s blue within the scene could be excluded from the LUT and appears bizarre.
Additionally, I can’t use the scene texture as alpha with out getting some bugs because the scene texture is an RGBA texture, and I can use the lerp alpha with solely one of many R, G, and B values from the scene texture, successfully dropping knowledge once more.

I don’t now if this may aid you or not, however I believe this would be the solely solution to do what you need.

here’s a discussion board about LUT in publish course of materials. Entry/Modify LUT in Submit-Course of Materials? – #5 by grmtr – Rendering – Epic Developer Group Boards



1 Like

I managed to do shade lerping. That one wasn’t a difficulty. However I wished full controller over the colour like with a LUT.

My present iteration seems to be like this and it’s okay for now. Nevertheless it nonetheless lacks the complete controller.
I do know there are additionally some points with LUT as they don’t work the identical on HDR-enabled screens so possibly this present iteration will do fantastic because it shouldn’t have any points with HDR.

I might nonetheless wish to know if there’s a solution to get the LUT technique working thou :smiley:

Hey, what do you concentrate on doing one thing like that :

Masking 2 channels after desaturation mustn’t isolate any of the colours since all of them develop into similar throughout desaturation if that is sensible.

Right here is the outcome I get:

Desaturate exterior + Postprocess0 Inside

Desaturate exterior + Postprocess0 → Desaturated → go into LUT

I believe the variation we will see on the spheres is because of a distinction in worth, not shade, in any other case one facet could be clearly remoted like this:

I hope this helps :sweat_smile:



1 Like

I did strive the same strategy. As a substitute of simply utilizing desaturate I divided the RGB by 3 to get grayscale values after which I added the channels collectively to get 1 grayscale worth, but it surely didn’t work because the values weren’t right.

I believe the ultimate outcome you bought on the take a look at nonetheless isn’t right. You continue to exclude the data from the blue channel.

If my reasoning is right then the purple channel is a grayscale channel in itself that represents all of the purple shade data of my scene, the identical is true for the inexperienced and blue channels. So by excluding the blue channel I take away the blue data from the world because it’s saved as grayscale values within the texture within the first place. It’s the identical factor while you take a look at such a texture in photoshop

Thanks for the trouble. I admire it very a lot!

“I believe the ultimate outcome you bought on the take a look at nonetheless isn’t right. You continue to exclude the data from the blue channel.”

The blue channel isn’t excluded, the blue cyan sphere develop into yellow with the LUT

Here’s what the LUT seems to be like for a greater understanding

image

Dividing by 3 and including all of the channels is near what Desaturation node do however gained’t be correct for the reason that node use Luminance Components.

Extra particularly, the Desaturation node calculates the grayscale worth of every pixel utilizing the next system: Grayscale Worth = 0.3 * Purple + 0.59 * Inexperienced + 0.11 * Blue .

image



3 Likes

Oh wow. I apologize. I didn’t discover that the blue ones nonetheless seemed okay.
TBH I’m a bit confused now as to what the person channels maintain. How come the blue channel was preserved even with simply the RG masked?

That is attainable as a result of we masks the blue channel solely after the desaturation.
The desaturation convert the Purple Inexperienced and Blue into gray.
Now all the channels (Purple Inexperienced and Blue) comprise the identical worth.
In our case this can be a float(3) so we masks one of many channel to get hold of a float(2) for use in UVs (could possibly be any of them as a result of as soon as once more, they’re the identical)



2 Likes

Thanks quite a bit. That has been very insightful. I wasn’t conscious that desaturation works in that means.

re: desaturation changing all of the channels into the identical gray scale worth, I additionally didn’t know this, nice data on this thread, thanks @Borniol



1 Like

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments