Page 1 of 1

Cinematic Black Bars with standard ENBseries - possible?

Posted: 08 Aug 2013, 13:24
by LargeStyle
Simply put I can't stand to play Skyrim without the cinematic black bars that come along when using the 2.35:1 aspect ratio, and these bars are obviously already present in some ENB presets - in particular within the enbeffect.fx file. Now I'm currently making my own ENB prest and I've tried using different enbeffect.fx files that contain the black bars from two other presets - Pineapple ENB (which uses HD6 code) and Unreal Cinema (which uses HD6 plus various additional code).

The problem is that the Pineapple ENB enbeffect.fx has too much unwanted code present and it acts in ways that I basically don't understand (at night times / interiors) despite many hours of editing, and the Unreal Cinema ENBs file causes a noticable fps drop for me. So as I'm perfectly happy with the standard ENB files for now, I'd like to know how or if I can have the black bars with these files - but I'm stuck. I don't know HLSL code and can only apply some basic attempts to emulate the way the .fx files appear operate, but so far nothings worked. It seems simply copying and pasting other sections of code is not as straight forward as it seems. I've tried manipulating the vignette effect within SweetFX, and I managed to get the black bars working perfectly apart from some graphical errors were occurring within the black bars themselves - so this doesn't seem to be an option.

So can someone please help me with applying the black bars code to a standard ENBseries enbeffect.fx file please? FYI: I'm using ENB v0.200.

FYI: I've made a thread on Nexus forums (mod discussion) as well, which also includes all the code from the 3 enbeffect.fx files mentioned in case anyone wants to view the code...

Thanks in advance.

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 08 Aug 2013, 13:49
by --JawZ--
Here are a couple of different black bars methods out there;

Code: Select all

#define HD6_VIGNETTE			1

------------------------------------------------

#if (HD6_VIGNETTE==1)

//EXTERIOR							Night, Day
float2 VignetteRoundExt		= float2( 0.4, 0.4 ); // Determines how round the vignette should be.
float2 VignetteSquareTopExt	= float2( 0.0, 0.0 ); // Determines how square the vignette should be. Adjusts the top of the screen
float2 VignetteSquareBotExt	= float2( 0.1, 0.1 ); // Determines how square the vignette should be. Adjusts the bottom of the screen
float2 VignetteSatExt		= float2( 0.85, 0.85 ); // Determines how saturated the vignette should be.
float2 VignetteContrastExt	= float2( 1.5, 1.5 ); // Determines how much contrast the vignette should have.
float2 VignetteStrengthExt	= float2( 0.2, 1.0 ); // Determines how strong the vignette should be depending on time of day.

//INTERIOR							Night, Day
float2 VignetteRoundInt		= float2( 0.4, 0.4 );
float2 VignetteSquareTopInt	= float2( 0.0, 0.0 );
float2 VignetteSquareBotInt	= float2( 0.1, 0.1 );
float2 VignetteSatInt		= float2( 0.85, 0.85 );
float2 VignetteContrastInt	= float2( 1.5, 1.5 );
float2 VignetteStrengthInt	= float2( 0.2, 1.0 );
#endif

------------------------------------------------

