OGE "Oblivion Graphics Extender"

Post » Fri May 27, 2011 10:36 am

GAH! http://mynameismjp.wordpress.com/2009/03/10/reconstructing-position-from-depth/ D:

Hmm... Are you saying this doesn't work?
User avatar
Brooks Hardison
 
Posts: 3410
Joined: Fri Sep 07, 2007 3:14 am

Post » Fri May 27, 2011 9:32 am

I hate to keep cluttering up the thread with non-development messages :facepalm: but in regard to the search function using four characters; as long as the thread's title spells out "Oblivion Graphics Extender" it should be fine... most people don't learn of something by its acronym and those who cba to type out the whole name don't represent that large of a percentage of users. Although it really is all just stylistically arbitrary, and search functions everywhere should be able to search for as few as two characters -_-.

This is inaccurate. Searching for "Oblivion Graphics Extender" would yield every thread that included any one of those words - the search functionality is terrible. Unless they've upgraded it in the past few months, which I... doubt.

The acronym is important.
User avatar
Sweet Blighty
 
Posts: 3423
Joined: Wed Jun 21, 2006 6:39 am

Post » Fri May 27, 2011 6:43 pm

Hmm... Are you saying this doesn't work?

It should work just fine, but keep in mind that there are much faster/more efficient methods of doing that. My objection was more in reference to the 'requires' clause.
User avatar
clelia vega
 
Posts: 3433
Joined: Wed Mar 21, 2007 6:04 pm

Post » Fri May 27, 2011 6:54 pm

Somehow I missed these posts:

@ Wrinklyninja

How about we compile the current list of current shaders, and possibly my new bloom once its finished, into a alpha package. We could have a preset shaderlist so people stop asking about the black and white noise instead of reading the OP as they should. Then once more shaders and more versions come out, we can add on to that package with Scanti's updates and rewrites and call it an official BETA plugin. Then maybe in the distant future, we can have a GUI front.


Sounds good, though I was going to hold off the idea of such a package till the next version of Scanti's plugin. I've also got a very pointless colour inverter/amplifier that we could add to that. :)

My reasoning is that if we compiled a single release right now, we'd get not much different from what we can get anyway. If we wait till we've got variable passing functions, and whatever else is coming with the next plugin, then we can get a massive leap in progress towards a decent foundation, with Oblivion-side scripting letting us have and MGE-like interface and automagic variable modification and stuff like that. That would then present a solid 'core' to which we could then improve upon and add shaders to at our leisure. Also, I'm sure we could all do with the extra time to improve stuff further. :wink:

When I used your shader, I thought on it myself. My thoughts were to not just sample the very central pixel, but some additional pixels around that point as well. You could one of the following with those pixels:
1) Average these values together in some manner to get a single depth.
2) Identify a focus range, where the central point identifies one limit of your min/max range, and the average fills the other. This would be less realistic, but it would allow instant focusing on objects, which would be nice in hectic battles where you're moving around a lot.

In any case, you might want to try a variety of ideas to find the best effect.

Now, the trick is to increase this sampling radius when the player turns the camera (this would probably have to be delivered in a shader constant), then when the camera stops moving too much, reduce it over a second or so to practically just a single point so it "focuses" on what the player is pointing at. You could imagine it being a lot similar to the targeting reticule in FPS games. When the player turns, the reticule spreads out, but when they stop moving and focus on their target, it gets smaller and smaller over time until they are cross hairs, indicating maximum accuracy.

What do you think?


Very good ideas. :) I'm not keen on 2), but 1) and the camera tricks idea are good. I'll play around with 1), and see how it looks, and possibly include it in the next version. I must thank you for your blur effect in SSAO, it gave me a few good ideas, as well as weighting values to improve my blur, which looks a lot better now. I think I just didn't have enough samples to get a decent effect before too.

EDIT: I tried the averaging of the focus depth, taking a 5x5 block around the centre pixel, but I found that you'd either have to take a very big block, or just average between a bunch of pixels at regular intervals. Trouble is, if you take those intervals, and they happen to have a very large depth difference, your focus goes way out. And I'm too lazy to deal with corrective statistics. :P

