Shelter from Magnus' Blaze 2

Post » Mon May 02, 2011 12:35 am

I would appreciate help re-writing these:

Aqua.fx

Spoiler

// Created by Peachykeen

int mgeflags = 16;
sampler s0 = sampler_state { minfilter = linear; magfilter = linear; mipfilter = linear; addressu=clamp; addressv = clamp; };
vector sinvar;
vector linvar;
float2 rcpres;

float ripplemult = 1.0f; // change this or set it via script to increase/decrease movement
float maskmult = 1.2f; // change this to change the effected are (2 is half the screen, 4 none, 0 all). Below 1 will pull the edges off

float4 ripple( float2 Tex : TEXCOORD ) : COLOR0
{

float4 Color;

// set up a simple box fade, prevents the edges from pulling away
float dev = max( abs(0.5 - Tex.x), abs(0.5 - Tex.y) ) * maskmult;
dev = smoothstep(0.15, 1, (1- dev));


// prep sinvar to not go under and linvar to not jump
float sinv = ( sinvar.x + 1 ) / 2;
float lin = 2 * ( 0.5 - abs( linvar.x - 0.5 ) );
float curve = sinvar.a * sinvar.a;


// generate ripples
// pick random y values
float ripplerow = sin ( Tex.y * 19 ) * curve + lin * clamp((sin(Tex.x)-0.5), 0.9, 1.1);
ripplerow = saturate(ripplerow);

// combine the fade and ripple rows
float ripplemask = ( ripplerow * dev );


// set up the shift amount
float2 shift;
shift.x = smoothstep(-10, 10, sinvar.x) - 0.5;
shift.x = shift.x / 8;


// multiply in the mask
shift.x *= ripplemask * ripplemult;

// prep the vertical movement
shift.y = ( ( shift.x * sin((Tex.x*20)) ) ) * ripplemult;

// shift the x coord
Tex.x += ( shift.x );

// shift the y by just a little
Tex.y += ( shift.y );


// sample the texture from the new position
Color = tex2D( s0, Tex );


// and send that back...
return Color;

}

technique T0
{
pass p0
{

PixelShader = compile ps_2_0 ripple();
}
}


mublur.fx

Spoiler

//Author: Timeslip
//Blurs the screen


int mgeflags = 16;
texture thisframe;
texture lastpass;

PixelShader PS = asm
{
ps.1.4
def c0,0.0015625,0,0,1 //Used to mod r0,r2 (Use these value for a 640,480 resolution)
def c1,0,0.0020833,0,1 //Used to mod r1,r3
def c2,1.5,1.5,1.5,0.5 //Used to set the alpha channel
texcrd r0.rgb,t0 //Get texture coordinates
mov r0.a,c2 //And put a value in r0.a so the validater doesn't complain about uninitalized registers
sub r3,r0,c1 //Copy the texture coords into the first four registers and shift them slightly
sub r2,r0,c0
add r1,r0,c1
add r0,r0,c0
phase //Second phase
texld r0,r0 //Sample the backbuffer at the four different points
texld r1,r1
texld r2,r2
texld r3,r3
add r0,r0,r1 //Add 'em all up and divide by 4
add r0,r0,r2
add_d4 r0,r0,r3
};

Technique T0
{
Pass P0
{
PixelShader = asm
{
ps.1.0 //Start by copying the backbuffer without doing anything interesting to it
tex t0
mov r0,t0
};
}
Pass P1
{
Texture[0] = ; //We want to sample the results of the last pass so that it gets more blured with each pass
Texture[1] = ;
Texture[2] = ;
Texture[3] = ;
PixelShader = ; //Use the same predifined pixelshader for all further passes
}
Pass P2 { PixelShader = ; }
}

User avatar
Jade
 
Posts: 3520
Joined: Mon Jul 10, 2006 6:42 am

Post » Sun May 01, 2011 10:27 pm

Id like to say that this new version of mge is fantastic and the shadows look really good. I am getting some crashes however soon after loading area when moving to a new exterior cell or when fast travelling to a new exterior or interior. This only happens after I play the game for a while, say half an hour to an hour of travelling. I look at task manager after this happens, and it shows my cpu and ram at maximum or close to maximum load at the time of the crash. This makes me believe it to be a fault of my own hardware and not this mod, but this has never happened before installing this mod and I was using the same settings and mods, with mge 118, distant statics at 200, not 150. If this problem is hardware related, would doubling my ram fron 2gb to 4gb solve the problem, as I am quite willing to do this. Or, seeming the cpu usage spikes at the time of a crash, is it completley cpu related. All the loading area times are vastly incresed, some taking 2 or even 3 times the previous length, with and without shadows turned on if that helps at all. I did try overclocking my dual core from 2.8 to 3.2ghz but the crashes persisted. I would appreciate any help given on this matter as it is a real pain and I love and its features this mod too much to uninstall it. If you need any more information, just ask. Thanks.

