Oblivion Graphics Extender, Thread 13

Post » Fri May 13, 2011 9:55 am

Excellent. :D

Regarding eyepos, I'm pretty sure Scanti told me you can get it from the world matrix as:

float3 eyepos = float3(m44world[3][0],m44world[3][1],m44world[3][2]);

I've not had much success using it though, but that could just be me.

Eye adaption is also something I'd be very interested in for DoF, you probably need to do it using f4Time.x and a complicated lerp arrangement. :shrug: I also need to figure out how to transition between two levels of blur. :(

Good to know. I will try that as soon as possible. Maybe it is not accurate to begin with. In Morrowind, we figured out the sun light position and sun disc position are separate things. But still this is a calculation related problem, the center position should stay stable.

I think you're right about time and lerp arrangements, but I suspect that, it can only work for DoF shader but not Color Grading. Because I have to hold a color value through time but for DoF you will hold the time value through time. (What I am saying doesn't make sense at all. :P) They can be the same thing, I haven't figured that out yet. :) But hey, I'm getting the hang of things, I can call myself a level 2 shader writer at last. :P
User avatar
Kara Payne
 
Posts: 3415
Joined: Thu Oct 26, 2006 12:47 am

Post » Fri May 13, 2011 7:27 am

http://www.4shared.com/file/256475783/9bd310cb/GRS_v4_vars_for_oge_plugin.html
Vars for plugin, could you please add them? They are final, hopefully. (20 values: 13 time based variables, 3 sky bright pass variables, 4 miscellaneous variables :))
Thanks.


Eye adaption is also something I'd be very interested in for DoF, you probably need to do it using f4Time.x and a complicated lerp arrangement. :shrug: I also need to figure out how to transition between two levels of blur. :(
Better to pass that info through OBGE's scripting pipeline, where you can calculate time in a relatively easier manner.

PS: Gah! Must visit Grammar Nanny for a checkup .
User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Fri May 13, 2011 12:00 pm

Hi there, just got the new wersion of godrays and something is wrong i use the latest version of obge i have a radeon 4850 and when i enable the god rays everything in game goes black and the only thing i can see are the rays emited by the sun it looks magnificent though:)) Hope you can identify the problem, help please i want to use this awsome shader.
User avatar
Rachie Stout
 
Posts: 3480
Joined: Sun Jun 25, 2006 2:19 pm

Post » Fri May 13, 2011 10:31 am

Thx. It perfectly, but with the version 2 OBGEv2. With version 3 just does not work :(

Thats right the same for me works with the version 2 on the third it just makes evrything go black.And btw fu.. it looks amazing.
User avatar
Silvia Gil
 
Posts: 3433
Joined: Mon Nov 20, 2006 9:31 pm

Post » Fri May 13, 2011 2:59 pm

Hi there, just got the new wersion of godrays and something is wrong i use the latest version of obge i have a radeon 4850 and when i enable the god rays everything in game goes black and the only thing i can see are the rays emited by the sun it looks magnificent though:)) Hope you can identify the problem, help please i want to use this awsome shader.



Thats right the same for me works with the version 2 on the third it just makes evrything go black.And btw fu.. it looks amazing.


Yes, the latest version seems to be in some sort of debug mode. No doubt vtastek will get to it soon enough.
User avatar
james tait
 
Posts: 3385
Joined: Fri Jun 22, 2007 6:26 pm

Post » Fri May 13, 2011 12:24 pm

I'm very confused over this. It works here. UndWDoG was helping me beta testing but after removing the debug mode support completely, the result was the same. I suspect "density" get zero problem or a depthbuffer difference.

