How to load a LUT?

  • Fruitrocket
  • Topic Author
More
9 years 1 week ago - 9 years 1 week ago #1 by Fruitrocket How to load a LUT? was created by Fruitrocket
It's a very simple question yet there appears to be nothing on it...

I've tried searching the forums but all it brings up is a list of every forum containing the word solution...

Could anybody be so kind as to give me a 'solution'?

Thank you!
Last edit: 9 years 1 week ago by Fruitrocket.
The following user(s) said Thank You: Alex_outer, tybalitea

Please Log in or Create an account to join the conversation.

  • tybalitea
More
9 years 1 week ago #2 by tybalitea Replied by tybalitea on topic How to load a LUT?
I agree this feature needs a little tut :P

Please Log in or Create an account to join the conversation.

  • Fruitrocket
  • Topic Author
More
9 years 1 week ago - 9 years 1 week ago #3 by Fruitrocket Replied by Fruitrocket on topic How to load a LUT?
I'm such an airhead!

I finally figured it out and of course it was so obvious!

Anyways, I'm having a lot of fun with it (finally!), and I'm sorta hoping you geniuses can give me some constructive criticism on my latest adventure?

sfx.thelazy.net/games/preset/3415/

I've spent all day on it and it still doesn't feel right...

Fyi, the reason I made the luts 64x64 is so that I can see them better even though I know it only reads the top row of pixels...

On a side note, Is there any plans to add a function to designate specific areas of a square gradient to low, mid, and high lighting?

Here's what I mean: www.nexusmods.com/newvegas/images/5329/ ?


In any case, thanks Marty McFly for adding this!

[edit]

Doh, I suppose it would help if I supplied my master file for all this:

PTR.psd 46 KB
mega.co.nz/#!cocCSTQL!TlQL7iSUjXyGYA4sHv...W7MI7dwmbdMCOYuUR8vE

Yeah I know it's not that special, but this is what i've been using...I've dabbled in some more complicated setups but the deeper I get the harder it gets...

One person said I should try to compile them within a 3D App...But I have no idea of how to go about that.
Last edit: 9 years 1 week ago by Fruitrocket.

Please Log in or Create an account to join the conversation.

  • Marty McFly
More
9 years 1 week ago - 9 years 1 week ago #4 by Marty McFly Replied by Marty McFly on topic How to load a LUT?
64 is a bit low resolution, use 256 better so it fits the LDR colorspace. Enbseries uses a similar approach with adaptation factor, dark scenes use top row, medium ones use the gradient in the middle and bright ones use the one at the bottom but that would require a smoothed average brightness of screen factor which means using many older frames as info which is slow and not my concern right now.
Last edit: 9 years 1 week ago by Marty McFly.
The following user(s) said Thank You: Fruitrocket

Please Log in or Create an account to join the conversation.

  • Fruitrocket
  • Topic Author
More
9 years 1 week ago - 9 years 1 week ago #5 by Fruitrocket Replied by Fruitrocket on topic How to load a LUT?
Thanks for the insight Mr. McFly!

When it becomes your 'concern' I'll be the first to jump at it...

[edit]

While I have your attention,

I forgot to ask, but does going above a 256 spectrum have any benefits?

If so, what are the limits; could I use - lets say: a gradient that's 65536 pixels long!? :woohoo:

Also, do you have any insight on breakpoints between lights, mid tones, and shadows in terms of percentages?

And is there a way for me to use 16-32bit images?

And when exactly are we going to have self-tying shoes and hover boards?

And and and...I'm such a douche...sorry! :pinch:
Last edit: 9 years 1 week ago by Fruitrocket.

Please Log in or Create an account to join the conversation.

  • Marty McFly
More
9 years 1 week ago #6 by Marty McFly Replied by Marty McFly on topic How to load a LUT?
Doing many adjustments on the palette with Photoshop may lower the color space and produce artifacts so it's always better to use a higher one but more than 512 or 1024 is overkill. ReShades max colorspace for external textures is only RGBA8 so higher textures make no sense. A LUT is meant to operate after tonemapping. Tonemapping is meant to compress HDR input to visible LDR range (you don't see a difference between a brightness of 1 and a brightness of 1000 but tonemapping makes sure you do. But since ReShades input is LDR, you only see how LDR colors are affected by tonemapping). Because of that, a HDR LUT makes no sense and would replace tonemapping (LUT is only a texture based color grading). Internally, we can operate in HDR which is useful for calculations that would lower the colorspace further. Let's say I divide color through 100 I would have a range of RGB 0 to 2.55 which would get rounded to 3. If I render this into a LDR texture I would have only 4 different color tones per channel. If I scale this up again I would still have 4 tones per channel.