I also thought a bit about the reticule size changing idea, and that would be possible with my current setup plus the ability to change variables via the CS, as I could do that through Oblivion scripting, I think.
User avatar
Jeff Turner
 
Posts: 3458
Joined: Tue Sep 04, 2007 5:35 pm

Post » Fri May 27, 2011 6:10 pm

What's up with you, IlmrynAkios? You were allover this stuff before, but you don't seem to be around much. RL?
User avatar
Sammie LM
 
Posts: 3424
Joined: Thu Nov 30, 2006 1:59 pm

Post » Fri May 27, 2011 5:53 pm

I know this has kinda been asked before, but why was it so much easier to do MGE for Morrowind? Or maybe it wasn't... it has taken a few years to get to where it is now, I wonder how Oblivion will look in a few years. I was haxin' around Morrowind with just the MGE and a bunch of console cheats, just for nostalgia, man was it fun to see it again.

But I realized something. I really do like Morrowind over Oblivion. Morrowind just had more to do, but adding on all the graphics improver's and the such, just kind of defeats the point of playing Morrowind again. It like, I won't play it without the graphic improving mods, but if I do play it with them, then why not just play Oblivion.

Truth be told, I just can't bring myself back into the fold of playing and modding and crashing that is both games. I'll just wait until TES:V... and it damn well better be the best game ever.

I love the progress, but it sounds a bit too buggy for me to even try, I mean, even MGE still has problems with fog and SSAO(<--One of my favorite visual techs, btw.) Make me wonder if it would just be better and easier to combine everyones modding skill and recreate Morrowind and Oblivion in the Crytek or Unreal engine. :P
User avatar
Tom Flanagan
 
Posts: 3522
Joined: Sat Jul 21, 2007 1:51 am

Post » Fri May 27, 2011 11:37 am

I actually been designing my own game with the Unreal Engine Development kit, nothing complex just veryt simple. Can't say it would be a walk in the park for oblivion and I doubt anyone would take on that ammount of work.
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Fri May 27, 2011 6:16 am

What's up with you, IlmrynAkios? You were allover this stuff before, but you don't seem to be around much. RL?

In a nutshell. I ended up getting really busy w/ college, ended up putting Oblivion away for a while and just never got back into it, among other stuff. But I guess that seguays rather neatly into...

I actually been designing my own game with the Unreal Engine Development kit. Can't say it would be a walk in the park for oblivion and I doubt anyone would take on that ammount of work.


Sorta this. Been writing a fully featured game engine from scratch, and although It's been sitting in a just-less-than-usable state for some time (input, disk I/O and core rendering functionality are done and can talk to one another, though most of the higher-level stuff like actual content loading is still in the design/preliminary implementation phase) I've really been dumping all my free time into getting it into a working state. I've really been trying my hardest to take all the lessons learned from my considerable Oblivion, Source/HL2, Doom and Unreal modding experiences and making something I really consider to be in a category all of itself, incorporating a lot of what I consider to be good ideas (for example, Unreal really makes *extensive* use of scripting, to the point where UE3 itself is really just a set of libraries the scripts call into. Thus, modders are really free to do whatever the hell they want) and trying to improve upon them wherever possible (for example, moving very sensitive stuff such as core netcode layers back into native engine code and using Mono for a JIT-compiled scripting framework, which I think has got to be one of the best decisions I've ever made for the project)

Other than that, I've been ramping up the graphics research so I have an idea of what do do when the model and texture loaders are working. Area lights/shadows, reprojection caches, physically-based shading, irradiance volumes, sparse virtual texturing, experimental compute-shader based deferred lighting, fixed-point HDR encoding methods, dynamic MSAA/morphological filtering, hardware tessellation, the works. This thing is going to look *good* at minimum. I also wuv the hell out of FMOD, despite my initial hesitancy.