#if (HD6_VIGNETTE==1)	

		float3 	rovigpwr = lerp(VignetteRoundExt.x, VignetteRoundExt.y, ENightDayFactor);
		float3 	sqtoppwr = lerp(VignetteSquareTopExt.x, VignetteSquareTopExt.y, ENightDayFactor);
		float3 	sqbotpwr = lerp(VignetteSquareBotExt.x, VignetteSquareBotExt.y, ENightDayFactor);
		float 	vsatstrength = lerp(VignetteSatExt.x, VignetteSatExt.y, ENightDayFactor);
		float 	vignettepow = lerp(VignetteContrastExt.x, VignetteContrastExt.y, ENightDayFactor);
		float 	vstrength = lerp(VignetteStrengthExt.x, VignetteStrengthExt.y, ENightDayFactor);
	if ( EInteriorFactor ) {
		rovigpwr = lerp(VignetteRoundInt.x, VignetteRoundInt.y, ENightDayFactor);
		sqtoppwr = lerp(VignetteSquareTopInt.x, VignetteSquareTopInt.y, ENightDayFactor);
		sqbotpwr = lerp(VignetteSquareBotInt.x, VignetteSquareBotInt.y, ENightDayFactor);
		vsatstrength = lerp(VignetteSatInt.x, VignetteSatInt.y, ENightDayFactor);
		vignettepow = lerp(VignetteContrastInt.x, VignetteContrastInt.y, ENightDayFactor);
		vstrength = lerp(VignetteStrengthInt.x, VignetteStrengthInt.y, ENightDayFactor);
	};

	float2 inTex = _v0;	
	float4 voriginal = r1;
	float4 vcolor = voriginal;
	vcolor.xyz=1;
	inTex -= 0.5; // Centers vignette
	inTex.y += 0.01; // Move it off center and up so it obscures sky less
	float vignette = 1.0 - dot( inTex, inTex );
	vcolor *= pow( vignette, vignettepow );

 // Round Vignette
	float4 rvigtex = vcolor;
	rvigtex.xyz = pow( vcolor, 1 );
	rvigtex.xyz = lerp(float3(0.5, 0.5, 0.5), rvigtex.xyz, 2.0); // Increase Contrast
	rvigtex.xyz = lerp(float3(1,1,1),rvigtex.xyz,rovigpwr); // Set strength of round vignette

 // Square Vignette (just top and bottom of screen)
	float4 vigtex = vcolor;
	vcolor.xyz = float3(1,1,1);
	float3 topv = min((inTex.y+0.5)*2,0.5) * 2; // Top vignette
	float3 botv = min(((0-inTex.y)+0.5)*2,0.5) * 2; // Bottom vignette

	topv= lerp(float3(1,1,1), topv, sqtoppwr.x);
	botv= lerp(float3(1,1,1), botv, sqbotpwr.y);
	vigtex.xyz = (topv)*(botv);

 // Add round and square together
	vigtex.xyz*=rvigtex.xyz; 
	vigtex.xyz = lerp(vigtex.xyz,float3(1,1,1),(1-vstrength)); // Alter Strength at night

	vigtex.xyz = min(vigtex.xyz,1);
	vigtex.xyz = max(vigtex.xyz,0);

 // Increase saturation where edges were darkenned
	float3 vtintensity = dot(color.xyz, float3(0.2125, 0.7154, 0.0721));
	color.xyz = lerp(vtintensity, color.xyz, ((((1-(vigtex.xyz*2))+2)-1)*vsatstrength)+1  );

	color.xyz *= (vigtex.xyz);
#endif
MTichenor's - ENB Evolved letterbox bars

Code: Select all

#define LETTERBOX_BARS		0	// Enable cinematic bars (black bars at top and bottom).

------------------------------------------------

#if (LETTERBOX_BARS==1)

float fLetterboxBarHeight = 0.1;      	// Controls the height of cinematic bars. Default: 0.1.
#endif

------------------------------------------------

#if (LETTERBOX_BARS==1)
	if( IN.txcoord0.y > 1.0 - fLetterboxBarHeight || IN.txcoord0.y  < fLetterboxBarHeight )
	{
		return _c6;
	}
#endif
Matso's Letterbox bars

Code: Select all

#define LETTERBOX_BARS		0	// Enable Matso's cinematic bars (black bars at top and bottom).

------------------------------------------------

#if (LETTERBOX_BARS==1)

float fLetterboxOffset = 8.0;							 // size of screen to be blacken (in %)
float2 fvTexelSize = float2(1.0 / 1920.0, 1.0 / 1080.0); // Enter you're display resolution here.
#endif

------------------------------------------------

