Alright, I'm seeing a few oddities. First of all, you seem to have fog turned off (use fog = false), yet the fog still appears. That alone shouldn't be happening. I'm 99% sure the fog option works, so I'm not sure why it's showing up for you. Try checking the use fog box and see if that helps.
Next, the dot texture is caused by using an older shader with the latest release. With the named texture system, that won't work. You can tweak the shader, it's a relatively simple fix. I integrated some of chico's shader's features into the new bloom, though, so you may want to try that first.
NWShader
Débuté par
pkpeachykeen
, juil. 15 2010 01:32
#26
Posté 27 juillet 2010 - 05:48
#27
Posté 28 juillet 2010 - 09:46
OK I checked use fog and the fog went away!!! The odd thing is it only seemed to be happening on that one tileset. Chico's shader was in the patch nwncq so I thought I would try it. As removing it and putting your original back cured it, I wasn't too bothered about it.
Having just changed my graphics card I am sorry to say I won't be able to report from the position of old slow cards any more
.
TR
Having just changed my graphics card I am sorry to say I won't be able to report from the position of old slow cards any more
TR
Modifié par Tarot Redhand, 28 juillet 2010 - 09:47 .
#28
Posté 30 juillet 2010 - 06:30
Hello,
I'd really like to use this, but when I install it I can no longer start NWN. Here is what happens:
1) I put the .dll's in the main NWN directory.
2) I put the nwshader directory in the main NWN directory as well.
3) I used the default settings, i.e. didn't even open up the GUI.
4) I click on NWN, then "play".
5) I get an error message saying "the application failed to initialize properly".
I have installed the dependencies (runtime files and .NET framework) as well.
The log file isn't terribly helpful - it just says:
Opening log file (ctor)
11:25:26 :: NWShader: Starting...
Does anybody know what the issue is here?
I'd really like to use this, but when I install it I can no longer start NWN. Here is what happens:
1) I put the .dll's in the main NWN directory.
2) I put the nwshader directory in the main NWN directory as well.
3) I used the default settings, i.e. didn't even open up the GUI.
4) I click on NWN, then "play".
5) I get an error message saying "the application failed to initialize properly".
I have installed the dependencies (runtime files and .NET framework) as well.
The log file isn't terribly helpful - it just says:
Opening log file (ctor)
11:25:26 :: NWShader: Starting...
Does anybody know what the issue is here?
#29
Posté 30 juillet 2010 - 07:30
The error is caused by the xml not being parsed writen correctly.
If you put the settings into the xml without using the application, then nwnmain will open correctly.
If you put the settings into the xml without using the application, then nwnmain will open correctly.
#30
Posté 30 juillet 2010 - 11:31
I didn't actually try to make any changes using the GUI - I just dropped the files into my NWN directory. Does that mean that the default XML that comes with the download is malformed? If so, what do I need to do to fix it?
Maybe you could just paste your xml into the forum and I can use that?
Maybe you could just paste your xml into the forum and I can use that?
#31
Posté 31 juillet 2010 - 07:50
it was in fact the initial XML that was broken - when I went in and modified it by hand, it worked for me. Thanks!
#32
Posté 31 juillet 2010 - 10:51
Would NWShader be capable of doing the following effect?
Scan through to 8:58 onwards.
I made this video, and did the sky effect via post processing the footage in after effects.
If NWShader can do this, could someone suggest what settings to use, I would experiment myself, but the xml error caused by the GUI program is bit annoying to fix for each attempt.
Scan through to 8:58 onwards.
I made this video, and did the sky effect via post processing the footage in after effects.
If NWShader can do this, could someone suggest what settings to use, I would experiment myself, but the xml error caused by the GUI program is bit annoying to fix for each attempt.
#33
Posté 01 août 2010 - 06:56
The packaged XML shouldn't be broken, but there is a known bug with the GUI that can corrupt the config. To fix it by hand, you simply need to make sure ScreenFolder and ScreenFormat have values and aren't empty tags. The config file is basic XML and can be edited in Notepad. I have yet to thoroughly fix the bug, it may be related to some underlaying file management issues. I've worked around it two ways so far and both seem to work, although not always.
As for that effect, yes, that's actually possible right now. It's just bloom, although using HDR could improve the look.
As for that effect, yes, that's actually possible right now. It's just bloom, although using HDR could improve the look.
#34
Posté 04 août 2010 - 01:02
Just adding that editing Chico's bloom shader to add all the < string texture="last...."; > stuff to name them properly worked fine.
#35
Posté 06 août 2010 - 04:18
pkpeachykeen, I'd be happy to look at the xml generation code for you - I'm sure your time is better spent on getting the actual shader functionality working than debugging file writes!
On that note, I wanted to chime in that my card is also having the blurred screen effect with the depth of field filter - it's a GeForce 9600M GT any idea what's causing this, or if there is a workaround yet?
On that note, I wanted to chime in that my card is also having the blurred screen effect with the depth of field filter - it's a GeForce 9600M GT any idea what's causing this, or if there is a workaround yet?
#36
Posté 06 août 2010 - 08:11
What faedanz noted about adding annotations to Chico's shader is correct, that's all you need to do to make them work. Just make the texture="whatever" part be the same as the sampler2D name (so, sampler2D lastPass uses texture="lastPass" and so forth).
@Chameleon Skin: Let me make sure the subversion is up-to-date and you can take a look. A relatively recent version of the code is available there, so you can check that out and look for any notable problems. I'll get the latest up soon.
As far as the blurred screen effect, I'm not sure why that happens to some people. Using an old depth of field shader will always fix it. I've verified that the focus-shift code is valid more than once and tested it in a number of cases. The debug info is always valid and correct, but sometimes it still looks off. Make sure you have focus shift on, a time > 0, have depth calculation on. I'll review it once more, just in case.
In case anyone was wondering at the general lack of updates here, I'm working on pinning down and eradicating the last few bugs. All the features I had originally planned, save cross-platform support, are implemented and functional. There's a handful of known bugs, most minor, that need fixed. I'm involved in a project that will eventually negate NWShader entirely, but until then, I'll be continuing to support NWShader and add features as needed. I was able to check off everything on my wishlist and quite a few things on everyone else's, so I don't see a whole lot more being added in the future.
I did implement partial support for a GUI system, but it's large and awkward, and scripting it is a pain. If I can find a better way to handle it, I'll be releasing an update with that. That's a very experimental feature, though, and may never make mainstream support.
@Chameleon Skin: Let me make sure the subversion is up-to-date and you can take a look. A relatively recent version of the code is available there, so you can check that out and look for any notable problems. I'll get the latest up soon.
As far as the blurred screen effect, I'm not sure why that happens to some people. Using an old depth of field shader will always fix it. I've verified that the focus-shift code is valid more than once and tested it in a number of cases. The debug info is always valid and correct, but sometimes it still looks off. Make sure you have focus shift on, a time > 0, have depth calculation on. I'll review it once more, just in case.
In case anyone was wondering at the general lack of updates here, I'm working on pinning down and eradicating the last few bugs. All the features I had originally planned, save cross-platform support, are implemented and functional. There's a handful of known bugs, most minor, that need fixed. I'm involved in a project that will eventually negate NWShader entirely, but until then, I'll be continuing to support NWShader and add features as needed. I was able to check off everything on my wishlist and quite a few things on everyone else's, so I don't see a whole lot more being added in the future.
I did implement partial support for a GUI system, but it's large and awkward, and scripting it is a pain. If I can find a better way to handle it, I'll be releasing an update with that. That's a very experimental feature, though, and may never make mainstream support.
#37
Posté 07 août 2010 - 06:34
great - I'll take a look at the code in svn next week.
I've looked in the .cgfx file for the values you mention about for the DoF issue, but I couldn't find them - what are the specific variable names I'm looking for? Or am I looking in the wrong place?
I've looked in the .cgfx file for the values you mention about for the DoF issue, but I couldn't find them - what are the specific variable names I'm looking for? Or am I looking in the wrong place?
#38
Posté 07 août 2010 - 06:40
Actually - I started to take a look just to get familiar with it. I found the class that reads the config and I found the actual logger, but I couldn't find the class that is responsible for XML generation. Could you point me in the right direction?
#39
Posté 07 août 2010 - 04:48
hi my friend,
just tested the new "Chronepsis" version, when i use the "NWShader GUI.exe" it modify this line:
"<ScreenFolder>.\\screenshots</ScreenFolder>"
to this
"<ScreenFolder>"
making the game crashing,
if i correct manually the "nwshader.xml" file all is ok
my langage is french, so the NWShader GUI.exe add this line too : " <Language>fr</Language>"
thank for the great job my friend
just tested the new "Chronepsis" version, when i use the "NWShader GUI.exe" it modify this line:
"<ScreenFolder>.\\screenshots</ScreenFolder>"
to this
"<ScreenFolder>"
making the game crashing,
if i correct manually the "nwshader.xml" file all is ok
my langage is french, so the NWShader GUI.exe add this line too : " <Language>fr</Language>"
thank for the great job my friend
#40
Posté 07 août 2010 - 05:12
forget it i've found the button to change it directly in the GUI
ciao friends ^^
PS: peachy have you thought about the sample for normalmap? thank
ciao friends ^^
PS: peachy have you thought about the sample for normalmap? thank
Modifié par chico400, 07 août 2010 - 05:14 .
#41
Posté 07 août 2010 - 08:57
@Chameleon Skin: I'll make an "old" DoF shader and get that up. Everything I can find still suggests that the code is correct. I'm wondering if it's related to settings. As for the XML, I'm using .Net's built-in XML writing classes.
@chico: Yes, that's the known bug that I am trying to fix. It's not entirely fixed yet, though.
As for the normal-map sample: I have a sample for making skyboxes, which shares a lot of code with normal maps. You simply use a different shader.
The normal-map shader is not yet perfect, but does work in most cases. For Chronepsis, it is "multi.cgfx" for basic normal mapping or "normal_glow_alpha.cgfx" for normal map, glow map and transparency.
The sample here:
https://sourceforge....es.rar/download
with the material file modified will work perfectly. That package will give you an idea of how the system works.
For any more detailed questions, I can answer them here.
@chico: Yes, that's the known bug that I am trying to fix. It's not entirely fixed yet, though.
As for the normal-map sample: I have a sample for making skyboxes, which shares a lot of code with normal maps. You simply use a different shader.
The normal-map shader is not yet perfect, but does work in most cases. For Chronepsis, it is "multi.cgfx" for basic normal mapping or "normal_glow_alpha.cgfx" for normal map, glow map and transparency.
The sample here:
https://sourceforge....es.rar/download
with the material file modified will work perfectly. That package will give you an idea of how the system works.
For any more detailed questions, I can answer them here.
#42
Posté 08 août 2010 - 12:02
When do we get to hear about the next project?
#43
Posté 12 août 2010 - 10:45
hi peachy,
i've a problem with the new version, i've not with the previous one: (Asgorath)
if i use DOF all the screen blurs not only background
i've updated my drivers and used an "outofthebox" nwshader by have still the problem
great job peachy, hope i'll help a little
thanks for help my friend
i've a problem with the new version, i've not with the previous one: (Asgorath)
if i use DOF all the screen blurs not only background
i've updated my drivers and used an "outofthebox" nwshader by have still the problem
great job peachy, hope i'll help a little
thanks for help my friend
Modifié par chico400, 12 août 2010 - 11:41 .
#44
Posté 12 août 2010 - 10:28
Purely out of curiosity I was wondering if shader can be used for a specific effect that's used in lot of big-screen movies - namely focus-pulling. A good example of this if you're not aware of what it is can be seen early on in Peter Jackson's "The Lord of the Rings: The Fellowship of the Ring". The scene details Frodo's very first encounter with the Nazgul. He is standing on the road and starts to get a sense that something is wrong, there is a little gust of wind that stirs up some dead leaves, the camera looks directly at him and that is the point where the focus pulling effect takes place.
Anyway, can shader reproduce this effect?
TR
Anyway, can shader reproduce this effect?
TR
#45
Posté 13 août 2010 - 07:33
tarot, that diving effect would be some perspective distorsion (with maybe a bit of chaning fov - field of view). but more interesting would be depth-of-field with controllable focus distance from camera. you could drive users attention in cinematic events to points of interest, where everything that user should omit would be a bit blurred and the spatial ball or elipsoid of interest would become focused. and that center of focus would be smoothly movable to your liking. another cool effect could be achievable with metalic textures on not-too-rusty weapons reflecting lightsources and generating occasional flashes with bloom turned on.
#46
Posté 13 août 2010 - 08:09
@faedanz: Relatively soon, we just have to tweak a few more things and finish up some components.
@Chico: I'm not sure what the problem with depth-of-field is. I've tested the code more than once, it is definitely correct. Using an old shader with the fix in this thread will work, until I can definitively figure out why the new method doesn't work.
@Tarot: You mean something like a radial blur, blurring out from a point on the screen? I haven't watched LoTR in a while, so I don't remember the scene, but I'm betting that's similar. It's definitely possible to only blur parts of the screen. You can also control the depth in DoF by a script, for a Witcher-like cinematic focus.
@Chico: I'm not sure what the problem with depth-of-field is. I've tested the code more than once, it is definitely correct. Using an old shader with the fix in this thread will work, until I can definitively figure out why the new method doesn't work.
@Tarot: You mean something like a radial blur, blurring out from a point on the screen? I haven't watched LoTR in a while, so I don't remember the scene, but I'm betting that's similar. It's definitely possible to only blur parts of the screen. You can also control the depth in DoF by a script, for a Witcher-like cinematic focus.
#47
Posté 13 août 2010 - 10:27
hello pk, i believe he means the effect when you are trying to keep the visual proportions of frodo on the monitor intact while you physicaly move away (or towards the object) with the camera. to achieve that you have to rotate the objective to keep the object from changing. the surrounding then seems to move in a special way, and you get the feel of diving. but its just a perspective change effect.
#48
Posté 14 août 2010 - 02:41
Ah. That makes sense.
Well, in order to do that... there's no easy way to mask out one object in particular, but it's certainly possible to do some kind of zoom-type deal on an area. It's very similar to radial blur, kind of a stretch-out-from-center. The actual shader code should be relatively straight-forward, I think.
Well, in order to do that... there's no easy way to mask out one object in particular, but it's certainly possible to do some kind of zoom-type deal on an area. It's very similar to radial blur, kind of a stretch-out-from-center. The actual shader code should be relatively straight-forward, I think.
#49
Posté 14 août 2010 - 07:20
hi peachy,
I mean that all the screen is always blured, center, foreground and background, even if i rotate the camera or zoom/unzoom. It does not make this issue with Asgorath but only with the new one. (no logs because no crash)
I've looked at the new scripts and seen that the DOF script use new focus lines code, when i disabled this lines codes all the screen is clear, but the DOF effect go away *snif*.
i use last drivers nvidia version 258.96, an "outofthebox" Chronepsis 0.2.2.3's nwshader.
the only difference with your install is the localisation... i'm french.
could you remove the localisation in nwshader to test, because it make crash the nwshader GUI and may be involved in the DOF issue, or let us to select localisation manually?
i know that sometime localisation can be a problem for a program.
Is somebody localised too in Fr, to see if they have the same issue?
thanks friends
I mean that all the screen is always blured, center, foreground and background, even if i rotate the camera or zoom/unzoom. It does not make this issue with Asgorath but only with the new one. (no logs because no crash)
I've looked at the new scripts and seen that the DOF script use new focus lines code, when i disabled this lines codes all the screen is clear, but the DOF effect go away *snif*.
i use last drivers nvidia version 258.96, an "outofthebox" Chronepsis 0.2.2.3's nwshader.
the only difference with your install is the localisation... i'm french.
could you remove the localisation in nwshader to test, because it make crash the nwshader GUI and may be involved in the DOF issue, or let us to select localisation manually?
i know that sometime localisation can be a problem for a program.
Is somebody localised too in Fr, to see if they have the same issue?
thanks friends
#50
Posté 14 août 2010 - 07:56
i've made some tests, and it seems that "distance = tex2D(depthFrame, uv).r" function always return the same value for me, in this code (tried too staticfocus mode),
as the shader consider that distance is always greater than tfocus, even if tfocus is fixed to staticfocus = 0.98f
i've checked and "calculated depth & focus" are activated in gui
float4 DoF(in float2 uv : TEXCOORD0) : COLOR
{
float distance = 0;
float tfocus = 0;
float factor = 0;
float n = 1.0;
float f = 1000.0;
float4 color = tex2D(lastShader, uv);
float4 blur = tex2D(lastPass, uv);
distance = tex2D(depthFrame, uv).r;
if ( mode == 0 )
{
tfocus = focus; //tex2D(depthFrame, float2(0.5, 0.5)).r;
} else {
tfocus = staticfocus;
}
distance = (2.0 * n) / (f + n - distance * (f - n));
tfocus = (2.0 * n) / (f + n - tfocus * (f - n));
factor = abs(distance - tfocus); // Should be 0 - 0.5
if ( distance < tfocus )
{
factor *= 2.175; // 0 - 1.250;
} else {
factor *= 2.075; // 0 - 1.125; <<<<<<<< always use this line
}
factor *= factor; // 0 - 1.26 if farther, 0 - 1.56 if near
factor = clamp(factor, 0, 1.35);
color.rgb = lerp(color.rgb, blur.rgb, factor.rrr);
return float4(color.rgb, 1.0);
}
if i change the code to
" if ( distance < tfocus )
{
factor *= 2.175; // 0 - 1.250;
} else {
factor *= 0; // 0 - 1.125;
}
"
all my screen is clear with no blur so the shader always use the "distance > tfocus" case, it means , i guess' that "calculated depth " option does not function correctly for me
as the shader consider that distance is always greater than tfocus, even if tfocus is fixed to staticfocus = 0.98f
i've checked and "calculated depth & focus" are activated in gui
float4 DoF(in float2 uv : TEXCOORD0) : COLOR
{
float distance = 0;
float tfocus = 0;
float factor = 0;
float n = 1.0;
float f = 1000.0;
float4 color = tex2D(lastShader, uv);
float4 blur = tex2D(lastPass, uv);
distance = tex2D(depthFrame, uv).r;
if ( mode == 0 )
{
tfocus = focus; //tex2D(depthFrame, float2(0.5, 0.5)).r;
} else {
tfocus = staticfocus;
}
distance = (2.0 * n) / (f + n - distance * (f - n));
tfocus = (2.0 * n) / (f + n - tfocus * (f - n));
factor = abs(distance - tfocus); // Should be 0 - 0.5
if ( distance < tfocus )
{
factor *= 2.175; // 0 - 1.250;
} else {
factor *= 2.075; // 0 - 1.125; <<<<<<<< always use this line
}
factor *= factor; // 0 - 1.26 if farther, 0 - 1.56 if near
factor = clamp(factor, 0, 1.35);
color.rgb = lerp(color.rgb, blur.rgb, factor.rrr);
return float4(color.rgb, 1.0);
}
if i change the code to
" if ( distance < tfocus )
{
factor *= 2.175; // 0 - 1.250;
} else {
factor *= 0; // 0 - 1.125;
}
"
all my screen is clear with no blur so the shader always use the "distance > tfocus" case, it means , i guess' that "calculated depth " option does not function correctly for me
Modifié par chico400, 14 août 2010 - 08:35 .





Retour en haut







