[WIPz/RELz] Sun shaft rays

Post » Thu Nov 25, 2010 6:28 am

Awesome! and yes those screens are done with sunshaft 001 which is, imo, one of the must-have shaders for MGE.

Gonna try this new version now, i'll probably terrorize you with even more screenshots ;)
User avatar
Rach B
 
Posts: 3419
Joined: Thu Mar 08, 2007 11:30 am

Post » Thu Nov 25, 2010 4:21 pm

Will only work with my modified .dll file for rev117 (d3d8_sundir04.zip).

Awesome. I'll try this out right now! <3
User avatar
Captian Caveman
 
Posts: 3410
Joined: Thu Sep 20, 2007 5:36 am

Post » Thu Nov 25, 2010 5:22 pm

Just found that 0.02 has a bug that causes the sun to vanish at specific view angles. This is related to the horizon clipping, but finding a solution for this turned out to be pretty complicated. I will release an update as soon as I fixed this :/

EDIT:
Should work now. Had to do some extra computations though, might decrease performance. I added an option in the shader file to toggle horizon clipping. So if you don't want that effect, you can disable it.
http://www.speedyshare.com/586255660.html (v0.02a)
User avatar
Matthew Warren
 
Posts: 3463
Joined: Fri Oct 19, 2007 11:37 pm

Post » Thu Nov 25, 2010 8:57 am

Dang man, you sure do work fast....complicated matters take you ~an hour.....seriously, can you come find a solution to my debt problem? lol :P :D
User avatar
Chavala
 
Posts: 3355
Joined: Sun Jun 25, 2006 5:28 am

Post » Thu Nov 25, 2010 3:36 pm

Amazing!!!!!
User avatar
Josh Lozier
 
Posts: 3490
Joined: Tue Nov 27, 2007 5:20 pm

Post » Thu Nov 25, 2010 3:29 am

Whoops. ;) Fixed, thanks.

I'm pretty sure that the screens you linked were done with this shader. Sun rays always worked underwater, they are simply toned down by Morrowind's blueish underwater coloring. You could increase the sunray strength to make them more pronounced.


Will only work with my modified .dll file for rev117 (d3d8_sundir04.zip).

I am correct that your sundir04 code was included in rev118, and not skipped along the way?

Grabbed the new copy, gonna have to try it out.
I also had a thought, I'll pm you with it. ;)
User avatar
Matt Bee
 
Posts: 3441
Joined: Tue Jul 10, 2007 5:32 am

Post » Thu Nov 25, 2010 1:43 pm

Wow. That shader instantly became an absolute-essential to me. :wub:
Thanks for this. :goodjob:

But (of course there's a 'but') i got one little issue that still bothers me a bit:
For some reason i never get a well defined sun disk like seen on the various screenshot of this shader. Looking directly at the sun it always appears to be an unshapely http://img195.imageshack.us/img195/9139/mgescreenshot134.jpg or (even worse) the whole screen http://img194.imageshack.us/img194/2402/mgescreenshot135.jpg.

I use the included transparent sun texture and i didn't change anything in the shadercode (except FoV value). Also my morrowind.ini isn't tweaked at all (at least colorwise) and i don't use any additional bloomshaders or stuff (Only shader i use in addition is phal's recent underwater caustic shader).

Any hints on this? :shrug:
User avatar
Kari Depp
 
Posts: 3427
Joined: Wed Aug 23, 2006 3:19 pm

Post » Thu Nov 25, 2010 12:27 pm

Wow. That shader instantly became an absolute-essential to me. :wub:
Thanks for this. :goodjob:

But (of course there's a 'but') i got one little issue that still bothers me a bit:
For some reason i never get a well defined sun disk like seen on the various screenshot of this shader. Looking directly at the sun it always appears to be an unshapely http://img195.imageshack.us/img195/9139/mgescreenshot134.jpg or (even worse) the whole screen http://img194.imageshack.us/img194/2402/mgescreenshot135.jpg.

I use the included transparent sun texture and i didn't change anything in the shadercode (except FoV value). Also my morrowind.ini isn't tweaked at all (at least colorwise) and i don't use any additional bloomshaders or stuff (Only shader i use in addition is phal's recent underwater caustic shader).

Any hints on this? :shrug:

Any kind of HDR (which I think is included in any other persons list of shaders they use) might help to tone things correctly. For instance the Truebloom shader should have a HDR component. And there are also loose HDR solutions avaliable.
User avatar
Astargoth Rockin' Design
 
Posts: 3450
Joined: Mon Apr 02, 2007 2:51 pm

Post » Thu Nov 25, 2010 7:32 am

Any kind of HDR (which I think is included in any other persons list of shaders they use) might help to tone things correctly. For instance the Truebloom shader should have a HDR component. And there are also loose HDR solutions avaliable.
I am having the exact same problem, and HDR does not fix the issue (using trueBloom specifically). The sundisc seems to want to stay in the middle of the screen after a certain point of looking to the east (may change to west at late hours, untested). This happens if you look at the sundisc directly. The screen will also turn completely white save for very close objects if you look at a certain part of the screen which seems unrelated to the position of the disc which is very strange.
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Thu Nov 25, 2010 3:08 pm