About the hoverboards etc: you didn't watch BTTF closely. BTTF 2 explains it: different time lines. Because one dude spilled his drink 25 years ago he altered the time line so we are in a technically retarded time line instead of the one that has already hoverboards and stuff.
The following user(s) said Thank You: Fruitrocket

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
9 years 1 week ago - 9 years 1 week ago #7 by kingeric1992 Replied by kingeric1992 on topic How to load a LUT?
To be clear, LUT stands for Lookup Table.
The idea of using LUT in graphics is to get a new value which depends on the input.

In a 1D LUT, x-axis (horizontal axis) is the input, which has its corresponding output we perceived as color.

Or you can think the LUT as a 1D array: output = LUT [input]

So why is it in 32bit 256 res?

As Marty said, since the final output is in LDR with color range 0~255 (2^8 ), it will need 8bit to represent all different steps per channel. Which means in RGBA , 32bit is required.

Again with LDR output, it would need a "minimum" of 256 size array or 256 res texture to store all the possible output.

Of course with the 32bit float operation in the shader, you can have more then 256 different input to the LUT. While in most of the times, it isn't visible with linear sampler on the LUT texture to estimate output, it can also benefit from using higher res LUT.

As for the 2D LUT, it is used when you have addition info to consider. Like a 2D array: output = LUT [ input1][ input2]
Last edit: 9 years 1 week ago by kingeric1992.
The following user(s) said Thank You: Fruitrocket

Please Log in or Create an account to join the conversation.

  • Marty McFly
More
9 years 1 week ago #8 by Marty McFly Replied by Marty McFly on topic How to load a LUT?
That's also something that is a bit confusing at the beginning: an 8 bit texture has 8 bit per channel so it contains 32 bit of info per pixel (but is no 32 bit texture!). A 16 bit texture has 16 bit per channel and contains 64 bit of info per pixel and a 32 bit texture contains 32 bit per channel and 128 bit overall.

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
9 years 1 week ago - 9 years 1 week ago #9 by kingeric1992 Replied by kingeric1992 on topic How to load a LUT?
Well, I really don't know.

In PS when save to BMP, you get the option to save as 32bit with transparency, or 24bit true color. and the same goes to TGA settings
while 8bit image is most likely refers to R3G3B2 256 color.
Also PS has 8, 16, 32 "Bits/Channel" mode which stands for "bits per channel"

And here is the D3D format msdn.microsoft.com/en-us/library/windows...172558(v=vs.85).aspx

D3DFMT_R8G8B8 24-bit RGB pixel format with 8 bits per channel.
D3DFMT_A8R8G8B8 32-bit ARGB pixel format with alpha, using 8 bits per channel.
that x-bit texture means it can store x-bit of information, which doesn't necessary to be color.

but in DSLR, 16bit often refers to HDR image with 16 bit/channel.

Anyway, for LDR LUT, you only need 8 bits/ channel, or 24-bit color RGB, or 32-bit color RGB with transparency. :P
Last edit: 9 years 1 week ago by kingeric1992.

Please Log in or Create an account to join the conversation.

  • Fruitrocket
  • Topic Author
More
9 years 5 days ago - 9 years 5 days ago #10 by Fruitrocket Replied by Fruitrocket on topic How to load a LUT?
So that's why I'm retarded...
Damn that bastard who spilled his drink!

Does that mean there's a 'smarter me' out there replying like you have to a thread that you made that's just like this one I made?

I think my brain just exploded!

BLeh,

Wouldn't a HDR LUT be the equivalent to downsampling in some sense thus minimizing the artifacting at both higher and lower resolution screens? But then you say there's no input for HDR images...But what confuses me even further is that you say we can 'operate internally' at a higher range of colors so wouldn't that mean there's inputs for hdr color grading that we could potentially take advantage of?

Damn this retarded timeline! lol

We're supposed to have Nervegear by now...

[edit]

You ever see the catnovision video from '99?



You, should work on improving the image quality of that Mr. Mcfly and then figure out a way to reverse the signal! :silly:
Last edit: 9 years 5 days ago by Fruitrocket.

Please Log in or Create an account to join the conversation.

  • Marty McFly
