OGE "Oblivion Graphics Extender"

Post » Fri May 27, 2011 4:11 pm

@shadeMe:
really dont know this special kind of effect. do you have any visual example, on youtube perhaps?
It's the effect seen when a mythic dawn agent is killed ( when his summoned equipment is dispelled ).
User avatar
Rhysa Hughes
 
Posts: 3438
Joined: Thu Nov 23, 2006 3:00 pm

Post » Fri May 27, 2011 5:13 pm

That cloud shadow stuff is awesome.
User avatar
Jack Bryan
 
Posts: 3449
Joined: Wed May 16, 2007 2:31 am

Post » Fri May 27, 2011 1:17 pm

Some problems I've identified with the cloud shadow shader as I've got it currently:

1. The texture is projected according to depth - which is relative to the player, so when the player moves, the clouds goes with them. I need to switch this relativity to a universal fixed origin, probably world space if I'm understanding it right.
2. The game world is big, and vanilla cloud textures are only 1024x1024, so you get great big pixellated edges ATM. I'll separate the process into two passes, and do a massive blur on the 'shadow' pass, before adding it to the original frame.
3. The cloud shadows act independant of the weather. This can be remedied by tying it into an Oblivion script that passes the weather type to the shader, which could then select from a series of textures based on the type. So there'll be a stock shadow for clear, another for cloudy, for stormy, etc.
4. Because there's no ray tracing involved, the shadow will have a chance of being over the player even if they're in the sun. I haven't really thought about this yet, I've got enough to deal with as it is. :)

Could someone check for me if they have any cloud textures in Data/Textures/sky? I do, but I've messed about with BSAs so I can't remember if this is true for a non-extracted BSA setup too.
User avatar
Solène We
 
Posts: 3470
Joined: Tue Mar 27, 2007 7:04 am

Post » Fri May 27, 2011 3:30 pm

Could someone check for me if they have any cloud textures in Data/Textures/sky? I do, but I've messed about with BSAs so I can't remember if this is true for a non-extracted BSA setup too.


If they are using replacer then they would have them listed under data/textures/sky..Else Vanilla cloud textures are in the Textures - bsa,

else here is listing for them once again

textures\sky\cloudsclear.dds
textures\sky\cloudsclear02.dds
textures\sky\cloudscloudy.dds
textures\sky\cloudsfog.dds
textures\sky\cloudsfoglower.dds
textures\sky\cloudsoblivionstorm_clouds.dds
textures\sky\cloudsoblivionstorm_sky.dds
textures\sky\cloudsovercast.dds
textures\sky\cloudsovercastlower.dds
textures\sky\cloudsrain.dds
textures\sky\cloudsrainlower.dds
textures\sky\cloudssnow.dds
textures\sky\cloudssnowlower.dds
textures\sky\cloudsthunderstorm.dds
textures\sky\cloudsthunderstormlower.dds
User avatar
Sylvia Luciani
 
Posts: 3380
Joined: Sun Feb 11, 2007 2:31 am

Post » Fri May 27, 2011 11:12 pm

Could someone check for me if they have any cloud textures in Data/Textures/sky? I do, but I've messed about with BSAs so I can't remember if this is true for a non-extracted BSA setup too.


No texture for me in that folder.
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am

Post » Fri May 27, 2011 8:44 am

Hey everyone, not to interrupt the cloud project (Which looks really promising :goodjob: ), but I have a question.
Ive been using the Color Mood shader as a kind of "desaturate" filter, mainly by raising the values of all three hues. It works, but it also increases the brightness as a side effect.

Is there a better way to achieve a desaturated effect in Oblivion? Or maybe if its not too difficult and someone has the time, they can write a .fx file for it?

Thanks!
L
User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am

Post » Fri May 27, 2011 10:04 am

I've got one lying around, let me just upload it, hang on a sec...

http://cid-465896b69b9940e8.skydrive.live.com/self.aspx/Public/Oblivion%20Shaders/Desaturate.fx. Can increase or decrease saturation.
User avatar
Nauty
 
Posts: 3410
Joined: Wed Jan 24, 2007 6:58 pm

Post » Fri May 27, 2011 8:41 pm