A reason for the screen white-out could be a much too aggressive bloom shader, which overbrightens the sun glare. What you definetly should try is opening Morrowind.ini, find the 'Sun Glare Fader Max' setting and set it to zero, or anything close to zero.
If that does not help either, you could open the sun shaft shader fx file and look for '#define raystrength xx' and change xx to some smaller vallue to reduce the sun ray intensity. Setting the 'sunrayocclude' value to 1 might also help.
User avatar
Katie Pollard
 
Posts: 3460
Joined: Thu Nov 09, 2006 11:23 pm

Post » Thu Nov 25, 2010 9:42 am

Would it be possible to change the effect to a more yellow color? It would probably make the sun more visible together with bloom/HDR that already makes the sky almost completely white. The beams that comes off also gives a very hard/cold light.

I tried playing around with the .dds for the sun (making i more yellow) and tuning how much the sunshaft shader should make it visible, but the results werent that good.
User avatar
michael danso
 
Posts: 3492
Joined: Wed Jun 13, 2007 9:21 am

Post » Thu Nov 25, 2010 7:20 am

Would it be possible to change the effect to a more yellow color? It would probably make the sun more visible together with bloom/HDR that already makes the sky almost completely white. The beams that comes off also gives a very hard/cold light.

I tried playing around with the .dds for the sun (making i more yellow) and tuning how much the sunshaft shader should make it visible, but the results werent that good.

This shader draws its own sun. You can see the real sun sometimes under shader sun.

To have a good result disable the glare, I even recommend disabling the real sun texture too(or make it so small, it won't appear behind), it is not effecting rays colors and (should) not (be) visible anyways.

Use sun glare image comes with the shader,
sundiscdesaturate 0.3 // Desaturation of sun disc color, negative values for more saturation


This line would help, give some negative values, lower brightness tweaks...
User avatar
Adrian Morales
 
Posts: 3474
Joined: Fri Aug 10, 2007 3:19 am

Post » Thu Nov 25, 2010 3:49 pm

How do i disable the real sun texture? I'm already using the NoSunGlare. My ini for the sun now looks like this:

Sun Glare Fader Max=0.0
Sun Glare Fader Angle Max=0.00
Sun Glare Fader Color=250,120,5

yes I've tried sundiscdesaturate too, but i cant see any difference whatsoever, i've tried extreme values like 9, -9 or even -50 and 50 and it doesnt make any difference at all for me.

One thing that really helped was going back to the vanilla sky textures, SWG skies are far too bright to be used with bloom it seems, even small values. Changing the weather settings for the sky helped too, they really need to be tuned down quit a bit when using bloom..
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Thu Nov 25, 2010 6:02 pm

sorry for the noob question but: how do I "open the shader editor and add 'sunshaft_v002a' to your active shader list"?

When I open up the Shader Editor, there is a big blank space, with a box to "Select Technique" in the upper left hand corner. What do I do?
User avatar
Greg Swan
 
Posts: 3413
Joined: Tue Jun 05, 2007 12:49 am

Post » Thu Nov 25, 2010 5:08 am

sorry for the noob question but: how do I "open the shader editor and add 'sunshaft_v002a' to your active shader list"?

When I open up the Shader Editor, there is a big blank space, with a box to "Select Technique" in the upper left hand corner. What do I do?

Click the 'Edit active' button and then double click on the shader(s) you want from the list.
User avatar
Chantel Hopkin
 
Posts: 3533
Joined: Sun Dec 03, 2006 9:41 am

Post » Thu Nov 25, 2010 9:54 am

How do i disable the real sun texture? I'm already using the NoSunGlare. My ini for the sun now looks like this:

Sun Glare Fader Max=0.0
Sun Glare Fader Angle Max=0.00
Sun Glare Fader Color=250,120,5

yes I've tried sundiscdesaturate too, but i cant see any difference whatsoever, i've tried extreme values like 9, -9 or even -50 and 50 and it doesnt make any difference at all for me.

One thing that really helped was going back to the vanilla sky textures, SWG skies are far too bright to be used with bloom it seems, even small values. Changing the weather settings for the sky helped too, they really need to be tuned down quit a bit when using bloom..

Try using the glare dds for sun too. I don't think you will notice it. (The ini settings has no effect in my game, I don't know why. I had to use the glare file.) Other brightness setting might be overriding the saturation of the sun disc maybe. I will take a look for possible tweaks. You know vanilla sun fades to nothing during sunsets, what the [censored] with that? I wish we can have TOD, maybe a scripter can help, if finding it from engine isn't possible.

sorry for the noob question but: how do I "open the shader editor and add 'sunshaft_v002a' to your active shader list"?

When I open up the Shader Editor, there is a big blank space, with a box to "Select Technique" in the upper left hand corner. What do I do?

