"Filmic Tone mapping" HDR possible in (Skyrim) ENB?

share shaders here
  • Author
  • Message
Offline
User avatar
*master*
Posts: 137
Joined: 23 Jun 2013, 18:14
Location: IOWA

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

Would it be possible to write a custom Filmic Tonemapping shader file for Sweetfx?
_________________
i7-3770K Ivy Bridge OC@4.6GHz - ASUS Maximus V EXTREME - CORSAIR Vengeance 32GB @1600Mhz - 2x Nvidia GTX 980 SLI - OCZ Vertex 460GB SSD

Offline
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

For sure, I already did this quite a while ago, for SweetFX 1.2, if I'm right.

Offline
User avatar
*master*
Posts: 119
Joined: 05 Jan 2012, 22:34
Location: France

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

I don't get it, why do you want to tone map... an already tonemapped image? o.o

Offline
User avatar
*master*
Posts: 137
Joined: 23 Jun 2013, 18:14
Location: IOWA

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

Would anyone be willing to whip me up a filmic tone mapping shader file for Sweetfx, and if possible with parameters I can modify via the sweetfxsettings.txt file?

I would do it myself, however coding shaders is outside my skill set.. I am willing to learn though if someone can get me on the right track..

If there is anything I can do in return I sure will.

I want to use this on ESO, Skyrim as well; I have Sweetfx 1.4 working with ESO and would like to experiment with filmic tone mapping vs the default included with SweetFX..
_________________
i7-3770K Ivy Bridge OC@4.6GHz - ASUS Maximus V EXTREME - CORSAIR Vengeance 32GB @1600Mhz - 2x Nvidia GTX 980 SLI - OCZ Vertex 460GB SSD

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

Yes why would you use proper tonemapping on an image... Maybe because of this?

ImageReyda by Diethardt, on Flickr

ImageForest Guardian by Myloween, on Flickr

ImageWild Hunt - Serenity 5.0 by wolfgrimdark, on Flickr

ImageTESV.exe_DX9_20140426_223414 by prod80_, on Flickr

Millions of other examples.

Anyway almost all enbeffect.fx files contain tonemapping. Even if it's the simplest form of Reinhard's formula; x = x / ( x + 1 )

And if you look at it in very simple terms, even doing simple operations as x = pow( x, y ) or x = x * y already map the input to another output.

So what do you do in your pixel shader? Using ENB default files? Then you already have tonemapping inside.

djuplift

Have a look at Serenity ENB files or Skylight ENB files. Both have FIlmic tonemapping code inside. Then use SweetFX template presets to port the code over. Credits for the code belong to John Hable (UNCHARTED 2)

Offline
User avatar
*master*
Posts: 137
Joined: 23 Jun 2013, 18:14
Location: IOWA

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

So how would I port that code over to a SweetFX shader file?

Edit.. NVM just re read your post...
_________________
i7-3770K Ivy Bridge OC@4.6GHz - ASUS Maximus V EXTREME - CORSAIR Vengeance 32GB @1600Mhz - 2x Nvidia GTX 980 SLI - OCZ Vertex 460GB SSD

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

djuplift wrote:So how would I port that code over to a SweetFX shader file?

Edit.. NVM just re read your post...


Here's the code, cleaned up for SweetFX, since it doesn't know Interior, Exterior day/night

This needs to be added to activate it

Code: Select all

#define USE_FILMIC           0 //[0 or 1] Filmic Tonemapping

This would go into the SweetFX settings txt under the settings which you need to write

Code: Select all

#define ShoulderStrength	1.00	//[0.00 - 2.00]
#define LinearStrength	1.00	//[0.00 - 5.00]
#define LinearAngle	0.50	//[0.00 - 1.00]
#define ToeStrength	1.00	//[0.00 - 2.00]
#define ToeNumerator	0.25	//[0.00 - 0.50]
#define ToeDenominator	1.00	//[0.00 - 2.00]
#define LinearWhite	11.2	//[0.00 - 20.00]

This is what should go into the shader .h file

Code: Select all

float4 Filmic( float4 colorInput )
{
float4 oricol = colorInput;
float3 Q = oricol.xyz;

float A = float(ShoulderStrength);
float B = float(LinearStrength);
float C = float(LinearAngle);
float D = float(ToeStrength);
float E = float(ToeNumerator);
float F = float(ToeDenominator);
float W = float(LinearWhite);

float3 numerator = ((Q*(A*Q+C*B)+D*E)/(Q*(A*Q+B)+D*F)) - E/F;     
float3 denominator = ((W*(A*W+C*B)+D*E)/(W*(A*W+B)+D*F)) - E/F;

oricol.xyz = numerator / denominator;
return oricol;
}
Then you still need to include it in the Main.h file in the right place so it's actually used, right here;

Code: Select all

#if (USE_TONEMAP == 1)
  #include "Tonemap.h"
#endif

#if (USE_FILMIC == 1)
  #include "Filmic.h"   //Or any other shader name (.h file) you created
#endif

#if (USE_SEPIA == 1)
  #include "Sepia.h"
#endif
Of course you shouldnt use both Tonemap functions at the same time.

PS. It will be a living hell to set it up without GUI, especially when an ENB is used together with SweetFX... even changes of 0.001 can be seen on things like Toe Numerator. Not so sure if it's a good idea in SweetFX, but have a blast. IMO much better to use on ENB, just disable all effects and use only color processing, which has an extremely minimal impact on performance and gets you better results than SweetFX.
Last edited by prod80 on 28 Apr 2014, 10:04, edited 1 time in total.

Offline
User avatar
*master*
Posts: 137
Joined: 23 Jun 2013, 18:14
Location: IOWA

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

Thanks man...

I am just curious about the differences in it from other tone map settings etc... Also wanna see what I can do with ESO..

IF you play: http://www.gamemodi.net/
_________________
i7-3770K Ivy Bridge OC@4.6GHz - ASUS Maximus V EXTREME - CORSAIR Vengeance 32GB @1600Mhz - 2x Nvidia GTX 980 SLI - OCZ Vertex 460GB SSD

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

djuplift wrote:IF you play: http://www.gamemodi.net/
The before shots are WAY better than the after shots IMO.. I mean, seriously

This has atmosphere, feelings, depth
Image

This just looks cheap and silly... no depth, flat and emotionless
Image

I won't even metion the other screenshot comparison....

But opinions may differ, anyway someone starting like "keep me interested donate here" immediately puts me off.

Offline
User avatar
*master*
Posts: 137
Joined: 23 Jun 2013, 18:14
Location: IOWA

Re: "Filmic Tone mapping" HDR possible in (Skyrim) ENB?

Oh yeah fuck his preset lol....

I just want the ability to use sweetFX without Radeon pro (which is the way people got it to work initially)

Also using that launcher you can modify the texture settings in the game engine among other things..

He cuts the fog out, no idea why..
_________________
i7-3770K Ivy Bridge OC@4.6GHz - ASUS Maximus V EXTREME - CORSAIR Vengeance 32GB @1600Mhz - 2x Nvidia GTX 980 SLI - OCZ Vertex 460GB SSD
Post Reply