Oblivion Graphics Extender, Thread 14

Post » Fri Feb 18, 2011 8:18 pm

Oblivion Graphics Extender

This thread is a catch-all discussion for anything related to the Oblivion Graphics Extender (OBGE).
Previous Threads: http://www.gamesas.com/index.php?showtopic=1072753, http://www.gamesas.com/index.php?showtopic=1074452, http://www.gamesas.com/index.php?showtopic=1076282, http://www.gamesas.com/index.php?showtopic=1078966, http://www.gamesas.com/index.php?showtopic=1080264, http://www.gamesas.com/index.php?showtopic=1082970


What is it?

The Oblivion Graphics Extender is an OBSE plugin created by Timeslip that adds extra functionality to Oblivion's scripting language, focussed on the implementation and manipulation of graphics effects. It adds support for fullscreen shaders and extra HUD elements, provides information about graphics memory and screen resolution and allows you to clear some of oblivions textures from graphics memory.

You can get OBGE http://timeslip.users.sourceforge.net/obge.html. The original was found to sometimes cause a crash on transition, and an attempt to fix this was made, in the form of a debugged version, found http://www.tesnexus.com/downloads/file.php?id=25912.


What uses it?

A number of mods take advantage of OBGE for their effects. These include:

http://www.tesnexus.com/downloads/file.php?id=16323
http://www.tesnexus.com/downloads/file.php?id=21424
http://www.tesnexus.com/downloads/file.php?id=27972
http://www.tesnexus.com/downloads/file.php?id=18385


Oblivion Visual Effects Project (OVEP)

This was a project started by IlmrynAkios that was dedicated to making Oblivion look better using various filters and low-level DirectX tricks, utilising OBGE for its effects. It spurred the discussion on the improvement of various areas of Oblivion's graphics, leading to a few released mods and some affiliated mods, proposed as part of the project but developed separately, being released. These are:

http://www.tesnexus.com/downloads/file.php?id=14339
http://www.tesnexus.com/downloads/file.php?id=15245
http://www.tesnexus.com/downloads/file.php?id=15566

The project is currently on haitus as various difficulties in its progression occurred, and IlmrynAkios found that his time available for work on it was becoming very limited.


Oblivion Graphics Extender (The Reboot)


What is it?

Sharing the same name as the plugin that first let modders change the game's graphical effects, OGE is a continuation of the effort started by OVEP to improve Oblivion's graphics. It is centred around Scanti's work on exposing more information about Oblivion's graphical processes, and the use of this information to create post-processing effects.

Scanti has recently begun work on rewriting OBGE to incorporate the new information exposed, and fixing bugs in the original. This rewrite is entitled OBGEv2, and that is what this project is based on, and what is available for download below. The original OBGE should not be used alongside OBGEv2, which is backwards-compatible with OBGE mods.

While it is still in its EARLY stages, the dedicated modders that make up this project are working hard to bring a new age to Oblivion. If you would like to contribute, please feel free to participate in the sharing of knowledge and ideas to help us strive to complete our goal. If you are able to find useful resources that can benefit the project, please feel free to share them as well.

Please respect the hard working people that take their time to bring this project together. This project is in a Beta Phase, and will probably remain in that state as Scanti continues to add new things to his plugin. Expect bugs when using newly created shaders, or when using/tweaking the shaders on your own.

*Attention*
If you are having any problems, please read the OP and the FAQ very carefully before posting. If your question is not answered, then report the bug as detailed in the 'How To Report Bugs Helpfully' section below.



Downloads

Pre-requisites:
http://obse.silverlock.org/ - v0018 is required.
http://www.microsoft.com/downloads/details.aspx?familyid=0CEF8180-E94A-4F56-B157-5AB8109CB4F5&displaylang=en

http://www.tesnexus.com/downloads/file.php?id=30054
http://github.com/scanti/Oblivion-Graphics-Extender-v2

Also available are a few heavily-WIP shaders that are not ready for general distribution:

http://cid-465896b69b9940e8.skydrive.live.com/self.aspx/Public/ENBColorEffect.fx
http://www.4shared.com/file/256477656/f5dc38b5/Colorgrading_Alpha.html


Screenshots/Videos

See the Nexus page for screenshots and videos of the effects currently available. The effects seen in some of these screenshots/videos may have been obtained by tweaking the variables in the shaders involved.


Shaders

Most of the project's shaders are now included in Scanti's OBGEv2 package at the Nexus page. Any newer or updated shaders are also available as separate downloads from the same location. The currently available shaders are:

CelShader+EdgeAA Shader (v0.3) - (CelShader+EdgeAA.fx)
- By shadeMe. Adds a cartoon-like black edge to objects, as seen in Borderlands, or smooths the edges of objects.

Color Effects Shader (v5) - (ColorEffects.fx)
- By WrinklyNinja. Adds a variety of photoshop-like colour effects, including luminosity-dependent film grain, sepia, saturation/contrast/brightness alteration, gamma contrast/brightness alteration, colour inversion and blur highlighting.

Color Grading Shader - (HLSLColorGrading.fx)
- By vtastek. Tints the screen with the most common colour, and decreases saturation of that colour.

Crysis Color Mood Shader (v0.2) - (ColorMood.fx)
- By shadeMe. Tints the screen to alter the mood of the game, as seen in Crysis.

Depth of Field Shader (v6) - (DepthOfField.fx)
- By WrinklyNinja. Progressively blurs objects with increasing distance from the focus point (default at screen centre), or with increasing distance from the player.

ENB Color Effect Shader - (ENBColorEffect.fx)
- By WrinklyNinja. A port of ENBSeries' colour shader to OBGEv2.

Godrays Shader (v4) - (rename .fx file to Godrays.fx)
- By vtastek. Adds shafts of light emanating from the sun. The effect is only seen at certain times of the day.