http://mgeshaderlibrary.wikispaces.com/Using+Shaders
User avatar
Antonio Gigliotta
 
Posts: 3439
Joined: Fri Jul 06, 2007 1:39 pm

Post » Thu Nov 25, 2010 6:51 am

col = max(col,suncoldisc*sundiscbrightness)*occl + col * (1 - sundiscocclude*occl);

I checked the calculations, the suncoldisc is carrying good colors but something goes wrong there resulting the less powerful sunset suns. I made a cheap hack.

http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss27.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss30.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss33.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss45.jpg

The sun colors are now nice but there is a problem. They aren't supposed to be foggy.
User avatar
Joey Bel
 
Posts: 3487
Joined: Sun Jan 07, 2007 9:44 am

Post » Thu Nov 25, 2010 12:04 pm

This is a very cool shader, I love it. I especially like the temporary 'vision blackout' when you look straight at the sun, then away. Awesome!
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Thu Nov 25, 2010 4:43 pm

Try using the glare dds for sun too. I don't think you will notice it. (The ini settings has no effect in my game, I don't know why. I had to use the glare file.) Other brightness setting might be overriding the saturation of the sun disc maybe. I will take a look for possible tweaks. You know vanilla sun fades to nothing during sunsets, what the [censored] with that? I wish we can have TOD, maybe a scripter can help, if finding it from engine isn't possible.


http://mgeshaderlibrary.wikispaces.com/Using+Shaders

thanks, that's just what I needed!
User avatar
Kim Kay
 
Posts: 3427
Joined: Fri Oct 13, 2006 10:45 am

Post » Thu Nov 25, 2010 8:19 pm

For everyone using this shader, you should try using the following console command:

set timescale to 2000

This makes the day go by really fast, it's pretty cool to see the sun flying by and the colours changing and everything. :)
User avatar
Amber Hubbard
 
Posts: 3537
Joined: Tue Dec 05, 2006 6:59 pm

Post » Thu Nov 25, 2010 1:58 pm

This is a very cool shader, I love it. I especially like the temporary 'vision blackout' when you look straight at the sun, then away. Awesome!


Heh that is probably a bug you're seeing, the ATI black sun bug..

yes set timescale is very usefull for checking how the sun/sky looks if you dont want to use the in-game rest :) i use it all the time when tweaking morrowind.
User avatar
Darren Chandler
 
Posts: 3361
Joined: Mon Jun 25, 2007 9:03 am

Post » Thu Nov 25, 2010 1:49 pm

Heh that is probably a bug you're seeing, the ATI black sun bug..


No, it's not a bug, the sun itself doesn't turn black, not to mention I'm not using an ATI card. It's pretty obvious it's intentional. Center your cursor on the sun so everything whites out, then look down at your feet. Your ability to see is impaired for a few seconds as the screen is darkened, and then it fades back in. Totally different from the black sun bug.
User avatar
TRIsha FEnnesse
 
Posts: 3369
Joined: Sun Feb 04, 2007 5:59 am

Post » Thu Nov 25, 2010 11:02 am

No, it's not a bug, the sun itself doesn't turn black, not to mention I'm not using an ATI card. It's pretty obvious it's intentional. Center your cursor on the sun so everything whites out, then look down at your feet. Your ability to see is impaired for a few seconds as the screen is darkened, and then it fades back in. Totally different from the black sun bug.

It's not caused by the sun shaft shader, but sounds more like caused by a HDR shader. I do agree though, the HDR blackout effect adds a lot to visual quality and atmosphere :)




col = max(col,suncoldisc*sundiscbrightness)*occl + col * (1 - sundiscocclude*occl);

I checked the calculations, the suncoldisc is carrying good colors but something goes wrong there resulting the less powerful sunset suns. I made a cheap hack.

http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss27.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss30.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss33.jpg
http://i51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/sc05/Morrowind-MGEsss45.jpg

The sun colors are now nice but there is a problem. They aren't supposed to be foggy.

The sun disc translucency follows MW's sun visibility. Removing the
occl *= light;
line will make the sun always have 100% opacity. I originally added this because it looked strange when the sun was visible through the ocean even after sunset. But with the horizon culling in 02a this might actually not be needed anymore.
User avatar
priscillaaa
 
Posts: 3309
Joined: Sat Dec 30, 2006 8:22 pm

Post » Thu Nov 25, 2010 5:07 am

Could you post the hack vtastek ? would love to try it out.. :)
User avatar
Sudah mati ini Keparat
 
Posts: 3605
Joined: Mon Jul 23, 2007 6:14 pm

Post » Thu Nov 25, 2010 8:29 pm

When I use this shader I cannot seem to see the sun (might be the FoV thing) and when I look at a certain spot in the sky my veiw gets all bright but I don't see the awesome beams of light I see in all your screen shots... :(
User avatar
Invasion's
 
Posts: 3546
Joined: Fri Aug 18, 2006 6:09 pm

PreviousNext

Return to III - Morrowind