Welcome, Guest.
Username: Password: Remember me

TOPIC: How to load a LUT?

How to load a LUT? 1 year 7 months ago #1

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: 1 year 7 months ago by Fruitrocket.
The administrator has disabled public write access.
The following user(s) said Thank You: Alex_outer, tybalitea

How to load a LUT? 1 year 7 months ago #2

  • tybalitea
  • tybalitea's Avatar
  • Offline
  • Posts: 28
  • Thank you received: 17
I agree this feature needs a little tut :P
The administrator has disabled public write access.

How to load a LUT? 1 year 7 months ago #3

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: 1 year 7 months ago by Fruitrocket.
The administrator has disabled public write access.

How to load a LUT? 1 year 7 months ago #4

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 609
  • Thank you received: 716
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: 1 year 7 months ago by Marty McFly.
The administrator has disabled public write access.
The following user(s) said Thank You: Fruitrocket

How to load a LUT? 1 year 7 months ago #5

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: 1 year 7 months ago by Fruitrocket.
The administrator has disabled public write access.

How to load a LUT? 1 year 7 months ago #6

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 609
  • Thank you received: 716
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 administrator has disabled public write access.
The following user(s) said Thank You: Fruitrocket

How to load a LUT? 1 year 7 months ago #7

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: 1 year 7 months ago by kingeric1992.
The administrator has disabled public write access.
The following user(s) said Thank You: Fruitrocket

How to load a LUT? 1 year 7 months ago #8

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 609
  • Thank you received: 716
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.
The administrator has disabled public write access.

How to load a LUT? 1 year 7 months ago #9

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: 1 year 7 months ago by kingeric1992.
The administrator has disabled public write access.

How to load a LUT? 1 year 7 months ago #10

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: 1 year 7 months ago by Fruitrocket.
The administrator has disabled public write access.

How to load a LUT? 1 year 7 months ago #11

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 609
  • Thank you received: 716
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.
The administrator has disabled public write access.

How to load a LUT? 1 year 5 months ago #12

  • v00d00m4n
  • v00d00m4n's Avatar
  • Offline
  • Posts: 44
  • Thank you received: 3
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 administrator has disabled public write access.
The following user(s) said Thank You: brussell

How to load a LUT? 1 year 5 months ago #13

  • Wicked Sick
  • Wicked Sick's Avatar
  • Offline
  • Die young or suffer (Forgive my poor English)
  • Posts: 360
  • Thank you received: 105
That seems hard... If were you to upload that texture, would others be able to use it as well?
Finding relief somewhere between a tree's branch and its shade.
The administrator has disabled public write access.

How to load a LUT? 1 year 5 months ago #14

  • Kleio420
  • Kleio420's Avatar
  • Offline
  • Posts: 213
  • Thank you received: 28
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.
The administrator has disabled public write access.

How to load a LUT? 1 year 4 months ago #15

  • F D B
  • F D B's Avatar
  • Offline
  • Posts: 23
  • Thank you received: 1
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?
The administrator has disabled public write access.

How to load a LUT? 1 year 4 months ago #16

  • Marty McFly
  • Marty McFly's Avatar
  • Offline
  • We've tried nothing and we're all out of ideas!
  • Posts: 609
  • Thank you received: 716
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.
The administrator has disabled public write access.

How to load a LUT? 1 year 4 months ago #17

  • F D B
  • F D B's Avatar
  • Offline
  • Posts: 23
  • Thank you received: 1
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: 1 year 4 months ago by F D B.
The administrator has disabled public write access.

How to load a LUT? 1 year 4 months ago #18

  • Kleio420
  • Kleio420's Avatar
  • Offline
  • Posts: 213
  • Thank you received: 28
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
The administrator has disabled public write access.

How to load a LUT? 1 year 4 months ago #19

  • F D B
  • F D B's Avatar
  • Offline
  • Posts: 23
  • Thank you received: 1
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.
The administrator has disabled public write access.

How to load a LUT? 1 year 4 months ago #20

there are tutorial on youtube
try these:

The administrator has disabled public write access.
  • Page:
  • 1
  • 2