OK, I took some comparison screenshots to help you understand what's going on:

http://i617.photobucket.com/albums/tt255/WrinklyNinja1/Oblivion2010-02-0520-43-46-76.jpg
http://i617.photobucket.com/albums/tt255/WrinklyNinja1/Oblivion2010-02-0520-43-30-99.jpg
http://i617.photobucket.com/albums/tt255/WrinklyNinja1/Oblivion2010-02-0520-43-29-00.jpg
http://i617.photobucket.com/albums/tt255/WrinklyNinja1/Oblivion2010-02-0520-43-43-56.jpg

As you should be able to see from that, the only difference between vanilla and SSAO behaviour is the fact that SSAO will draw the effect to the whole screen regardless of fog, and hence the edges of objects that would otherwise be hidden in fog are defined. The fog depth is also screwed up, because with SSAO everything underwater is approximated to have the same colour, and so close up things also appear to have the same colour as the fog.

I haven't had a look at the SSAO shader itself, but I'm pretty sure that's a rough explanation of what happens. As for finding out if the player is underwater, that's easy if the player is totally submerged, but you'd still get this large band where you can't tell if you're underwater or not, because not even the game knows.

And I have no idea about the fish bleeding shader. You couldn't do a DX10 shader, since Oblivion is DX9, but I don't know about if a DX9 equivalent is possible.


Need to tie SSAO range to underwater fog :embarrass: I.E. falloff that matches fog range.

Also, yeah worldspace projection, not screen space for the cloud shadows. Not that they'll look right without shadow maps.
User avatar
Ricky Meehan
 
Posts: 3364
Joined: Wed Jun 27, 2007 5:42 pm

Post » Fri May 27, 2011 8:18 am

I've got one lying around, let me just upload it, hang on a sec...

http://cid-465896b69b9940e8.skydrive.live.com/self.aspx/Public/Oblivion%20Shaders/Desaturate.fx. Can increase or decrease saturation.

Thank you very much! :)
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm

Post » Fri May 27, 2011 6:20 pm

Hello,

Just wanted to say I love all the work that is being done here. It is amazing the difference it makes to enhance an already good looking game.

I have a slight issue though?

The new timelygodraysv3.fx doesn't seem to be working for me. I can put the Godraysv2 back in shaderlist.txt instead of the new timelygodraysv3 and it seems to work fine. Is this new v3 changed so that you will only see the godrays at certain times of the day? I have tested several instances and it seems much less profound than the v2 Godrays. Maybe I am missing something?

I did notice that during some times of the day with the v2 Godrays, mainly when it was clear which I think you all have already noted, that it is a bit too bright. Was the v3 aimed to fix this?

A few noob questions if you don't mind:

1. What does the HighlightBlur (Blur Edge Highlight Shader) and Color Inversion Shaders do? I tested it and can't seem to tell a difference