Screen Space Ambient Occlusion (SSAO) Shader - (ssao_test.fx)
- By HawkleyFox. Uses stylised lighting to add depth and contrast to the scene. Has a large performance hit.

Screen Space Ambient Occlusion (SSAO) Performance Shader - (ssao_perf.fx)
- By HawkleyFox. A less accurate but much better performance version of the above shader.

Sharpening Shader - (obsharpen.fx)
- By vtastek. Sharpens the screen.

Version numbers are taken from the version numbers within each shader file, and may not be indicative of relative quality.


Installation/Usage

From the Nexus page, download the OBGEv2 package, the Support Plugin, and any updated shaders there.

To install everything, use the following procedure:

1. If you have obge.dll or DepthTest.dll in your Data/OBSE/plugins folder, remove them.
2. Decompress the downloaded packages using 7-zip or any compatible alternative.
3. Move the data directory in the OBGEv2 package to your Oblivion directory. Answer yes to any merge or overwrite prompts.
4. Move the data directory in the Shader Pack to your Oblivion directory. Answer yes to any merge or overwrite prompts.
5. Move the contents of the Support Plugin package to your Oblivion/Data directory. Answer yes to any merge or overwrite prompts.
6. Copy any additional shaders' .fx files to your Oblivion/Data/Shaders directory, answering yes to any overwrite prompts.
7. Activate the Oblivion Graphics Extender Support.esp in the mod loader of your choice.

Using the Support plugin:

The support plugin allows you to toggle individual shaders on and off, and tweak their variables, in-game. To use it, activate the misc. item in your Inventory screen, and exit the inventory to see the configuration menu.

. Clicking a shader with the control key held down will deactivate it, while clicking a shader with the shift key held down will activate it.
. Clicking on a shader will bring you to another menu from which you can select a variable to alter.
. Once you have selected a variable, you will be brought to an input box which shall specify the type of variable, give some information on usage of the variable, and allow you to enter in a new value for that variable.

The support plugin will currently allow you to toggle the following shaders:
CelShader+EdgeAA*
Depth of Field*
Color Effects*
Crysis Color Mood*
Sharpening
Screen Space Ambient Occlusion (SSAO)
Screen Space Ambient Occlusion (SSAO) Performance
Godrays*

* - These shaders also support variable alteration. The others do not yet support it.

*Note*
If a shader is not listed in the above list, it will be nescessary to load it via the shaderlist.txt. To do so, open the shaderlist.txt file in your Data/Shaders folder, and add to it the name of the shader file that is not included in the support plugin's menu. Make sure to spell it exactly, and include the .fx extension. The shaders need a specific load order when they are entered into your shaderlist.txt, and it is as follows:

-SSAO
-Depth Of Field
-Godrays
-CelShader+EdgeAA
-Any other shaders available

DO NOT list non-OGE shaders (that is, any shaders that are not listed in the above 'Shaders' section) in your shaderlist.txt. Doing so may break the mod using that shader's effects.



How To Report Bugs Helpfully

Read the OP, especially the FAQs. If your problem is not answered there, do the following:

Supply the following:
- Your Operating System.
- Your graphics card.
- Your OBGEv2.txt. This log is in your Oblivion directory.
- Your OBSE.txt. This log is in your Oblivion directory.
- Your shaderlist.txt.

The above documents should be posted exactly how they appear in the file, in codebox tags.

In addition, if what you are experiencing is a graphical bug of some kind, you should supply screenshots. It has been noted that Oblivion's screenshot function may not work with OBGEv2 installed, so in that case use FRAPS or some other 3rd party screenshot tool. You can convert the image from .bmp to .jpg in Wrye Bash. Upload the screenshot and post a link to it, so we can see what your problem actually looks like.

If your bug is with a shader effect, and you have altered any variables within the shader, also post the lines on which you changed anything, exactly how they are in the shader, in codebox tags.

We can't really help all that well without the above information, as especially with graphical errors, it can hard to describe them in writing in a way that we will be able to understand what's going on.


F.A.Q.

Q: Is this a RELz? Should I download this?
A: The project has recently experienced its first Beta (and hopefully stable) release. It will always be a work in progress and could contain bugs
from time to time. If the thought of this scares you then this probably isn't the mod for you.

Most shaders are supplied with no documentation of any sort besides what is on this thread. Hence there is an element of DIY involved in using the products of this project, especially when it comes to tweaking the settings of the shaders. Within each shader effects file there may or may not be a section at the beginning of the file detailing any variables that you can change, and what they do. You are advised to check there before posting if you wish to tweak any shaders.

Q: Does OGE require any specific hardware to run?
A: The shaders are compatible with both ATI and NVIDIA graphics cards, although the Godrays, Depth Of Field and Color Effects shaders require a Shader Model 3 compliant graphics card to run. Any NVIDIA graphics card that is GeForce 6 Series (released 2004) or newer supports Shader Model 3.0. Any ATI graphics card that is Radeon X1000 Series (released 2005) or newer supports Shader Model 3.0.

Q: How do I get involved with this project?
A: There are a few ways that you can get involved:

If you can write shader code, then you can get stuck in making your own effects right away. The shaders can be written in either HLSL or ASM.

If you can write in C/C++, then perhaps you would be able to help Scanti in his work on the OBSE plugin. There is a github respositary so you can fairly easily create a fork and add your own changes. It would also be beneficial if you know anything about low-level DirectX and the OBSE plugin system. The respositary also allows you to create your own wiki pages for the project, which anyone who can is more than welcome to do.

If you can't do either of these things, you can still contribute support, articles and papers on graphical effects that could be implemented in Oblivion, and whatever else you can bring to the project. Especially cake or ice cream. :cake: :icecream:

Q: I found a bug...
A: Good for you. If you find a bug, please reported as detailed in the 'How To Report Bugs Helpfully' section above. We can help you more when you explain the problem better.