#if (LETTERBOX_BARS==1)
	float offset = fLetterboxOffset * 0.01;
	float2 sspos = fvTexelSize * vPos;
	if (sspos.y <= offset || sspos.y >= (1.0 - offset)) _oC0.rgb = 0.0;
#endif


Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 08 Aug 2013, 14:38
by LargeStyle
Thanks JawZ...but how and / or where do I put these lines of code into the standard 0.200 enbeffect.fx? I've tried copying and pasting code over before and it didn't work (like I said, I don't know coding).

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 08 Aug 2013, 14:57
by --JawZ--
HD6;

Code: Select all

At the top with the APPLYGAMECOLORCORRECTION

------------------------------------------------

At the top where you tweak the PP methods

------------------------------------------------¨

Above the PP methods code, Search for the line POSTPROCESS=1 and put the HD6_VIGNETTE CODE ABOVE IT.
                                               ¯¯¯¯¯¯¯¯¯¯¯¯¯

MTichenor's;

Code: Select all

At the top with the APPLYGAMECOLORCORRECTION

------------------------------------------------

At the top where you tweak the PP methods

------------------------------------------------¨

Search for this line float4 r11; and place the LETTERBOX_BARS code under it and above this line float4 _v0=0.0;
                     ¯¯¯¯¯¯¯¯¯¯¯                                                                ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
MATSO's;

Code: Select all

At the top with the APPLYGAMECOLORCORRECTION

------------------------------------------------

At the top where you tweak the PP methods

------------------------------------------------¨

Search for this line _oC0.xyz=color.xyz; and place the LETTERBOX_BARS code under it and above this line return _oC0;
                     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯                                                                 ¯¯¯¯¯¯¯¯¯¯¯

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 08 Aug 2013, 19:17
by LargeStyle
Thank you so much JawZ - the Matso code worked first time!

I obviously had to change "#define LETTERBOX_BARS 0" to 1 and also set "float fLetterboxOffset = 8.0;" to 13 to increase bar size - but it's all working now. I really can't tell you enough how I much I appreciate your help - it's meant that I can start building my own ENB preset from scratch now, and that means a lot to me.

Thanks again.

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 09 Aug 2013, 00:00
by --JawZ--
You are welcome :)

Yeah obviously ;) But also if you have another resolution that should be changed to the same as the one you are running with, I myself find 8.0 to be a good value when you want to take a cinematic framed shoot, but that's me and we all got different tastes now don't we ;)

Maybe you can find something useful in my guide parts I have uploaded at the nexus as well, link is in my signature below.

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 09 Aug 2013, 08:52
by LargeStyle
I've actually been working with ENB quite heavily since GTA 4 - so a few years now. I'm very comfortable editing existing ENB files, just not changing code itself!

That said I've just read your 2 PDFs and the information is great. My only query here is SSAO range - you suggest rather low values whereas I use what seems to be the maximun (3.0) as I want the AO to react as realistically as possible with the biggest range possible. Obviously other SSAO values have to be changed to compensate for the change in range but in my opinion my SSAO code looks great. But as you said - we all have different tastes.

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 09 Aug 2013, 09:03
by --JawZ--
Ah didn't know that, but part 2 has a section about some coding in it, very basic stuff though.

Well the range also reduce the performance with higher values as well as creating an aura when using a high value. So from a immersive game play perspective lower values are better from my experience, kind off of putting when you have the weapons drawn in 1st person view and seeing the IL aura being cast on the wall in a dungeon or even worse in an ice cave.

This is what I think most players want, an improved visual immersion into the game and that is what I will go by with the guide but I also encourage guide users to experiment to get their own impression and experience on what each things does and what is the best settings for them to use.
As you said everyone got their own tastes and creating something that looks good for everyone is impossible, the same thing goes for recommandations.

Re: Cinematic Black Bars with standard ENBseries - possible?

Posted: 03 Sep 2013, 13:44
by insomnia_jt
Edit: deleted.