2. So sad that Godrays and AA are not compatible together :( . I have tried the Edge Detection Shader, very cool, but I prefer the more "realistic" look, makes it look a bit too Borderlands'ish to me for Oblivion with the black borders around everything, cool effect though. Any way to force AA, or more likely, any other way to reduce the jaggies?

3. Correct me if i'm wrong, but the other mods you have listed wrinklyninja, such as OBGE Motion Blur/Ambient Dungeons/Detailed Terrain are compatible with OBGEv2?

4. One last question, anyone know some good values to set for DepthOfField to work better in third-person? I have played with it a bit but can't seem to get it to work right in third person.

I love the Godrays, but my eyes burn with all the jaggies. The SSAO makes the game look 100x better as well, especially at night, very, very nice work. I will pay a hefty sum to whoever gets Anti-Aliasing working with OGE! ^_^

I appreciate all the work being done here very much. You guys rock, your bringing Crysis-esque shaders to Oblivion! Amazing! Keep it up :rock:

-J
User avatar
{Richies Mommy}
 
Posts: 3398
Joined: Wed Jun 21, 2006 2:40 pm

Post » Fri May 27, 2011 10:11 am

The new timelygodraysv3.fx doesn't seem to be working for me. I can put the Godraysv2 back in shaderlist.txt instead of the new timelygodraysv3 and it seems to work fine. Is this new v3 changed so that you will only see the godrays at certain times of the day? I have tested several instances and it seems much less profound than the v2 Godrays. Maybe I am missing something?

I did notice that during some times of the day with the v2 Godrays, mainly when it was clear which I think you all have already noted, that it is a bit too bright. Was the v3 aimed to fix this?


Yes, aim of v3 was to reduce the very high brightness.
For me it works well, and I am very happy with v3. You are always able to alter some values.

Like the luminance, default to 0.44, try to lower it in little steps, and you will get more brightness, like 0.42 or 0.40.
The decay should be at least 0.97 to 0.99.it determines the length of the rays.


These are my values: (I prefer the more realistic & decent quality)
float Density=0.9;

float Decay=0.97; // the sunray length (changed it to 0.98)

float Weight=0.44; // alter this value upwards for more intense (i changed it to 0.58)

//float Exposure=0.22;

static const float Luminance = 0.40; // alters the brightness of the sky (clouds that reflect, lower this value for more brightness) (changed it to 0.48)
static const float fMiddleGray = 0.99f;
static const float fWhiteCutoff = 0.99f;

//edit for light colorness, lower the value for desaturated colors...
static const float saturate = 0.040f;

The only current solution for a less jaggy look i know, is to use a higher resolution, im fine with 1680x1050.
User avatar
~Amy~
 
Posts: 3478
Joined: Sat Aug 12, 2006 5:38 am

Post » Fri May 27, 2011 4:04 pm

I'm just curious if OGE/OBSE will ever be able to be published more as a self installing patch/exe? More for convenience and for others who are less technically inclined.
User avatar
Becky Cox
 
Posts: 3389
Joined: Thu Jun 22, 2006 8:38 am

Post » Fri May 27, 2011 7:56 pm

Does anyone know anything about BSShaderAccumulator::vtable_entry_0x14 (at address 0x7ae070)? It may inherit that from somewhere, I haven't checked.

My attempts to track down what my copy of Oblivion spends all it's CPU are currently implicating this function, but it looks kind of big and messy and I'm hoping someone else has done some work reverse engineering it. The latest OBSE headers don't seem to contain any info about BSShaderAccumulator.
User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Fri May 27, 2011 1:10 pm

Gah, I'm having trouble with re-doing the texture projection relative to world space. Here's my code:

float4 ShadowPass(VSOUT IN) : COLOR0{	float4 Color = 0;	float4 tex = 0;	float VarOffset = sin(f4Time.x/3600)*5;	float4x4 m44projinverse = pow(m44proj,-1);	float4x4 m44viewinverse = pow(m44view,-1);		//Depth calculations.	float depth = tex2D(DepthSampler, IN.UVCoord).x;	depth = pow(abs(depth), 0.05f);	depth = (2.0f * nearZ) / (nearZ + farZ - depth * (farZ - nearZ));	//Converting a point in screen space to world space.	// H is the viewport position at this pixel in the range -1 to 1.  	float4 H = float4(IN.UVCoord.x * 2 - 1, (1 - IN.UVCoord.y) * 2 - 1, depth, 1);  	// Transform by the projection inverse to get view space coordinates.	float4 D = mul(H, m44projinverse);  	// Transform by the view inverse to get world space coordinates.  	D = mul(D, m44viewinverse);  		// Divide by w to get the world position.  	float4 worldPos = D / D.w;  		//Distance from origin in world space - anologue of depth in screen space.	float worldPosDist = sqrt(pow(worldPos.x,2) + pow(worldPos.y,2) + pow(worldPos.z,2));		float4 proj = float4(IN.UVCoord.x, IN.UVCoord.y,0,worldPosDist);    for (int i = 0; i < 13; i++)    {   		//Y axis blur.		float Multiplier = BlurMagnitude * BlurWeights[i] * float2(0,1);		tex = tex2Dproj(TextureSampler, proj + float4(BlurOffsets[i].x,BlurOffsets[i].y,0,0) * Multiplier + VarOffset);		tex.rgb = dot(greyscale,tex.rgb) / 3;		if (tex.r < 0.27)			tex.rgb = 0;		Color += tex;				//X axis blur.		Multiplier = BlurMagnitude * BlurWeights[i] * float2(1,0);		tex = tex2Dproj(TextureSampler, proj + float4(BlurOffsets[i].x,BlurOffsets[i].y,0,0) * Multiplier + VarOffset);		tex.rgb = dot(greyscale,tex.rgb) / 3;		if (tex.r < 0.27)			tex.rgb = 0;		Color += tex;	}	if (depth == 1)		Color = 0;	    return Color / 26;}


Anyone spot the mistakes I must be making?

That currently returns a black screen no matter what I do, when it should be returning a black screen with bits shaded in grey where cloud shadows appear, with the cloud shapes stretched over the scene.

EDIT: I should mention that BlurMagnitude is 0, so the texture sampling becomes: tex = tex2Dproj(TextureSampler, proj + VarOffset);, but the effect is the same no matter the level of blur.
User avatar
Emma louise Wendelk
 
Posts: 3385
Joined: Sat Dec 09, 2006 9:31 pm

Post » Sat May 28, 2011 12:36 am

Breakthrough!

I've got a Proof Of Concept video for cloud shadows uploaded to Youtube http://www.youtube.com/watch?v=_gBQBAk5i8g. It's not exactly perfect :( but it does show that I've figured out how to apply a texture as if along the surface of everything beneath the sky in a relatively simple way. I think that to improve the texture projection to make it look more like all the 'cloud' is moving in one direction would be quite tricky, so I'm going to dig out a proper cloud texture to test it on now, and see if it would be worth the effort. Stay tuned. :)

Special thanks to HawkleyFox, who's depth linearisation method I've pinched, as it's great for large distances. :D

NOTE: The video is probably still processing...


Oh very nice. :)


Does anyone know anything about BSShaderAccumulator::vtable_entry_0x14 (at address 0x7ae070)? It may inherit that from somewhere, I haven't checked.

My attempts to track down what my copy of Oblivion spends all it's CPU are currently implicating this function, but it looks kind of big and messy and I'm hoping someone else has done some work reverse engineering it. The latest OBSE headers don't seem to contain any info about BSShaderAccumulator.


Looking at my inheritance tree BSShaderAccumulator inherits from NiAlphaAccumulator. From the quick look I had of the NiAlphaAccumulator class I think it's responsible for isolating any alpha'd objects, adding them to a list, sorting (back to front) and then rendering that list near the end of the scene rendering chain. (The engine does sort alpha objects but on an object basis, it doesn't break the object down into polygons. The the sorting algorithm is pretty basic as well. It sorts according to the position of each object's centre).

I guess BSShaderAccumulator does the same but with objects rendered with certain shaders. I haven't looked into it with in any great detail though.

Virtual function 0x14 inherits from the NiAccumulator class. (NiRefObject::NiObject::NiAccumulator::NiBackToFrontAccumulator::NiAlphaAccumula
tor::BSShaderAccumulator) I haven't checked if the BSShaderAccumulator class overrides it or not.
User avatar
Mariana
 
Posts: 3426
Joined: Mon Jun 12, 2006 9:39 pm

Post » Fri May 27, 2011 2:40 pm

@Scanti:
Did you find any thing on the needed "Surface Normals" and "Occlusion".

Here was a discussion about it:
http://www.gamesas.com/bgsforums/index.php?showtopic=1072753&st=120


@Wrinklyninja:
That cloud shadow Demo movie looks a bit strange, but it proves a similar and better cloud effect can be applied.

Some problems I've identified with the cloud shadow shader:

I should have some info on this cloud mapping somewhere, so I will dig around on this side.
User avatar
mollypop
 
Posts: 3420
Joined: Fri Jan 05, 2007 1:47 am

Post » Fri May 27, 2011 2:52 pm

2. So sad that Godrays and AA are not compatible together :( . I have tried the Edge Detection Shader, very cool, but I prefer the more "realistic" look, makes it look a bit too Borderlands'ish to me for Oblivion with the black borders around everything, cool effect though. Any way to force AA, or more likely, any other way to reduce the jaggies?
The edge detection shader has an edgeAA feature built-in. Turn it on and see if you like it better.

Snow_EP, I suggest that you add a note about egdeAA in the OP and perhaps, a few screenshots (can be found in my photobucket album)
User avatar
Naazhe Perezz
 
Posts: 3393
Joined: Sat Aug 19, 2006 6:14 am

Post » Fri May 27, 2011 6:47 pm

Better to just set the compatibility flag to the compile call.


How is this done?
User avatar
joannARRGH
 
Posts: 3431
Joined: Mon Mar 05, 2007 6:09 am

Post » Fri May 27, 2011 10:34 pm

@Wrinklyninja:
That cloud shadow Demo movie looks a bit strange, but it proves a similar and better cloud effect can be applied.


I should have some info on this cloud mapping somewhere, so I will dig around on this side.


If you do, that would be a great help. :)

http://www.youtube.com/watch?v=WUM2Sq7jQsI, same implementation. I think I'm going to have to go back to the beginning, my code gives a rough semblance to the effect, but it's actually nothing like it, when I think about it.
User avatar
Melung Chan
 
Posts: 3340
Joined: Sun Jun 24, 2007 4:15 am

Post » Fri May 27, 2011 9:10 pm

Hang in there wrinklyninja, your doing a great job :icecream:
User avatar
Tiffany Holmes
 
Posts: 3351
Joined: Sun Sep 10, 2006 2:28 am

Post » Fri May 27, 2011 8:12 am

@Wrinklyninja:
That new (Cloud Shadow) Demo movie looks much better, dam you work fast.
Well I found the documentation on it but not example code.

NOTE:
I am not telling you what to do, I only give info for you to think about, see it as new inspiration.

Ok, here is what I found out so far.

You should be using a system called (Projected Cloud Maps)
I send you the details on it in a PM.
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Fri May 27, 2011 7:02 pm

@Wrinklyninja:
...
NOTE:
I am not telling you what to do, I only give info for you to think about, see it as new inspiration...


Damn, I wish you would. :P

I got the PM. I'll have a look at it later (got RL work to do now, spent up till 4 am doing cloud stuff).
User avatar
Kevin Jay
 
Posts: 3431
Joined: Sun Apr 29, 2007 4:29 am

Post » Fri May 27, 2011 3:03 pm

The edge detection shader has an edgeAA feature built-in. Turn it on and see if you like it better.

Snow_EP, I suggest that you add a note about egdeAA in the OP and perhaps, a few screenshots (can be found in my photobucket album)

I added a note in the OP next to the Edge Detection download, but when I attempted to link the screenshots it told me that I was posting links to a website that the administrator doesn't allow access to; weird, because all the other ones on your photobucket work.
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Fri May 27, 2011 3:17 pm

Blah, OGE does indeed [censored] my fps. I used showtestershader 0 and it went right back up.
I guess it's something good to look forward to for when I get a new machine, Keep up the good work guys :D.
User avatar
Emma louise Wendelk
 
Posts: 3385
Joined: Sat Dec 09, 2006 9:31 pm

Post » Fri May 27, 2011 11:23 pm

I've been doing some mucking around, just seeing what does what, and I came across this:
float4 UVCoord : TEXCOORD0;

The components are supposed to be:
UVCoord.xy - the screen space coordinates.
UVCoord.z - the depth of the point.
UVCoord.w - the homogenous thingy (not sure what it's called, but it seems to be a scaling factor).

However, while x and y return the values you'd expect them to, z is always 0 and w is always 1. If this is indeed how it is, and I'm not messing something up, could I request that they be given the supposed values (if it's possible), since that would make depth-related functions a lot simpler, and we wouldn't need another texture/sampler to do depth stuff.

As I'm in a requesting mood, I'd also love it if we could have vertex shaders actually having an effect - I think this would probably mean the shader wouldn't be post-processing, but I can never remember the pipeline.

If I've said something stupid in my ignorance, please do tell. I get the nasty feeling I'm missing something here. :shrug:

EDIT: I've uploaded a bunch of screenshots of the new Godrays to a photobucket album http://s617.photobucket.com/albums/tt255/WrinklyNinja1/Oblivion%20Godays/.
User avatar
Jason King
 
Posts: 3382
Joined: Tue Jul 17, 2007 2:05 pm

PreviousNext

Return to IV - Oblivion