Q: I cannot see an effect I have installed, and my OBGEv2 log has the line "Failed to load" after the line "Loading shader ()". How do I fix this?
A: This results from OBGEv2's inability to compile the shader effects you are trying to load. Make sure that you spell the names of the shaders in your shaderlist.txt EXACTLY as they should be, with the .fx extension, and you have the DirectX update linked to above installed. In the case of some effects, you must also have a graphics card that is Shader Model 3 compliant.

Q: The ordering of the objects on the screen is messed up! Why is this happening?
Q: Once I got the effects to work, my AA disappeared? WHY?!?

A: The method used to expose the information used to read the depth buffer is incompatible with Anti-Aliasing. This is
reported to be the case on both ATI and NVIDIA graphics cards. The only solution is to edit the obge.ini file in your
My Documents\My Games\Oblivion folder and change this line:

[DepthBuffer]
bUseDepthBuffer=1

to:

[DepthBuffer]
bUseDepthBuffer=0

This will however cause any effect that uses the depth buffer to stop working properly. This currently includes the SSAO (both versions), Depth of Field, Godrays and CelShader+EdgeAA shaders.

Q: A shader is listed saying it has multiple effects. What does that mean?
A: If a shader has multiple effects, it means that it rolls many effects into one file, and gives you the ability to choose which of these effects, or combinations of these effects, are applied to your game. This has the advantage that you can cut down on the number of shader files you have to keep track of. You will generally be able to make these selections by changing variables in the shader.

Q: How do I change/tweak shader settings/variables?

A: Open up the shader .fx file in a text editor such as Notepad. The variables are found at the beginning of the file, and may be labelled as tweakable and/or commented with information regarding them.

Alternatively, you can alter most shaders' variables in-game using the Support Plugin, though these changes are not recorded in the shader file.

Q: My Godrays is just a searchlight in clear weather.
A: Godrays are best displayed in cloudy weather types, from 6 to 8 in the mornings and evenings. However, if you get the searchlight effect, you have to edit the shader's FOV setting to match your ingame FOV. Example would be if your playing Oblivion on a 95 FOV, you have to edit your Godrays to a 95 FOV. To edit the shader, change the value of "#define fov", near the beginning of the file, to the value of your FOV.

Q: Why do objects in the distant have weird black stuff on them when fog weather is active?
Q: Using the SSAO shader does weird things to stuff underwater. What gives?
A: This is an unintended side effect of the SSAO effect. It occurs because the SSAO shader applies its effect regardless of the presence of fog, which would otherwise hide it. This can only be fixed when information about fog distances becomes available to the shader, until which time the bug is remain.

Q: SSAO demolishes my FPS; any ideas?
A: First, try the SSAO Performance shader, which has a slightly lower quality effect, but a great reduction in performance hit over the full SSAO shader. The easiest way to improve your frame rate while using the full SSAO shader is to reduce the sample size, and correspondingly increase the sample area. BDBB recommended values of:
ssao_sample_size = 1
ssao_sampling_area = 9.2

Q: Can the SSAO shader be optimised any more?
A: It is not possible to optimise the shader any further without access to information about the surface normals from the graphics renderer. As it is, the shader has to work these out from scratch, and this is what reduces performance the most.

Q: How do I get the EdgeAA effect?
A: The EdgeAA effect is part of the Edge Detection shader, to enable the effect change the following variables as shown:
flgEdgeMask = 0;
flgEdgeAA = 1;

Q: Where is the src folder with the source code?
A: Scanti has set up a GitHub repositary. That means you will always have access to the latest version of his code and people can contribute their own code to the project. The site is linked to above in the 'Downloads' section.
User avatar
Kay O'Hara
 
Posts: 3366
Joined: Sun Jan 14, 2007 8:04 pm

Post » Sat Feb 19, 2011 9:17 am

I'm just asking this again, as it's probably been missed :)

I've got myself a problem here. I've just installed the mod, I installed all the packages. But when I try to activate the shaders in my game, nothing happens. I'm going into the Cobl options menu, and I hold down shift, and click on one of the shaders. Nothing changes. I don't know if there's supposed to be a plus symbol instead of a minus symbol, because it doesn't do that. And nothing in my graphics changes either. So what can I do about this?
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Sat Feb 19, 2011 7:31 am

I'm just asking this again, as it's probably been missed :)

I've got myself a problem here. I've just installed the mod, I installed all the packages. But when I try to activate the shaders in my game, nothing happens. I'm going into the Cobl options menu, and I hold down shift, and click on one of the shaders. Nothing changes. I don't know if there's supposed to be a plus symbol instead of a minus symbol, because it doesn't do that. And nothing in my graphics changes either. So what can I do about this?


Are you using OBSE v18 beta 6? I think the support plugin requires that version.
User avatar
Benji
 
Posts: 3447
Joined: Tue May 15, 2007 11:58 pm

Post » Fri Feb 18, 2011 8:44 pm

Copying my idea from the previous thread: is it possible to make SSAO filter sample depth at the pixel being shaded and do not apply the effect if the value exceeds some reasonably small threshold? That way objects would not shade surfaces that are not immediately adjacent to them (and thus cannot possibly be overshadowed by them in most cases).
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Sat Feb 19, 2011 7:39 am

Are you using OBSE v18 beta 6? I think the support plugin requires that version.


Yep, I am using that one for sure this time :P

Ehh, I'm gonna recheck just to make sure though :laugh:

Yep, i'm using it:)
User avatar
Annick Charron
 
Posts: 3367
Joined: Fri Dec 29, 2006 3:03 pm

Post » Fri Feb 18, 2011 8:01 pm

Yep, I am using that one for sure this time :P

Ehh, I'm gonna recheck just to make sure though :laugh:

Yep, i'm using it:)


well another thing to cross off the list is making sure you didn't do what I did.
well let's just check and make sure first - before we get to another thing to cross off - is to make sure you have the shaderlist.txt file in the Shaders folder with a LO, correct?