So, this post, TL;DR edition: Other stuff. But I still drop by every so often to tell you youngins how do do it the right way D:
Now get off my lawn!
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm

Post » Fri May 27, 2011 1:43 pm

Youngins? :P

(Professor Farnsworth voice) If anyone needs me, i'll be in the angry dome! ;)

I wish you luck on the D-kit IlmrynAkios :foodndrink:
User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Post » Fri May 27, 2011 6:47 pm

I'm having a bit of trouble with something, and somebody here probably knows the answer. What I'm trying to do is identify the point in the current frame that was the focus point in the last frame. Here's my code:
float2 FocusPoint = float2(0.5,0.5);float2 GetLastFrameFocusPoint(VSOUT IN){	float4 lastframe = tex2D(LastFrameSampler,FocusPoint);	float4 thisframe = tex2D(FrameSampler,IN.UVCoord);		if (dot(thisframe,float4(1,1,1,1)) == dot(lastframe,float4(1,1,1,1))) {		return IN.UVCoord;	}}float4 DoF(){	float2 LastFrameFocusPoint = GetLastFrameFocusPoint();	float4 lastframeDoF = DoFEffect(LastFrameFocusPoint);	float4 thisframeDoF = DoFEffect(FocusPoint);	return thisframeDoF; //Just testing everything works so far.}

My problem is that it fails to compile the float2 LastFrameFocusPoint = GetLastFrameFocusPoint(); line, saying the function does not take 0 parameters. How come then that this works:
float4 DoFEffect(VSOUT IN, uniform float2 focus) : COLOR0{...stuff happens...}technique t0 {	pass p0	{		VertexShader = compile vs_1_1 FrameVS();		PixelShader = compile ps_3_0 DoFEffect(FocusPoint);		CullMode = none;	}	}


When the DoFEffect function is called there, it's only supplied with one parameter, whereas the function lists two, and that works fine. Any help?
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Fri May 27, 2011 9:55 pm


Sorry, the HLSL passing stuff has always been a bit of a black art for me. I believe it has to do with semantic mapping(s) and some behind-the-scenes work, but perhaps you can refactor your approach somewhat to avoid the problem. If I'm understanding this correctly, you're trying to reproject the old focus point in order to get the previous depth? Considering the focus point is always (0.5, 0.5) is there a reason why you chose not to just get the value from the previous depth buffer at that point? I can imagine there might be issues if the player is moving/turning but I doubt it would be obvious enough to warrant doing something more sophisticated.
User avatar
xxLindsAffec
 
Posts: 3604
Joined: Sun Jan 14, 2007 10:39 pm

Post » Fri May 27, 2011 12:30 pm

I can get the previous frame's depth buffer? Sweet! Yeah, that's my general direction. I'm trying to work out what the previous frame's blurring was, so I can lerp it with the current frame's blur to get a smooth transition between the two, specifically for when the focus changes, as it does when the player moves/turns.

Oh, and the focus point might not always be (0.5,0.5), I've made it so that I can change it if I wish, which can come in quite handy once I can pass variables to the shader from Oblivion. If I can get the previous frame's depth buffer then I don't need to look for this point, I can just set it to the focus point in that depth buffer texture.

So, my question is now: How do I get the previous frame's depth buffer?
User avatar
Abi Emily
 
Posts: 3435
Joined: Wed Aug 09, 2006 7:59 am

Post » Fri May 27, 2011 8:41 pm

So, my question is now: How do I get the previous frame's depth buffer?
Make offerings to Scanti ?
User avatar
Mason Nevitt
 
Posts: 3346
Joined: Fri May 11, 2007 8:49 pm

Post » Fri May 27, 2011 9:05 pm

I'll get right on it:

@ Scanti: :icecream: :cake: :tops: :trophy: Nah, I'm pretty sure I don't really need it, and if it's not already accessible, I don't really request it, I could do it just fine if I could get my code to compile.
User avatar
Philip Lyon
 
Posts: 3297
Joined: Tue Aug 14, 2007 6:08 am

Post » Fri May 27, 2011 6:55 pm

I'm not sure if this is something you're already aware of, or if it's something that's only affecting me - but using SSAO has some strange effects underwater. My textures vanish and i'm left with white/grey meshes, as well as an increased underwater view range. It looks pretty weird. Here's an annotated video, which should hopefully give you a better idea of what's going on: http://www.youtube.com/watch?v=R-oakcdeOy8

It's faaaaar from gamebreaking, and a price i'd happily pay to use SSAO! Thought I should post this as a possible bug report, being one of the few ways I can contribute to these mods.



I'm not using any water mods, and the shaderlist.txt only has Godrays and SSAO enabled (both spelt correctly, as the OP explains). Deleting SSAO from the active shaders removes all issues, so the Godrays aren't causing any problems. Likewise, enabling SSAO without any Godrays still results in textureless underwater views.

Could this be an issue with the shader, or something i'm doing wrong?
User avatar
Lily Evans
 
Posts: 3401
Joined: Thu Aug 31, 2006 11:10 am

Post » Fri May 27, 2011 8:55 am

I'm not sure if this is something you're already aware of, or if it's something that's only affecting me - but using SSAO has some strange effects underwater. My textures vanish and i'm left with white/grey meshes, as well as an increased underwater view range. It looks pretty weird. Here's an annotated video, which should hopefully give you a better idea of what's going on: http://www.youtube.com/watch?v=R-oakcdeOy8

It's faaaaar from gamebreaking, and a price i'd happily pay to use SSAO! Thought I should post this as a possible bug report, being one of the few ways I can contribute to these mods.



I'm not using any water mods, and the shaderlist.txt only has Godrays and SSAO enabled (both spelt correctly, as the OP explains). Deleting SSAO from the active shaders removes all issues, so the Godrays aren't causing any problems. Likewise, enabling SSAO without any Godrays still results in textureless underwater views.

Could this be an issue with the shader, or something i'm doing wrong?

This is normal, and your textures are there.
User avatar
Justin Bywater
 
Posts: 3264
Joined: Tue Sep 11, 2007 10:44 pm

Post » Fri May 27, 2011 8:52 pm

Could this be an issue with the shader, or something i'm doing wrong?

The SSAO shader has no idea how close or far the fog is. Geometry obscured by fog is still processed by the shader, and as such, you can see the AO of that geometry, even if you can't directly see the geometry itself. There is no true fix until the next release of OBGE, but if you make the water fog more distant, you can lessen the noticability greatly. You may see this same problem in heavily fogged scenes above water, as well, but this is a much rarer circumstance, and probably based a lot on weather mods.

EDIT: I tried the averaging of the focus depth, taking a 5x5 block around the centre pixel, but I found that you'd either have to take a very big block, or just average between a bunch of pixels at regular intervals. Trouble is, if you take those intervals, and they happen to have a very large depth difference, your focus goes way out. And I'm too lazy to deal with corrective statistics. :P

I also thought a bit about the reticule size changing idea, and that would be possible with my current setup plus the ability to change variables via the CS, as I could do that through Oblivion scripting, I think.

I don't believe you would need to do a 5x5 area. I would have started with a simple 8-point ring sample. But, again, it might be one of those things you might need to play with.

I wouldn't think these ideas would have worked well without the shader constants from scripts. They are very dependent on the size of the sample radius/area, and you really do need to vary it based on the amount of activity, and I can't think of anything you can do in the shader itself. I just suggested them as ideas you can play with after the next version of OBGE comes about.
User avatar
Tyrel
 
Posts: 3304
Joined: Tue Oct 30, 2007 4:52 am

Post » Fri May 27, 2011 8:38 am

I don't believe you would need to do a 5x5 area. I would have started with a simple 8-point ring sample. But, again, it might be one of those things you might need to play with.

I wouldn't think these ideas would have worked well without the shader constants from scripts. They are very dependent on the size of the sample radius/area, and you really do need to vary it based on the amount of activity, and I can't think of anything you can do in the shader itself. I just suggested them as ideas you can play with after the next version of OBGE comes about.


Well, I'll keep messing with them, and get back to them after the release of the next OBGE.

In other news, I've uploaded v4 of my DoF featuring a new variable controlling the focus point, and a much better blur effect. Not a huge lot of additions, but improvements are improvements, and I wanted a copy online as backup before I rip it to shreds trying to get an effect over time. You can get it at the same link as before.
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Fri May 27, 2011 1:33 pm

The SSAO shader has no idea how close or far the fog is. Geometry obscured by fog is still processed by the shader, and as such, you can see the AO of that geometry, even if you can't directly see the geometry itself. There is no true fix until the next release of OBGE, but if you make the water fog more distant, you can lessen the noticability greatly. You may see this same problem in heavily fogged scenes above water, as well, but this is a much rarer circumstance, and probably based a lot on weather mods.

Ok, so underwater effects are essentially the same as fog effects. Thanks for the feedback.

Whenever the weather gets foggy or starts to thunderstorm, I just disable the shaders through the console, so I can easily do the same if I ever need to go underwater for prolonged periods (as if that situation will arise much :P). I guess that's the cool thing about being able to switch these shaders on and off so freely.
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Fri May 27, 2011 8:34 am

Well, I'll keep messing with them, and get back to them after the release of the next OBGE.

In other news, I've uploaded v4 of my DoF featuring a new variable controlling the focus point, and a much better blur effect. Not a huge lot of additions, but improvements are improvements, and I wanted a copy online as backup before I rip it to shreds trying to get an effect over time. You can get it at the same link as before.

Do I need to update the OP? Or are you not releasing v4 yet?
User avatar
Bek Rideout
 
Posts: 3401
Joined: Fri Mar 02, 2007 7:00 pm

Post » Fri May 27, 2011 9:00 pm

The only thing in the OP that needs to be changed is the version number, the link in the OP points to the updated file.
User avatar
Angelina Mayo
 
Posts: 3427
Joined: Wed Jan 24, 2007 4:58 am

Post » Fri May 27, 2011 6:57 am

You could, I dunno, google it?

Here's the dump of the Wikipedia entry (first google result) short description:


Wow. That's mature. I was wondering the same thing until I saw the screen shots and recognized it as ambient occlusion. Perhaps you should mention what it stands for in parentheses after the first mention of it in the original post and you wouldn't have to make snide comments to people who are interested in your project.
User avatar
Josh Trembly
 
Posts: 3381
Joined: Fri Nov 02, 2007 9:25 am

Post » Fri May 27, 2011 8:24 am

It was neither a snide comment nor an immature one. I don't make them. It was a rather disbelieving suggestion to do what seems obvious in today's internet culture (ie. Google is your friend). The efficiency of google searching something you know the name of, and the general area it is part of (SSAO, graphic effects) is a lot higher than posting in a forum thread, since you can find out in a couple of minutes rather than an unknown amount of time. It also helps nurture some initiative, which is never a bad thing.

And then I did give the information anyway in order to prevent the possibility of being unhelpful, citing my source too, should he want to read more on it from there. I can only say that my post was missing some emoticons to better define the tone of my post, and prevent misreadings.
User avatar
Trent Theriot
 
Posts: 3395
Joined: Sat Oct 13, 2007 3:37 am

Post » Fri May 27, 2011 4:07 pm

God, those screenshots in the OP are breathtaking! You guys rock.

Potential noob question: will any of this give the possibility of a real fade-to-black in Oblivion?
User avatar
Arrogant SId
 
Posts: 3366
Joined: Sat May 19, 2007 11:39 am

Post » Fri May 27, 2011 7:33 pm

What do you mean by a real fade to black? Is there a video of such an effect that you can link to (doesn't need to be oblivion, just anything that shows what you're looking for)?
User avatar
luis ortiz
 
Posts: 3355
Joined: Sun Oct 07, 2007 8:21 pm

PreviousNext

Return to IV - Oblivion