Arfien.
User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Mon May 02, 2011 3:36 am

Sounds like it's caused by decreasing your minimum static size. You may be better off sticking to 200, the only problem is that some smaller objects won't cast shadows, but I've found it's not too much of a problem.
User avatar
Mari martnez Martinez
 
Posts: 3500
Joined: Sat Aug 11, 2007 9:39 am

Post » Mon May 02, 2011 7:08 am

Sounds like it's caused by decreasing your minimum static size. You may be better off sticking to 200, the only problem is that some smaller objects won't cast shadows, but I've found it's not too much of a problem.


Aah, ok. I will try within the next few days with the statics at 200 and see if it helps. After observing more crashes, i know its not my cpu, so you are probably right and the extra statics are bogging down my ram when loading or something. Thanks for your help, its appreciated.
User avatar
Eve Booker
 
Posts: 3300
Joined: Thu Jul 20, 2006 7:53 pm

Post » Mon May 02, 2011 8:35 am

Mge XE ( 0.7.2 ) renders the foliage of my trees opaque. I don't have this issue with the vanilla trees, only with these ones.
See background of this image:
http://i52.photobucket.com/albums/g23/Worsas/SC0019.jpg

Some of the leaf-textures are DXT5 and some are DXT1 compressed. It happens with both.
The trees with static foliage have it as a single NiTriShape, a few of them are billboards. All of my trees except for one are affected by this.

The other mge renders them correctly.

My graphics card: ATI Radeon HD Series 3800


Edit: The tree not affected has less dense foliage than the rest. Therefore I guess the others being opaque might have to do with foliage layers bleeding into each other.
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm

Post » Sun May 01, 2011 11:01 pm

Mge XE ( 0.7.2 ) renders the foliage of my trees opaque. I don't have this issue with the vanilla trees, only with these ones.
See background of this image:
http://i52.photobucket.com/albums/g23/Worsas/SC0019.jpg

Some of the leaf-textures are DXT5 and some are DXT1 compressed. It happens with both.
The trees with static foliage have it as a single NiTriShape, a few of them are billboards. All of my trees except for one are affected by this.

The other mge renders them correctly.

My graphics card: ATI Radeon HD Series 3800


Edit: The tree not affected has less dense foliage than the rest. Therefore I guess the others being opaque might have to do with foliage layers bleeding into each other.


Try using Vurts trees. They are full mesh and not billboard and work really well on my computer. http://www.tesnexus.com/modules/members/index.php?id=41808 This is a link to his tesnexus page; it has all of his mods listed including his ashland, AI, bc, grazeland, west coast, solsteim and mournhold trees. They're animated too and most fit in really well.
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Mon May 02, 2011 11:20 am

Muspila made these trees for skyrim... :facepalm:
User avatar
Steve Smith
 
Posts: 3540
Joined: Sat Jun 30, 2007 10:47 am

Post » Mon May 02, 2011 3:17 am

Ba-dum-tush.
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am

Post » Mon May 02, 2011 7:42 am

Try using Vurts trees. They are full mesh and not billboard and work really well on my computer. http://www.tesnexus.com/modules/members/index.php?id=41808 This is a link to his tesnexus page; it has all of his mods listed including his ashland, AI, bc, grazeland, west coast, solsteim and mournhold trees. They're animated too and most fit in really well.

In the first place I was posting this to give account of a technical issue. Some of the trees I have made are Billboards, but most of them have static foliage. And both have the same issue as described above.
Interestingly the same thing happens with the bloodoon pines by Bethesda:
http://i52.photobucket.com/albums/g23/Worsas/SC0020.jpg

But the vanilla trees on Vvardenfell are not affected.

I don't have Vurts trees in my Modding-Morrowind installed where MGE XE is, so I haven't seen them with mge xe yet. I'm going to look after them by chance.
User avatar
Carolyne Bolt
 
Posts: 3401
Joined: Mon Jul 10, 2006 4:56 am

Post » Sun May 01, 2011 11:05 pm

In the first place I was posting this to give account of a technical issue. Some of the trees I have made are Billboards, but most of them have static foliage. And both have the same issue as described above.
Interestingly the same thing happens with the bloodoon pines by Bethesda:
http://i52.photobucket.com/albums/g23/Worsas/SC0020.jpg

But the vanilla trees on Vvardenfell are not affected.

I don't have Vurts trees in my Modding-Morrowind installed where MGE XE is, so I haven't seen them with mge xe yet. I'm going to look after them by chance.


Im sorry, i diddnt realise you were showing skyrim trees and not ones for Vvardenfell.
User avatar
Nick Jase Mason
 