Also, you should get dx9 (even if you know you have it, I just say download and reinstall again, just incase)
User avatar
chinadoll
 
Posts: 3401
Joined: Tue Aug 22, 2006 5:09 am

Post » Sat Feb 19, 2011 9:14 am

I wonder if it is possible to do anything about the SSAO filter. I mean, come on, guys, it's terrible when it comes to bushes, grass, etc. They should produce shadows below them, not behind them. I see that it is not really possible ATM with the bare SSAO logic. But, seeing advanced stuff like Godrays working, I cannot but wonder whether it is possible to make a "next-gen" smart SSAO filter that could take into account distance from an object to its background, so that things would not produce SSAO "shadows" around them when their background is in fact some feet away from them (currently a tree trunk "SSAO-overshadows" the ground far behind it, if you get what I mean). Or, dreaming further on, that could, in effect, produce fake shadows by applying the SSAO effect only to those parts of objects opposite the sun.

:)

It is the SSAO which is advanced. Godrays is my third shader. First was making the screen blue, second was drawing black horizontal bars, aka letterbox effect. I achieved godrays because when I first looked at it, *the method*, I noticed how simple it was. Took me 20 minutes to achieve the simple effect with MGE. But I borrowed almost all of its code from other MGE shaders, like a mixture of 10 shaders, I was very novice, still am, hehe. Still borrowing though, my last barrow is from SSAO shader, to make depth mask linear. And it wouldn't be possible without the help from peachykeen, phal, knu.. And now with scanti and other OGE guys helping me. I'm still trying to understand those codes. :turtle:

For SSAO shader, I admit it is very slow. I think it is a little *next-gen*, a very experimental shader. And adding ray tracing like stuff will make a non-real-time shader.

For cel shader, there are some limitations, like the web thing not showing correct results.

1. You can edit the web texture to show correct lines. As I think this would be the proper way.
2. You can edit the mesh for real geometry. :)
3. Maybe 2D edge detect and depth based edge detect can be mixed in a way. But I don't think it would look that good.

And by the way, I got bored and tweaked the motion blur shaders. I hope their authors wouldn't mind.
Here a little update to forward motion blur with new OGE goodies, change the ingredients of radialblur.fx:

Spoiler
//#define screenWidthTexelSize	rcpres[0]//#define screenHeightTexelSize	rcpres[1]//extern float4 texelSize = { 1/1680.0f, 1/1050.0f, 0.0f, 0.0f };float2 rcpres;	// render target X and Yextern float speed <    string UIName = "speed";    string UIWidget = "slider";    float UIMin = -1.0f;    float UIMax = 2.0f;    float UIStep = 0.01f;>;extern float horizon <    string UIName = "horizon";    string UIWidget = "slider";    float UIMin = -1.0f;    float UIMax = 2.0f;    float UIStep = 0.01f;>;extern float cx <    string UIName = "center X";    string UIWidget = "slider";    float UIMin = -1.0f;    float UIMax = 2.0f;    float UIStep = 0.01f;>;float4x4 m44proj;static const float nearZ = m44proj._43 / m44proj._33;static const float farZ = (m44proj._33 * nearZ) / (m44proj._33 - 1.0f);static float2 Center = { 1 - cx, 1 - horizon };#define numBlurSamples 16static float gaussianStdDev = 12.0f;static float gaussianSum = 1.0f;texture thisframe;	// the current frame from before any effects are applied from this filetexture lastpass;texture Depth;sampler currentFrameSampler = sampler_state{	texture = ;	AddressU = CLAMP;	AddressV = CLAMP;	MINFILTER = POINT;	MAGFILTER = POINT;};sampler lastPassSampler = sampler_state{	texture = ;	AddressU = CLAMP;	AddressV = CLAMP;	MIPFILTER = LINEAR;	MINFILTER = LINEAR;	MAGFILTER = LINEAR;};sampler depthSampler = sampler_state{	texture = ;	AddressU = CLAMP;	AddressV = CLAMP;	MIPFILTER = NONE;	MINFILTER = POINT;	MAGFILTER = POINT;	};struct VSOUT{	float4 vertPos : POSITION;	float2 UVCoord : TEXCOORD0;};struct VSIN{	float4 vertPos : POSITION0;	float2 UVCoord : TEXCOORD0;};VSOUT FrameVS(VSIN IN){	VSOUT OUT = (VSOUT)0.0f;	// initialize to zero, avoid complaints.	OUT.vertPos = IN.vertPos;	OUT.UVCoord = IN.UVCoord;	return OUT;}half4 ApplyRadialBlurG(float2 UVCoord : TEXCOORD0) : COLOR0{        if (speed != 0) {        float2 offsetBlurDirection = UVCoord + rcpres * 0.5 - Center;        float2 mags = offsetBlurDirection * offsetBlurDirection;        float blurmag = (mags.x + mags.y) * .2;                  //blurmag = clamp(blurmag, 0, .2);        //return half4(( blurmag) * speed, 0, 0, 1);                half3 blurredColor = 0;        gaussianSum = 0.0f;                 for(float i=0; i < numBlurSamples / 2 ; i++) {            float offset = (speed * blurmag * 5) * (i / numBlurSamples);            float weight = exp((i*i) / (2.0f * gaussianStdDev * gaussianStdDev)) / gaussianStdDev;                        float2 lookup = offsetBlurDirection.xy * (1 - offset) + Center;            half4 current = tex2D( currentFrameSampler, lookup );                        gaussianSum += weight;      	    blurredColor += current.rgb * weight;                        lookup = offsetBlurDirection.xy * (1 + offset) + Center;            current = tex2D( currentFrameSampler, lookup );                                    gaussianSum += weight;      	    blurredColor += current.rgb * weight;        }        blurredColor /= gaussianSum;            return half4(blurredColor, 1);     }    else        return tex2D(currentFrameSampler, UVCoord);}half4 FBCombine(float2 UVCoord : TEXCOORD0) : COLOR0{    if (speed != 0) {		half3 orgi = tex2D(currentFrameSampler,UVCoord);	half3 mblur = tex2D(lastPassSampler, UVCoord);	float posZ = tex2D(depthSampler, UVCoord).x;	posZ = pow(posZ, 0.05f);	float dm = (2.0f * nearZ) / (nearZ + farZ - posZ * (farZ - nearZ));	dm = smoothstep(0.0,0.51,dm);	orgi = lerp(orgi, mblur, (1-dm));			return half4(orgi, 1.0f);	//return half4(1-dm, 1-dm, 1-dm, 1);        				        //return half4(blurredColor, 1);     }    else        return tex2D(currentFrameSampler, UVCoord);}technique t0 {	pass p0	{		//VertexShader = compile vs_1_1 FrameVS();	// unneeded unless the compile target is PS3.0		PixelShader = compile ps_2_0 ApplyRadialBlurG();		CullMode = none;		ZEnable = false;		ZWriteEnable = false;		AlphaBlendEnable = false;	}      pass p1	{		//VertexShader = compile vs_1_1 FrameVS();	// unneeded unless the compile target is PS3.0		PixelShader = compile ps_2_0 FBCombine();		CullMode = none;		ZEnable = false;		ZWriteEnable = false;		AlphaBlendEnable = false;	}}

