Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / Problems with shaders

Author
Message
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 18th Jan 2014 13:13 Edited at: 18th Jan 2014 13:13
Hi everyone!
I've been working this morning on a "fake water shader" to simulate water where the main water plane is impossible to place, like streams and small rivers. The idea is quite simple: use a custom stream/river mesh that matches your environment, and then apply the shader on it. The concept was to merge a distortion shader with a texture blending one, and finally with a scrolling texture shader (all from DarkShader). The distortion shader mixed with scrolling texture would have given the idea of flowing water (with customizable direction) and then you would have been able of blending the water texture with a "river bed" texture to give the idea of depth.
The problem has been the conflict between the distortion and the scrolling shaders. Their merging has result into a blue plane with random scrolling dots. Don't know what went wrong. Anyway the distortion and scrolling shaders merging went well, no problems at all. The last idea for adding more realism was making some waves on the mesh surfce using vertex shading. There's a water shader that does this "wave" thing using vertices within a DarkBasic Free example project, but I've got no idea on how to add it (I know animating the water plane is easier, but I don't know how to do it ). Oh, the last two things: the shader I've made makes meshes invisible inside FPSC (-.-") and...a little request. I'm really interest into getting Bond1's "burnout shader" to work on entities without bones, like normal dynamic entities. Anyone? Thanks to everyone (my work attached)!

Attachments

Login to view attachments
ncmako
12
Years of Service
Recently Online
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Jan 2014 19:29 Edited at: 23rd Jan 2014 20:15
Hi Stalker93
I see what you mean by "makes meshes invisible".
I'll play with it and see if I get any results.
But as for the "burnout" shader. No, I think
it's only meant for "boned" characters. You could
place just one bone in the entity, make it dynamic,
make it a character (no animations I take it) and see
if it works?

edit" ok, I got it to work with your mesh, dynamic not static.
Used only two textures (D2 & N) blended. Let me know if
your still needing this.
best

You know you're a bad gamer when you're able to run out of infinite lives.

Attachments

Login to view attachments
ncmako
12
Years of Service
Recently Online
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 27th Jan 2014 17:26
Stalker93
A quick bump. Let me know if you need this still
before I lose/delete them. I lose things all the time....

You know you're a bad gamer when you're able to run out of infinite lives.
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 30th Jan 2014 11:08 Edited at: 30th Jan 2014 11:09
Sorry ncmako, my internet connection went down some days ago, got it back today! Well thank you so much for your work! I'm very sorry for the delay in my reply! Do you still have it? Btw I just failed in merging these two shaders: one is a pretty simple bloom shader, the other one is the depth of field shader from DarkShader. Could you help me? Thanks..and sorry again!

Attachments

Login to view attachments
ncmako
12
Years of Service
Recently Online
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 30th Jan 2014 19:15
Stalker93
Here, try this. Also included a quick test map. It's just
the D2&N textures blended. They are kind of bright,
you may have to tone them down a bit. But it works
As for the "bloom & Dof" blended, Uzi Idiot worked on it
for awhile and could not get it to work. I'll try
but if he couldn't I don't think I can either.
Anyway, see how the water.fx works for you.
best

You know you're a bad gamer when you're able to run out of infinite lives.

Attachments

Login to view attachments
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 2nd Feb 2014 09:20 Edited at: 2nd Feb 2014 09:22
Thanks ncmako it's perfect!..I know about uzi idiot and his work on bloom+dof, actually already asked even to him on his "post-processing effects" awesome thread. He merged the post-bloom shader with the post-depthoffield, and in fact by using this instead of the stock post-bloom the engine crashes after the level is loaded. As he stated problem might be that the depth buffer was taken out from fpsc during 1.17 development (when post process was added for the first time, if I'm not wrong..damn, my memory). If you check the post-depthoffield shader you'll notice it needs two textures the engine itself creates using fog to simulate the missing depth buffer. I don't know if uzi idiot has already tried, but if you substitute his bloom+depthoffield shader to post-depthoffield instead of post-bloom, well it kinda works: the engine doesn't crashes, but obviously the shader still needs some rework, cause it shows a weird color effect with most of the screen black. But it seems to be somehow working by using postprocessing=2 inside setup.ini. Otherwise the shader can't obtain his depth textures. The shader I've uploaded doesn't use textures, it's a pretty stupid one: it just makes a copy of the onscreen image, blurs it a bit and the offset it by a little amount (you can try it in dark shader or in fpsc since I've uploaded it): is that kind of effect that was abused in ps2/old Xbox games era (GUN and Red Dead Revolver had that effect) to hide low poly geometry and the lack of antialiasing. I already had partial success in merging the two shaders I've uploaded, but the result isn't what it is supposed to be...I'm doing something wrong, but couldn't figure out what! Thanks for your help!
ncmako
12
Years of Service
Recently Online
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 2nd Feb 2014 21:46
Stalker93
You may be in luck. Playing with the default "depthoffield"
I stumbled upon something, purely by chance, that might be what your looking for. Using the DoF I was able to "oversaturate" some colors so it looks like "bloom" even though its not. Give me a day
to see if I can get better results. This is using the "post-process=2" in your setup.ini. So...you wont be able to switch
fullscreen shaders though

You know you're a bad gamer when you're able to run out of infinite lives.
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 4th Feb 2014 11:06 Edited at: 4th Feb 2014 15:33
Really? That would be fantastic! In my current project I don't need shader switching, so no problems at all Thanks!

EDIT: D'you mean that line where it says "return float4(color.xyz/9,depthinfo.x)"? By changing that to something like "return float4(color.xyz/7,depthinfo.x)" you actually get a bit of bloom
ncmako
12
Years of Service
Recently Online
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 4th Feb 2014 21:12
Yes, exactly. That's one of the lines. A few others I was playing with. Here's what I have so far (file attached).
Was trying to get more blur with distance, but keep
focal point close.. results vary so far.

You know you're a bad gamer when you're able to run out of infinite lives.

Attachments

Login to view attachments
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 5th Feb 2014 12:25
I'm getting the infamous green screen when using the shader you have attached and postprocess=2 I'm gonna check with DarkShader, thanks for your work!!
ncmako
12
Years of Service
Recently Online
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 5th Feb 2014 15:37
Stalker93
By chance are you using a Mod? I'm using a.20.beta19j
Seems to work fine. (pic attached) and yes, postprocess=2.
On a note, I have read some threads on here when using
"Darkshader" they don't always work for some reason in FPSC
best

You know you're a bad gamer when you're able to run out of infinite lives.

Attachments

Login to view attachments
Stalker93
15
Years of Service
User Offline
Joined: 1st Sep 2008
Location: Italy
Posted: 6th Feb 2014 13:24
I was using the wrong shader ahaha thanks for that, really nice one
JC LEON
14
Years of Service
User Offline
Joined: 22nd Apr 2010
Location:
Posted: 29th Mar 2014 20:30
Hi I downloaded the water.. but how it works?? I copied the files into the folders but when I place the entity water and make a test game I dont se nothing

must I aplly some shader??


I use 120bh

Login to post a reply

Server time is: 2024-04-25 12:06:53
Your offset time is: 2024-04-25 12:06:53