Posts: 3432
Joined: Sun Jul 29, 2007 1:23 am

Post » Mon May 02, 2011 10:13 am

Mge XE ( 0.7.2 ) renders the foliage of my trees opaque. I don't have this issue with the vanilla trees, only with these ones.
See background of this image:
http://i52.photobuck...rsas/SC0019.jpg

Some of the leaf-textures are DXT5 and some are DXT1 compressed. It happens with both.
The trees with static foliage have it as a single NiTriShape, a few of them are billboards. All of my trees except for one are affected by this.

The other mge renders them correctly.

My graphics card: ATI Radeon HD Series 3800


I have found out what the problem is. MGE XE seems to have a problem with DXT1-Alpha-Textures. When I convert all of the leaf-textures to DXT5 they are rendered correctly.
Good to know as MGE XE adds wonderful shades that add a lot to the forest.

I had thought that some of the textures being opaque had been DXT5, but all of those were actually DXT1.
User avatar
Kitana Lucas
 
Posts: 3421
Joined: Sat Aug 12, 2006 1:24 pm

Post » Mon May 02, 2011 3:35 pm

I enabling SSAO shader (with uncommenting #define MGEGUI163_WORKAROUND in shader file, adding to active chain, and recommenting), but it doesnt seems to work in game. Same for knx_SSAO_v09_fast.fx and knx_SSAO_v09_hq.fx. No difference at all. I'm doing something wrong? Videocard is supporting up to 4.1 shaders.
UPD: OK, fixed it by enabling hardware shader option. Was disabled by default.
User avatar
Kayleigh Mcneil
 
Posts: 3352
Joined: Thu Jun 29, 2006 7:32 am

Post » Mon May 02, 2011 2:39 pm

I'm trying to update MGEgui so that the workaround isn't necessary any more. It will be a while yet.

If anyone wants to help fix the grass stutter, try replacing the grassDisplacement function in shaders/XE Common.fx :
float2 grassDisplacement(float4 worldpos, float h){    float2 displace = 2.5 * saturate(0.01 * h);    float2 harmonics = 0;    harmonics += sin(1.0*time + worldpos.xy / 1100);    harmonics += cos(2.0*time + worldpos.xy / 750);    harmonics += sin(3.0*time + worldpos.xy / 500);    harmonics += sin(4.0*time + worldpos.xy / 200);    return harmonics * displace;}

User avatar
Charlie Ramsden
 
Posts: 3434
Joined: Fri Jun 15, 2007 7:53 pm

Post » Mon May 02, 2011 3:16 pm

Here are my results from the new grassDisplacement function:

MGE SVN 178:

http://www.youtube.com/watch?v=-zXG27oPg3c

MGE XE 0.7.2:

http://www.youtube.com/watch?v=lEbJQoykpHA

MGE XE 0.7.2 -- Fixed Grass Shader:

http://www.youtube.com/watch?v=6Av9qz1s0Dg


The video was just uploaded so it may take a bit for the quality to come up. The video shows that the heavy stutter appears fixed (I viewed it in various wind speed conditions but only recorded this). My personal impressions are that the quality of the animation seems to be back and it looks pretty nice. Is there any other information that would be helpful?
User avatar
phillip crookes
 
Posts: 3420
Joined: Wed Jun 27, 2007 1:39 pm

Post » Mon May 02, 2011 12:14 am

Same function, try coupling to wind velocity:
    float2 displace = 2.5 * (WindVec + 0.01) * saturate(0.01 * h);


If you can find an aperiodic function that has better high frequencies and general behaviour, I need one of those.
User avatar
meg knight
 
Posts: 3463
Joined: Wed Nov 29, 2006 4:20 am

Post » Mon May 02, 2011 10:41 am

With the changed shader line:

http://www.youtube.com/watch?v=FEvwIxe1cfo




Reintroducing the wind vector into the function brings it right back. I don't suppose there is an easy way to throw a smoothing function over the WindVec? I'll try messing around with some modifications until your next post, I think.
User avatar
Emma louise Wendelk
 
Posts: 3385
Joined: Sat Dec 09, 2006 9:31 pm

Post » Mon May 02, 2011 12:45 pm

It's already smoothed, but it needs heavier damping. Gotta fix MCP first.
User avatar
Kelli Wolfe
 
Posts: 3440
Joined: Thu Aug 23, 2007 7:09 am

Post » Mon May 02, 2011 2:17 pm

Fair enough; it is nice to know exactly which shader line I should play with if I want to experiment.

I hadn't played with XE in a while because of the grass, and I forgot just quite how spectacular those shadows can look.
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Mon May 02, 2011 2:43 pm

Updated to version 0.8.0.

It has the beginnings of MWSE support. You can play standard MWSE mods with this build as it injects the MWSE dll. It doesn't allow mods that interact with MGE yet.

It's been several months, and I'm not sure exactly what I changed. It's mostly fixing the shader chain and MGEgui. The standard DirectX assembly for C# was years out of date, so I had to migrate MGEgui to SlimDX. It also allows removing junk and disabling useless features. I'm also revising the default shader list, which is a total mess of example code and bad shaders crowding out the ones people will normally want. I also want to avoid the "installed this shader pack and everything broke" effect.

Changes, as far as I know:
- MGEXEgui
- Shaders
- Shader preview defaults to HDR = 0.5
- MWSE kinda there
- Shadows a bit darker
- Less total internal reflection underwater
- Something about the grass

When there's time I can work on the water and input systems; if anyone is good at Blender, there are the Mournhold and Better Clothes meshes that need fixing up.
User avatar
Hannah Whitlock
 
Posts: 3485
Joined: Sat Oct 07, 2006 12:21 am

Post » Mon May 02, 2011 5:15 am

I've mentioned it before back with older drivers and an older MGE XE version, but it still happens in the new version. But now I have a little more time to look at it so I figured I'd try again.

Rain is invisible, as are signs and some statics like the leafs on many of Vurt's trees such as the Bitter Coast ones (transparancy issue?). I found out that if I turn character shadows on, all the objects that used to be invisible turn visible again, http://img837.imageshack.us/img837/1041/mgescreenshot105.jpg.

Was this a known issue?

Graphics Card: ATI HD4850 512MB
OS: Windows XP

Using the latest DirectX 9, and ATI graphics drivers.

Using a static size of 100, no shaders, SM 3.0, draw distance 5,5 cells, no exponential fog.
User avatar
SWagg KId
 
Posts: 3488
Joined: Sat Nov 17, 2007 8:26 am

Post » Mon May 02, 2011 2:00 am

Took some more footage:

http://www.youtube.com/watch?v=K-WfBU6_aiI


Grass shader is looking good!
User avatar
Lucky Boy
 
Posts: 3378
Joined: Wed Jun 06, 2007 6:26 pm

Post » Mon May 02, 2011 12:46 pm

I've mentioned it before back with older drivers and an older MGE XE version, but it still happens in the new version. But now I have a little more time to look at it so I figured I'd try again.

Rain is invisible, as are signs and some statics like the leafs on many of Vurt's trees such as the Bitter Coast ones (transparancy issue?). I found out that if I turn character shadows on, all the objects that used to be invisible turn visible again, http://img837.imageshack.us/img837/1041/mgescreenshot105.jpg.

Was this a known issue?

Faintly remember it happening to someone else but I forgot. I'll have to post a diagnostic version somewhere to log the details.


Took some more footage:

http://www.youtube.com/watch?v=K-WfBU6_aiI

Blah, it really needs to be whipping harder in the blizzard. The grass model needs to output frequency changes as well.
User avatar
Nymph
 
Posts: 3487
Joined: Thu Sep 21, 2006 1:17 pm

Post » Mon May 02, 2011 3:45 am

An update!! yesss

Is it possible to include a version of the InGame.fx with foam?
And possibly also the function that makes the grass bends when you walk on it?
Oh, and eventually we can have sewer water that has waves/eddies?
please :bowdown:
:biggrin:
User avatar
Mr.Broom30
 
Posts: 3433
Joined: Thu Nov 08, 2007 2:05 pm

Post » Mon May 02, 2011 4:02 pm

It's been several months, and I'm not sure exactly what I changed.


One issue I saw you mention working on back in August is that of statics popping in during foggy conditions. I'm not sure if this build has any changes in that area. I'll report back when I've had a chance to test.

EDIT:

Fog seems much better. Distant statics now fade properly into view rather than popping in.

Performance (FPS) has suffered noticeably, though. I can try to quantify this if it's something you were not expecting.
User avatar
Bloomer
 
Posts: 3435
Joined: Sun May 27, 2007 9:23 pm

Post » Mon May 02, 2011 3:47 pm

A new gallery; no shadows here, but more about a high quality default shader setup. Late nights in Morrowind.

Weight of Light http://www.tesnexus.com/downloads/images/26348-1-1293046108.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046097.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046089.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046079.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046071.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046060.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046048.jpg http://www.tesnexus.com/downloads/images/26348-1-1293046009.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045995.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045981.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045961.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045952.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045601.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045593.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045583.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045571.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045560.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045547.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045530.jpg http://www.tesnexus.com/downloads/images/26348-1-1293045516.jpg
User avatar
joeK
 
Posts: 3370
Joined: Tue Jul 10, 2007 10:22 am

PreviousNext

Return to III - Morrowind