It needs scanti's OGE. And of course original forward motion blur mod. I can use feedback on this one. It is simple masking. Trying the same method for other motion blur shader but it will need a complex method, I guess.
User avatar
Emmanuel Morales
 
Posts: 3433
Joined: Sat Oct 06, 2007 2:03 pm

Post » Sat Feb 19, 2011 3:00 am

Just one Question is there a fix for the Save Game Pic yet ? just asking.
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Sat Feb 19, 2011 8:04 am

3. Maybe 2D edge detect and depth based edge detect can be mixed in a way. But I don't think it would look that good.
Tried a sobel-ish filter initially, when I started working on the shader. If I recall correctly, it was a mess.

Just one Question is there a fix for the Save Game Pic yet ? just asking.
The latest release should include it.
User avatar
james tait
 
Posts: 3385
Joined: Fri Jun 22, 2007 6:26 pm

Post » Fri Feb 18, 2011 8:50 pm

well another thing to cross off the list is making sure you didn't do what I did.
well let's just check and make sure first - before we get to another thing to cross off - is to make sure you have the shaderlist.txt file in the Shaders folder with a LO, correct?

Also, you should get dx9 (even if you know you have it, I just say download and reinstall again, just incase)


I didn't have a shaderlist txt in the shaders folder :P But what do you mean with a LO? Load order? What should I put in the shaderlist.txt file?
User avatar
Marion Geneste
 
Posts: 3566
Joined: Fri Mar 30, 2007 9:21 pm

Post » Sat Feb 19, 2011 12:01 am

SSAO+Godray:

- http://img297.imageshack.us/img297/131/66776452.png
User avatar
Charlie Ramsden
 
Posts: 3434
Joined: Fri Jun 15, 2007 7:53 pm

Post » Sat Feb 19, 2011 6:40 am

I didn't have a shaderlist txt in the shaders folder :P But what do you mean with a LO? Load order? What should I put in the shaderlist.txt file?


create a new .txt file in the shaders folder named shaderlist.txt and the LO (yes Load Order) is pretty much - to my knowledge - how you want it.
I believe the LO works sort of like Layers in photoshop, so the the first thing on the list - say godrays - will always over lap celshaders(this cartoony outlines).
my LO is small, but here is an example:

DepthOfField.fx
CelShader+EdgeAA.fx
RealisticHealth.fx

(YES, you must have .fx at the end)
(oh, and yes, I am not too picky about my effects in game. I was just recreating Borderlands)
the readme that comes with the new OGE should really tell people they need to create a shaderlist.txt and tell them what the LO is and how to do it...honestly I have no idea what the LO does, I just make a guess and hope it works.

To my knowldege as well, the game will load all the effects put into the LO, even if they are not active in the game - thus causing a performance hit. (I tested this idea earlier when I noticed I had a performance hit from havign nearly every effect in my LO) so I recommend only adding what you want in the LO and nothing more. though my theory on this is not 100%, I am 90% certain loading additional effects even when not active will still be loaded in the game.
User avatar
OJY
 
Posts: 3462
Joined: Wed May 30, 2007 3:11 pm

Post » Fri Feb 18, 2011 9:33 pm

create a new .txt file in the shaders folder named shaderlist.txt and the LO (yes Load Order) is pretty much - to my knowledge - how you want it.
I believe the LO works sort of like Layers in photoshop, so the the first thing on the list - say godrays - will always over lap celshaders(this cartoony outlines).
my LO is small, but here is an example:

DepthOfField.fx
CelShader+EdgeAA.fx
RealisticHealth.fx

(YES, you must have .fx at the end)
(oh, and yes, I am not too picky about my effects in game. I was just recreating Borderlands)
the readme that comes with the new OGE should really tell people they need to create a shaderlist.txt and tell them what the LO is and how to do it...honestly I have no idea what the LO does, I just make a guess and hope it works.

To my knowldege as well, the game will load all the effects put into the LO, even if they are not active in the game - thus causing a performance hit. (I tested this idea earlier when I noticed I had a performance hit from havign nearly every effect in my LO) so I recommend only adding what you want in the LO and nothing more. though my theory on this is not 100%, I am 90% certain loading additional effects even when not active will still be loaded in the game.


OP contains all the info on shaderlist.txt, load order and support plugin. You shouldn't have RealisticHealth.fx in your shaderlist.txt.
User avatar
louise fortin
 