Or having the shader fragment(I'm not happy with that anyway) from Nvidia, there is a chance that ATIs are causing a problem. But if it is working with v2, then maybe scanti can shed a light on the issue. (I will try to find an ATI card to test, itmt.)

@shadeMe,
That must be me thanking. :foodndrink:

PS. Most probably, depthbuffer masking can be a problem.
float4 black = float4(1.0, 0.0, 0.0, 0.0);		float4 sky = 0;		if(forward<0 && gece<0.6)		{			float4 sample=tex2D(s1,IN.UVCoord);			//sample=1-sample;			sample=sample*sample;			sample=sample*sample;			sample=sample*sample;			sample=sample*sample;			sample=sample*sample;			//sample=1-sample;			sample=dot(sample,black);			sample = smoothstep(0.999,1, sample);			sample.a = 0.0f;			sky = tex2D(s0,IN.UVCoord);			sky = sky * sample.r;		}


I never looked at that part of the code before. Maybe it can be optimized in a way. It looks really bad from here.
User avatar
Loane
 
Posts: 3411
Joined: Wed Apr 04, 2007 6:35 am

Post » Fri May 13, 2011 2:43 pm

@shadeMe,
That must be me thanking. :foodndrink:
I might not be able to add those until later, seeing how I've finally become a bona fied Oblivion modder (my HDD is failing).

PS. Most probably, depthbuffer masking can be a problem.
float4 black = float4(1.0, 0.0, 0.0, 0.0);		float4 sky = 0;		if(forward<0 && gece<0.6)		{			float4 sample=tex2D(s1,IN.UVCoord);			//sample=1-sample;			sample=sample*sample;			sample=sample*sample;			sample=sample*sample;			sample=sample*sample;			sample=sample*sample;			//sample=1-sample;			sample=dot(sample,black);			sample = smoothstep(0.999,1, sample);			sample.a = 0.0f;			sky = tex2D(s0,IN.UVCoord);			sky = sky * sample.r;		}


I never looked at that part of the code before. Maybe it can be optimized in a way. It looks really bad from here.
Depth sampling can probably be reduced to this - Takes lesser instructions this way, unless I'm mistaken:
float4 depthMask = dot(pow(tex2D(depthSampler, IN.UVCoord), 11), float4(1.f, 0.f, 0.f, 0.f));depthMask = smoothStep(0.99f, 1.f, depthMask);return tex2D(s0, IN.UVCoord) * depthMask.x;
You could also try loosing your hermite interpolation for a linear one.
User avatar
Jordan Fletcher
 
Posts: 3355
Joined: Tue Oct 16, 2007 5:27 am

Post » Fri May 13, 2011 8:57 am

Well... the ColorGrading shader is quite........ disappointing, I was hoping to see something like http://www.youtube.com/watch?v=KU5FdHgvh0g&feature=related(0.12/0.10).
User avatar
kirsty williams
 
Posts: 3509
Joined: Sun Oct 08, 2006 5:56 am

Post » Fri May 13, 2011 7:02 am

I might not be able to add those until later, seeing how I've finally become a bona fied Oblivion modder (my HDD is failing).
....
You could also try loosing your hermite interpolation for a linear one.

It is OK, the shader is really done this time. I will focus on optimizations starting with depth mask. Maybe I can extract the ifs from shader code too. There is always room for optimizations. :)

Well... the ColorGrading shader is quite........ disappointing, I was hoping to see something like http://www.youtube.com/watch?v=KU5FdHgvh0g&feature=related(0.12/0.10).

It is doing exactly(almost) the same with the proposed photoshop method.(color blend avg of desaturated scene by 20% opacity) You can decrease opacity value for a more pronounced effect. (default 0.8, decrease). The method is an approximation, and targeting dynamic results.

The trouble is they need HUMANs adjusting colors scene by scene. 'You are here' mod and lot's of artist tweaks can achieve those. I'm searching the Internet for a dynamic method, no luck so far. Sources can help.

A true Color Grading will have the ability to change lots of Color properties in HLS-HLV-CMYK color spaces, add noise filtering and will be using predefined color offsets for each different environments. It is hard, maybe not even possible. :(

It is true, Oblivion and Morrowind are more realtime than Crysis. :o (at least need more care/harder to implement things due to dynamic/random diverse game environments, Crysis is a linear game in disguise)
User avatar
Jani Eayon
 
Posts: 3435
Joined: Sun Mar 25, 2007 12:19 pm

Post » Fri May 13, 2011 12:39 pm

Hi there, just got the new wersion of godrays and something is wrong i use the latest version of obge i have a radeon 4850 and when i enable the god rays everything in game goes black and the only thing i can see are the rays emited by the sun it looks magnificent though:)) Hope you can identify the problem, help please i want to use this awsome shader.


Try editting a line near the end of the shader. Find this section of the shader file:

pass p3 {	//VertexShader = compile vs_1_1 FrameVS();	Pixelshader = compile ps_2_0 SunCombine(); }


and change it to:

pass p3 {	VertexShader = compile vs_1_1 FrameVS();	Pixelshader = compile ps_2_0 SunCombine(); }


i.e. remove the //

For some reason ati cards must have the vertex shaders defined for all passes after you have used a ps3.0 shader in a pass. Whereas nVidia cards don't care (which is how the cards should behave). It could be a bug in my code so I'll look into it.
User avatar
CxvIII
 
Posts: 3329
Joined: Wed Sep 06, 2006 10:35 pm

Post » Fri May 13, 2011 4:26 am

That was an easy fix. Doesn't ATI/AMD have info on their site on how there GPUs handle shader code? Stuff like that should be readily available to anyone, I think. Does any one have any interesting values to try out with the DoF shader? Especially in combination with EgdeAA, that one seems to cancel out the blurryness... :unsure: :confused: :huh: :shrug:


Random logout again?!? sigh....
User avatar
laila hassan
 
Posts: 3476
Joined: Mon Oct 09, 2006 2:53 pm

Post » Fri May 13, 2011 7:21 pm

I just uploaded a fixed version of the Godrays shader with the changes Scanti posted. That's the only change to the package.
User avatar
Avril Churchill
 
Posts: 3455
Joined: Wed Aug 09, 2006 10:00 am

Post » Fri May 13, 2011 7:24 pm

Try editting a line near the end of the shader. Find this section of the shader file:

pass p3 {	//VertexShader = compile vs_1_1 FrameVS();	Pixelshader = compile ps_2_0 SunCombine(); }


and change it to:

pass p3 {	VertexShader = compile vs_1_1 FrameVS();	Pixelshader = compile ps_2_0 SunCombine(); }


i.e. remove the //

For some reason ati cards must have the vertex shaders defined for all passes after you have used a ps3.0 shader in a pass. Whereas nVidia cards don't care (which is how the cards should behave). It could be a bug in my code so I'll look into it.


that fixed my blackscreen problem, but i am still not getting the rays.everything worked fine with the previus obgev2.does anyone have an idea what could cause this?thx in advance taz

EDIT
i did some research and it seems that i am not alone with this problem.a lot of ati users are experiencing this,and i just noticed that DoF isn't working either.
exept of that everything works fine and i appreciate your work guys, this mod was the only reason why i reinstalled oblivion :)
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Fri May 13, 2011 8:13 am

Try editting a line near the end of the shader. Find this section of the shader file:

pass p3 {	//VertexShader = compile vs_1_1 FrameVS();	Pixelshader = compile ps_2_0 SunCombine(); }


and change it to:

pass p3 {	VertexShader = compile vs_1_1 FrameVS();	Pixelshader = compile ps_2_0 SunCombine(); }


i.e. remove the //

For some reason ati cards must have the vertex shaders defined for all passes after you have used a ps3.0 shader in a pass. Whereas nVidia cards don't care (which is how the cards should behave). It could be a bug in my code so I'll look into it.

That's a relief. Thanks scanti. :thumbsup:

That was an easy fix. Doesn't ATI/AMD have info on their site on how there GPUs handle shader code? Stuff like that should be readily available to anyone, I think. Does any one have any interesting values to try out with the DoF shader? Especially in combination with EgdeAA, that one seems to cancel out the blurryness... :unsure: :confused: :huh: :shrug:


Random logout again?!? sigh....

Well, if it is written, I didn't read it. I read lots of stuff but didn't encounter that part. I mostly follow by examples. And I'm not fond of vertex shaders myself.

BTW, color grading shader is buggy. It is not working correctly. Don't use it for a while. (added a simple mix but not linear interpolation!)
PS. I will convert some of my Morrowind shaders to Oblivion. Hopefully they will be less disappointing. :P One of them is a very neat effect.
PPS. Oblivion loads faster due to unmodded state, and support plugin in combination accelerates shader writing.
User avatar
Emmanuel Morales
 
Posts: 3433
Joined: Sat Oct 06, 2007 2:03 pm

Post » Fri May 13, 2011 2:27 pm

Oo00ooo, new shaders on the way! Cool.
User avatar
Laura Ellaby
 
Posts: 3355
Joined: Sun Jul 02, 2006 9:59 am

Post » Fri May 13, 2011 8:24 am

Greetings,


First of all, congratulations for your work. If only Oblivion wasn't so power-hungry...

My problem is with godrays...again. I redownloaded Godrays for Oblivion v4 (fixed version) (I have a HD4870) but still nothing...I waited for said hours in both morning and evening, but nothing. I feel sad...I have installed the DirectX update, as well as the latest drivers for my card.

Also, depth of field doesn't seem to work. SSAO workd fine.

I had downloaded obge v1 with said effects and they worked.
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Fri May 13, 2011 6:44 pm

where can I find the new godrays shader version?
User avatar
Hilm Music
 
Posts: 3357
Joined: Wed Jun 06, 2007 9:36 pm

Post » Fri May 13, 2011 3:45 pm

http://www.tesnexus.com/downloads/download.php?id=58030
User avatar
Jah Allen
 
Posts: 3444
Joined: Wed Jan 24, 2007 2:09 am

Post » Fri May 13, 2011 11:27 am

Dynamic Weather with OBGE Shaders!!!

http://img688.imageshack.us/img688/7662/dynamicweathertest03.jpg
http://img717.imageshack.us/img717/6572/dynamicweathertest02.jpg
http://img62.imageshack.us/img62/7168/dynamicweathertest01.jpg

Trying to work out a way for more realistic looking real-time weather. It works by using Sky Maps instead of transparent cloud textures. Still working out bugs and such (mostly trying to delve into the sky dome to allow mutliple sky maps for one weather type) but if all goes well, I shall be able to kick this off. A big problem I need to tackle is the switching of skymaps for night time. Ambient Coloring can be used for sunrise and sets but im thinking a script can assign a new sky map texture once it hits 8:00pm with a fade in timer. Thoughts?
User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Fri May 13, 2011 9:26 am

Dynamic Weather with OBGE Shaders!!!

http://img688.imageshack.us/img688/7662/dynamicweathertest03.jpg
http://img717.imageshack.us/img717/6572/dynamicweathertest02.jpg
http://img62.imageshack.us/img62/7168/dynamicweathertest01.jpg

Trying to work out a way for more realistic looking real-time weather. It works by using Sky Maps instead of transparent cloud textures. Still working out bugs and such (mostly trying to delve into the sky dome to allow mutliple sky maps for one weather type) but if all goes well, I shall be able to kick this off. A big problem I need to tackle is the switching of skymaps for night time. Ambient Coloring can be used for sunrise and sets but im thinking a script can assign a new sky map texture once it hits 8:00pm with a fade in timer. Thoughts?
I thought you'd given up on modding Oblivion :P Regardless, I'm a bit lost on what you've accomplished here. Have you figured out a way to hot swap cloud textures ? Or is it something else ?
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Fri May 13, 2011 5:04 am

Dynamic Weather with OBGE Shaders!!!

Relevant to my interests. Haven't been working on the volumetric cloud shader lately. Got irritated trying to find the proper lighting method to make the clouds look right at sunset. Right now, only the bottom of the clouds are properly shadowed. I think I have a good algorithm to get it to shade right, but it would require me to march the ray casted through the cloud both forwards and backwards, doubling the number of samples required to sample the cloud volume. I wonder if people would even notice the bad shadowing on the clouds...

These volumetric clouds would work much, much better in Shader Model 5, with it's better implementation of arrays, where I can simply store the cloud information in one pass through the cloud.

Anyways, off I go...
User avatar
El Goose
 
Posts: 3368
Joined: Sun Dec 02, 2007 12:02 am

Post » Fri May 13, 2011 6:37 pm

I thought you'd given up on modding Oblivion :P Regardless, I'm a bit lost on what you've accomplished here. Have you figured out a way to hot swap cloud textures ? Or is it something else ?

I said I wouldn't release anything but I still mod (mostly for me.) I just figured I'd share this with the project as I really like how things turned out. No I haven't figured that out but thats what im aiming for. Right now, it's just using sky maps to replace certain weathers. To put it simply, im trying to make weather more High Definition (in my own strange way.)
User avatar
Agnieszka Bak
 
Posts: 3540
Joined: Fri Jun 16, 2006 4:15 pm

Post » Fri May 13, 2011 12:05 pm

I think Hotswapping textures can be done using NifScript, I asked them about it a few times for a changing texture seasonal system.

NifScript
http://www.gamesas.com/index.php?/topic/922622-betawipz-nifscript/
User avatar
Olga Xx
 
Posts: 3437
Joined: Tue Jul 11, 2006 8:31 pm

Post » Fri May 13, 2011 5:47 am

I said I wouldn't release anything but I still mod (mostly for me.) I just figured I'd share this with the project as I really like how things turned out. No I haven't figured that out but thats what im aiming for. Right now, it's just using sky maps to replace certain weathers. To put it simply, im trying to make weather more High Definition (in my own strange way.)
This probably sounds dumb, but where exactly does OBGE come into this picture ?
User avatar
Jack Walker
 
Posts: 3457
Joined: Wed Jun 06, 2007 6:25 pm

Post » Fri May 13, 2011 11:41 am

Depth,
it is not linear. Its range is 0-1. But a value of 0.99 is half the land, the other half is compressed into last 0.01. I did some coding for creating a mask of it. But it didn't work as I suspect. But it works. :wacko:

float4 depthMask = dot(pow(tex2D(s1, IN.UVCoord),11), float4(1.0f, 0.f, 0.f, 0.f));depthMask = depthMask * 10000;depthMask = 1 - 10000/(depthMask+10000);depthMask = step(0.5, depthMask);//depthMask = pow(depthMask, 256); //this is the alternate method, works toosky = tex2D(s0, IN.UVCoord) * depthMask.x;

Since it is between 0-1 and this causing me to enter values near 0.9999.. which is impossible, I first multiply it with 10000, so it scales 0-10000. After that I applied a code which will turn 0.99(9999) to 0.502... It worked to some extend, I thought putting 0.9 will work this time, but it didn't. 0.5 appears to be working. But I don't know if Oblivon's view distance can exceed that. Very weird. (and I don't know if those numbers vary for ATI users. )


The second problem: searchlight effect, now I said something about eyepos, but I meant sunpos. But sunpos is sunvec*high number anyway. What I was searching for was not sunpos but actually sunvec, I understood that finaly. :facepalm: I mixed the names, I thought sunpos as sun position. It is sunvec. Anyway, the problem is aspect ratio. :) I will fix that soon.

For some ATI users, the shader is still not working I heard. At this time, godrays shader still doesn't have support for plugin support, for variables at least. So that could be a problem.(try without plugin support and a clean save)

Now, I understand what game developers feel when they face hardware conflicts in their game code. Coding for Nvidia is relaxed, but ATI have strict rules. But I have no idea. Most of the code is written in simple universal mathematics, it shouldn't be a problem. :shrug:
User avatar
Adam Porter
 
Posts: 3532
Joined: Sat Jun 02, 2007 10:47 am

PreviousNext

Return to IV - Oblivion