More
9 years 5 days ago #11 by Marty McFly Replied by Marty McFly on topic How to load a LUT?
No, since LUT always operates after tonemapping (no matter if input was HDR or not - after tonemapping it is LDR). Plus the colors in between of the pixels get linearly interpolated (like photoshop does when you increase the image size).

And unlimited different timelines doesn't mean unlimited possibilities, a realm where I don't mod the shit out of every game I have doesn't exist.

Please Log in or Create an account to join the conversation.

  • v00d00m4n
More
8 years 9 months ago #12 by v00d00m4n Replied by v00d00m4n on topic How to load a LUT?
After messing a lot with lut textures I invented almost universal method how to fix colors in most of games to make them look more realistic and natural.

My GTAV lut mod:


Origina GTAVl:


Trick is to make few screenshots, use histogram to control color input and output until you will get almost perfect distribution of colors for all of screenshots, apply it to them, repeat apply on original unmodified lut texture, save it and use in game.

Before I started to use lut texture I wrote HSV control shader to achieve same effect, but manual calibration was pain in ass, then I found I can do that faster and easier just by altering lut texture.

Note: all should be done with linear gamma on screenshots but with calibrated display gamma of 2.2\045
The following user(s) said Thank You: brussell

Please Log in or Create an account to join the conversation.

  • Wicked Sick
More
8 years 9 months ago #13 by Wicked Sick Replied by Wicked Sick on topic How to load a LUT?
That seems hard... If were you to upload that texture, would others be able to use it as well?

Please Log in or Create an account to join the conversation.

  • Kleio420
More
8 years 9 months ago #14 by Kleio420 Replied by Kleio420 on topic How to load a LUT?

v00d00m4n wrote: After messing a lot with lut textures I invented almost universal method how to fix colors in most of games to make them look more realistic and natural.

My GTAV lut mod:


Trick is to make few screenshots, use histogram to control color input and output until you will get almost perfect distribution of colors for all of screenshots, apply it to them, repeat apply on original unmodified lut texture, save it and use in game.

Before I started to use lut texture I wrote HSV control shader to achieve same effect, but manual calibration was pain in ass, then I found I can do that faster and easier just by altering lut texture.

Note: all should be done with linear gamma on screenshots but with calibrated display gamma of 2.2\045


imo if you could breifly explain in a post how to do this in photoshop its better then just posting your texture for a game , and it wouldnt be great on all displays not everyone has the same calibration as the guy above them posting ;P.

Please Log in or Create an account to join the conversation.

  • F D B
More
8 years 9 months ago #15 by F D B Replied by F D B on topic How to load a LUT?
Hey Marty!

I'm using your lastest MasterEffect release.
When I enable LUT, I get this message:

ReShade.fx(2917, 44): error X3004: undeclared identifier 'fLookupTableMix'

And this is that line it's pointing to in ReShade.FX

color.xyz = lerp(color.xyz, LUTcolor.xyz, fLookupTableMix);


How can I fix it?

Please Log in or Create an account to join the conversation.

  • Marty McFly
More
8 years 9 months ago #16 by Marty McFly Replied by Marty McFly on topic How to load a LUT?
How is the value named in the config file? Can't check atm - mobile. If it is called any different, substitute the variable in the line 2917 with this name. I might have made a typo.

Please Log in or Create an account to join the conversation.

  • F D B
More
8 years 9 months ago - 8 years 9 months ago #17 by F D B Replied by F D B on topic How to load a LUT?
Forget about it, I figured it out... I'm so stupid.

Is there any way to take an ingame screenshot and then apply a LUT in Photoshop that you can use in ME to check exactly how it would look, while you can edit it until you get what you want and then export it?
Last edit: 8 years 9 months ago by F D B.

Please Log in or Create an account to join the conversation.

  • Kleio420
More
8 years 9 months ago #18 by Kleio420 Replied by Kleio420 on topic How to load a LUT?

F D B wrote: Forget about it, I figured it out... I'm so stupid.

Is there any way to take an ingame screenshot and then apply a LUT in Photoshop that you can use in ME to check exactly how it would look, while you can edit it until you get what you want and then export it?

yea print screen button will do that it will be in the same directory reshade dll files are in

Please Log in or Create an account to join the conversation.

  • F D B
More
8 years 9 months ago #19 by F D B Replied by F D B on topic How to load a LUT?
What I meant is if there's anyway to create a LUT in Photoshop that can be then loaded in MasterEffect, so I can see how it'll actually look for real.

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
8 years 9 months ago #20 by kingeric1992 Replied by kingeric1992 on topic How to load a LUT?
there are tutorial on youtube
try these:

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.