Posts: 3327
Joined: Wed Apr 04, 2007 4:51 am

Post » Fri Feb 18, 2011 7:02 pm

OP contains all the info on shaderlist.txt, load order and support plugin. You shouldn't have RealisticHealth.fx in your shaderlist.txt.

really now? I was told I do need to put the realistic health in my LO
User avatar
Agnieszka Bak
 
Posts: 3540
Joined: Fri Jun 16, 2006 4:15 pm

Post » Fri Feb 18, 2011 8:31 pm

really now? I was told I do need to put the realistic health in my LO


If ABO told you, it's probably right, but I would have though that the shader would be turned on and off, or have variables changed to tweak its effect, as you played. Shaders in the masterlist can't have stuff changed while the game is running, once they're loaded, that's it. Hence why I was under the impression that Realistic Health's shader shouldn't be in the masterlist, and that the mod loads the shader by itself so it can tweak it in game. :shrug:

On an unrelated note, I managed to spill some juice on my notes, and in an effort to dry them out, I placed them next to my graphics card's fan outlet, and loaded up Crysis Warhead on its max settings. The notes were dry in no time, and I got to feast on eye candy. :D

I'm very interested as to how they got their DoF to look so damn good (among lots and lots of other things), so I'll probably go hunting through their shader files at some point...

(Although the DoF during conversations in Mass Effect 2 is also very nice from screenshots I've seen, I should probably buy the game, considering how much my friends have been praising it. I think Warhead was the last game I got, which must be a couple of years ago now.)
User avatar
Sarah Edmunds
 
Posts: 3461
Joined: Sat Jul 08, 2006 8:03 pm

Post » Sat Feb 19, 2011 7:44 am

If ABO told you, it's probably right, but I would have though that the shader would be turned on and off, or have variables changed to tweak its effect, as you played. Shaders in the masterlist can't have stuff changed while the game is running, once they're loaded, that's it. Hence why I was under the impression that Realistic Health's shader shouldn't be in the masterlist, and that the mod loads the shader by itself so it can tweak it in game. :shrug:

On an unrelated note, I managed to spill some juice on my notes, and in an effort to dry them out, I placed them next to my graphics card's fan outlet, and loaded up Crysis Warhead on its max settings. The notes were dry in no time, and I got to feast on eye candy. :D

I'm very interested as to how they got their DoF to look so damn good (among lots and lots of other things), so I'll probably go hunting through their shader files at some point...

(Although the DoF during conversations in Mass Effect 2 is also very nice from screenshots I've seen, I should probably buy the game, considering how much my friends have been praising it. I think Warhead was the last game I got, which must be a couple of years ago now.)


lol! that's the best way to dry off papers! put them out in the sun? LAME! Use a hair dryer? LAME! Use you're comps fan and run it till it's about to explode? AWESOME!

I know what I can do! I'll open up my oblivion on ulta high quality with all the effects really high, turn on BioShock, turn on 3 copies of PWI and BAM! that will get my fan spinning...and my comp crashing =P
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am

Post » Sat Feb 19, 2011 9:25 am

create a new .txt file in the shaders folder named shaderlist.txt and the LO (yes Load Order) is pretty much - to my knowledge - how you want it.
I believe the LO works sort of like Layers in photoshop, so the the first thing on the list - say godrays - will always over lap celshaders(this cartoony outlines).
my LO is small, but here is an example:

DepthOfField.fx
CelShader+EdgeAA.fx
RealisticHealth.fx

(YES, you must have .fx at the end)
(oh, and yes, I am not too picky about my effects in game. I was just recreating Borderlands)
the readme that comes with the new OGE should really tell people they need to create a shaderlist.txt and tell them what the LO is and how to do it...honestly I have no idea what the LO does, I just make a guess and hope it works.

To my knowldege as well, the game will load all the effects put into the LO, even if they are not active in the game - thus causing a performance hit. (I tested this idea earlier when I noticed I had a performance hit from havign nearly every effect in my LO) so I recommend only adding what you want in the LO and nothing more. though my theory on this is not 100%, I am 90% certain loading additional effects even when not active will still be loaded in the game.

Loading order is like photoshop layers indeed, but it is the other way around, last on the list is the upper most layer. And wrinklyninja is right, it is all in there in first post, tesnexus and readme included in OBGEv2.

So to add an effect, use Support plugin. But it will only add the shaders supported.
You can use the shaderlist.txt too. For additional shaders that are not supported by plugin.(or you can rename the supported shader and install via shaderlist.txt.)
MOD shaders don't go in shaderlist.txt. Realistic health, motion blur mods, they are activated from the mod scripts.

Edit: Why does realistic health go in shaderlist? I'm wondering.

PS. Anyone tried the forward motion blur tweaks, how does it look in game?
User avatar
Veronica Martinez
 
Posts: 3498
Joined: Tue Jun 20, 2006 9:43 am

Post » Sat Feb 19, 2011 7:18 am

I just tried switching over to the support plugin (was using shaderlist.txt to test out stuff before), and found that my DoF shader didn't work with it. I'm going to try again with the latest version of the plugin, and see what's going wrong.

EDIT: The default values for DoF in the support plugin are wrong, that's what, so it's setting tiny amounts of blur and the wrong depth power, and stuff like that. Not something I'd worry about, since I plan on doing things differently for the next version anyway.

@ vtastek: Godrays are looking very good. I've got a few comments to make, but I'll wait till I've got screenies before making them, so you can see what I'm talking about. :)

EDIT: Just found Warhead's DoF code, ~470 lines for the main bit, probably more functions elsewhere too. :o I see they're using a poisson blur rather than the gaussian I use, interesting. Time to hack it to pieces and rebuild it for Oblivion, if I can. :)
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Fri Feb 18, 2011 10:45 pm

Hmm .... well I don't think my question has been answered sorry to say.

Much more basic than what you two are getting at. I only included the section of the readme on troubleshooting to illustrate that they are mentioned in the readme in that section, not to debate the validity of that section.

My questions then are simply:

I want to update to version 3 of Version 2 of the new OBGE. I install everything related to shaders and graphics with OBMM (everything is in my install with BAIN), so I can and will uninstall all previous versions with OBMM before making a new OMOD for this version. I'm ready to fire up OBMM and make the OMOD right now except ....

Do I install these extra dll yes or no? (it seems you are saying no).

If yes then where do I install them in my game directory? (I have a non-default install of all bethesda games).

Not that I'm not interested in whether people recommended use of them or what they are for AmpolX, but really that was extent of my questions. It seems as though you read my questions then turned to the others and said "see it is questions like this ..." then answered with more of a reference to whether they should even exist instead of just answering the questions. I use MGE, so it is not some arcane idea to use them .

I searched through the thread for reference to them and didn't see anything jumping out at me and certainly all I found in the readme was that passage. So I'm going to venture to say that questions like this are not going to happen with better documentation.
It is also quite possible I'm blind and missed something vital, in which case just slap my forehead and point me to where to look.

thanks


Sorry I haven't been online for the last few days. The 2 dll files were a last minute thing and I didn't really explain there usage properly.

The d3dx9_41.dll is if OBGEv2 doesn't work at all and if you look in the OBGEv2.log file you get an error message saying, "ERROR - can't find d3dx9_41.dll file. Please update DirectX.". Ideally you would download the latest directx update and that would fix your problem but you can also copy the d3dx9_41.dll to your Oblivion directory.

The d3dx9_31.dll is there in case OBGEv2 crashes if you try to use the legacy compiler. Updating directx won't fix the problem because the directx updates after August 2009 no longer include that file (Microsoft has deemed it to be obsolete). So if OBGEv2 crashes when you set bUseLegacyCompiler=1 in your OBGE.ini file then copy the d3dx9_31.dll to your Oblivion directory.

Most people won't need the 2 dll files. If OBGEv2 is working OK then they aren't needed.
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Sat Feb 19, 2011 6:12 am

Just one Question is there a fix for the Save Game Pic yet ? just asking.


Indeed, my savegame pictures have been fine for a while now.
User avatar
alyssa ALYSSA
 
Posts: 3382
Joined: Mon Sep 25, 2006 8:36 pm

Post » Sat Feb 19, 2011 10:22 am

I didn't even realize my save games were working now lol. Thanks team OBGE, I really appreciate your work(that's an understatement). :wavey:
User avatar
sarah
 
Posts: 3430
Joined: Wed Jul 05, 2006 1:53 pm

Post » Sat Feb 19, 2011 12:17 am

The d3dx9_31.dll is there in case OBGEv2 crashes if you try to use the legacy compiler. Updating directx won't fix the problem because the directx updates after August 2009 no longer include that file (Microsoft has deemed it to be obsolete). So if OBGEv2 crashes when you set bUseLegacyCompiler=1 in your OBGE.ini file then copy the d3dx9_31.dll to your Oblivion directory.


I cant find this OBGE.ini file
My game is not loading save games anymore sins the latest OBGEv2 version.
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Sat Feb 19, 2011 6:44 am

I cant find this OBGE.ini file
My game is not loading save games anymore sins the latest OBGEv2 version.


It's in your My Games/Oblivion folder, and it's generated when you quit Oblivion normally (ie. not crashing, not qqq'ing out, FastExit2 is fine though).

EDIT: You don't need to load a game to generate it, just get to title screen and quitting from there works.

EDIT 2: I've almost finished making sense of Crysis' DoF, the main bit is fairly simple, but it's a two pass thing with the first pass seeming to be a scaled-down blurred depth image of some sort, which the main bit then poisson-lerps with the full original image. It doesn't help that they've got a heap of different techniques with no way I can see of telling which is being called, and what samplers hold what, as it's a dynamic system. I think I stripped off the right bits and kept the right things though. The other problem is that I've got no idea of what a few of their variables hold, but I found an ATI powerpoint with some similar code in it, so hopefully I can guess stuff. :)
User avatar
Andrew Perry
 
Posts: 3505
Joined: Sat Jul 07, 2007 5:40 am

Post » Sat Feb 19, 2011 2:04 am

Sorry I haven't been online for the last few days. The 2 dll files were a last minute thing and I didn't really explain there usage properly.

The d3dx9_41.dll is if OBGEv2 doesn't work at all and if you look in the OBGEv2.log file you get an error message saying, "ERROR - can't find d3dx9_41.dll file. Please update DirectX.". Ideally you would download the latest directx update and that would fix your problem but you can also copy the d3dx9_41.dll to your Oblivion directory.

The d3dx9_31.dll is there in case OBGEv2 crashes if you try to use the legacy compiler. Updating directx won't fix the problem because the directx updates after August 2009 no longer include that file (Microsoft has deemed it to be obsolete). So if OBGEv2 crashes when you set bUseLegacyCompiler=1 in your OBGE.ini file then copy the d3dx9_31.dll to your Oblivion directory.

Most people won't need the 2 dll files. If OBGEv2 is working OK then they aren't needed.

I have a question, in which case do we wanna use legacy compiler?


.....
@ vtastek: Godrays are looking very good. I've got a few comments to make, but I'll wait till I've got screenies before making them, so you can see what I'm talking about. :)
...

I will appreciate your feedback. Feedback is really important: I'm still waiting for comments on my motion blur tweak:

And by the way, I got bored and tweaked the motion blur shaders. I hope their authors wouldn't mind.
Here a little update to forward motion blur with new OGE goodies, change the ingredients of radialblur.fx:

Spoiler
//#define screenWidthTexelSize	rcpres[0]//#define screenHeightTexelSize	rcpres[1]//extern float4 texelSize = { 1/1680.0f, 1/1050.0f, 0.0f, 0.0f };float2 rcpres;	// render target X and Yextern float speed <    string UIName = "speed";    string UIWidget = "slider";    float UIMin = -1.0f;    float UIMax = 2.0f;    float UIStep = 0.01f;>;extern float horizon <    string UIName = "horizon";    string UIWidget = "slider";    float UIMin = -1.0f;    float UIMax = 2.0f;    float UIStep = 0.01f;>;extern float cx <    string UIName = "center X";    string UIWidget = "slider";    float UIMin = -1.0f;    float UIMax = 2.0f;    float UIStep = 0.01f;>;float4x4 m44proj;static const float nearZ = m44proj._43 / m44proj._33;static const float farZ = (m44proj._33 * nearZ) / (m44proj._33 - 1.0f);static float2 Center = { 1 - cx, 1 - horizon };#define numBlurSamples 16static float gaussianStdDev = 12.0f;static float gaussianSum = 1.0f;texture thisframe;	// the current frame from before any effects are applied from this filetexture lastpass;texture Depth;sampler currentFrameSampler = sampler_state{	texture = ;	AddressU = CLAMP;	AddressV = CLAMP;	MINFILTER = POINT;	MAGFILTER = POINT;};sampler lastPassSampler = sampler_state{	texture = ;	AddressU = CLAMP;	AddressV = CLAMP;	MIPFILTER = LINEAR;	MINFILTER = LINEAR;	MAGFILTER = LINEAR;};sampler depthSampler = sampler_state{	texture = ;	AddressU = CLAMP;	AddressV = CLAMP;	MIPFILTER = NONE;	MINFILTER = POINT;	MAGFILTER = POINT;	};struct VSOUT{	float4 vertPos : POSITION;	float2 UVCoord : TEXCOORD0;};struct VSIN{	float4 vertPos : POSITION0;	float2 UVCoord : TEXCOORD0;};VSOUT FrameVS(VSIN IN){	VSOUT OUT = (VSOUT)0.0f;	// initialize to zero, avoid complaints.	OUT.vertPos = IN.vertPos;	OUT.UVCoord = IN.UVCoord;	return OUT;}half4 ApplyRadialBlurG(float2 UVCoord : TEXCOORD0) : COLOR0{        if (speed != 0) {        float2 offsetBlurDirection = UVCoord + rcpres * 0.5 - Center;        float2 mags = offsetBlurDirection * offsetBlurDirection;        float blurmag = (mags.x + mags.y) * .2;                  //blurmag = clamp(blurmag, 0, .2);        //return half4(( blurmag) * speed, 0, 0, 1);                half3 blurredColor = 0;        gaussianSum = 0.0f;                 for(float i=0; i < numBlurSamples / 2 ; i++) {            float offset = (speed * blurmag * 5) * (i / numBlurSamples);            float weight = exp((i*i) / (2.0f * gaussianStdDev * gaussianStdDev)) / gaussianStdDev;                        float2 lookup = offsetBlurDirection.xy * (1 - offset) + Center;            half4 current = tex2D( currentFrameSampler, lookup );                        gaussianSum += weight;      	    blurredColor += current.rgb * weight;                        lookup = offsetBlurDirection.xy * (1 + offset) + Center;            current = tex2D( currentFrameSampler, lookup );                                    gaussianSum += weight;      	    blurredColor += current.rgb * weight;        }        blurredColor /= gaussianSum;            return half4(blurredColor, 1);     }    else        return tex2D(currentFrameSampler, UVCoord);}half4 FBCombine(float2 UVCoord : TEXCOORD0) : COLOR0{    if (speed != 0) {		half3 orgi = tex2D(currentFrameSampler,UVCoord);	half3 mblur = tex2D(lastPassSampler, UVCoord);	float posZ = tex2D(depthSampler, UVCoord).x;	posZ = pow(posZ, 0.05f);	float dm = (2.0f * nearZ) / (nearZ + farZ - posZ * (farZ - nearZ));	dm = smoothstep(0.0,0.51,dm);	orgi = lerp(orgi, mblur, (1-dm));			return half4(orgi, 1.0f);	//return half4(1-dm, 1-dm, 1-dm, 1);        				        //return half4(blurredColor, 1);     }    else        return tex2D(currentFrameSampler, UVCoord);}technique t0 {	pass p0	{		//VertexShader = compile vs_1_1 FrameVS();	// unneeded unless the compile target is PS3.0		PixelShader = compile ps_2_0 ApplyRadialBlurG();		CullMode = none;		ZEnable = false;		ZWriteEnable = false;		AlphaBlendEnable = false;	}      pass p1	{		//VertexShader = compile vs_1_1 FrameVS();	// unneeded unless the compile target is PS3.0		PixelShader = compile ps_2_0 FBCombine();		CullMode = none;		ZEnable = false;		ZWriteEnable = false;		AlphaBlendEnable = false;	}}

It needs scanti's OGE. And of course original forward motion blur mod. I can use feedback on this one. It is simple masking. Trying the same method for other motion blur shader but it will need a complex method, I guess.


It looks damn good! :)
User avatar
Sxc-Mary
 
Posts: 3536
Joined: Wed Aug 23, 2006 12:53 pm

Post » Sat Feb 19, 2011 12:21 am

I have a question, in which case do we wanna use legacy compiler?


If the compiler fails to compile an effect file OBGEv2 will try again using the legacy compiler (This is in case the effect file uses global half variables - The old compiler will accept them, the new one gives an error).

I also added an INI option to force the use of the old compiler because when I looked on the internet I found a few people claiming that the older compiler was faster for older graphics cards. (I haven't tested it myself so it may or may not be true).
User avatar
Harry Hearing
 
Posts: 3366
Joined: Sun Jul 22, 2007 6:19 am

Next

Return to IV - Oblivion