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 / Wanted: Underwater Shader

Author
Message
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 24th Jul 2012 11:36
Yeah, I know, neither this nor the script boards are for request, but after digging through approx. 200 different postings, I give up being smart and ask the dumb question:

has anyone made a strict "underwater" post processing shader yet? With dostortions from the water movement and refractions?

Come to where the madness is:http://www.homegrowngames.at
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 24th Jul 2012 12:54
You mean caustic reflections?


http://forum.thegamecreators.com/?m=forum_view&t=178344&b=24

Awesome! Its one of those threads.
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 24th Jul 2012 14:25 Edited at: 24th Jul 2012 16:01
thats a real nice vid but unfortunately not what I need. I`m talkign about a post process shader that simulates the visual distortion underwater and has perhaps some particles flow also (the later one isn`t absolutely necessary)

Combined with Bloom AND lightrays would be best, but I can unify the shaders on my own, if necessary

Edit: I have now taken a deeper look at uzi-idiots refraction fx, as I have DarkShader installed, i guess i can tinker something that fits...

Edit 2: No, I can`t

Come to where the madness is:http://www.homegrowngames.at
Soviet176
14
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 24th Jul 2012 16:38
I think you mean something similar to what the old Corvus mod used to have. Was an awesome shader. I have also been looking for something like this for awhile now Ertlov. I don't think one exists other than the shader Dark Goblin used for his old mod. I could be, and hope... I am wrong.

bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 25th Jul 2012 08:42
I can do it for you, there wouldn't be much to it really. You just need an effect kinda like looking out the windows in Bioshock? Where everything is just wavy and distorted?

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
TheK
17
Years of Service
User Offline
Joined: 4th Mar 2007
Location: Germany
Posted: 25th Jul 2012 10:42
As far as I got it you are right, bond1. Probably you could put in some color correction, too.

Greetings,
Jan

Skype name: thek491
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 25th Jul 2012 11:06 Edited at: 25th Jul 2012 11:07
OK, basically I need two different components. The first would be the mentioned wavy distortion (of course dynamic and if possible good enough commented to tweak it on my own), the second one would be the particles floating, with varying sizes so that you have the feeling some are far away and some are near. I tried something with filmgrain, but it doesn`t look that good

And I would be VERY grateful if i got it once with bloom and once with surreal inside.
You just need to tell me what you want for your work...

As for color correction - right now I change the ambience light setting depending on the players depth which works acutally not that bad. Don`t know if it would be better to have 30 different PP shaders being switched depending on the players depth

And out of curiosity - did you get any of the 2-3 mails I sent you during the last 8-10 months?

Come to where the madness is:http://www.homegrowngames.at
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 26th Jul 2012 01:49 Edited at: 26th Jul 2012 02:37
Nah I woulnd't charge anything for it, I'll just release it here.

I don't know how I would accomplish the particles you describe in a post shader, I would think that would be suited more for a particle effect. But the wavy refraction is no problem (maybe with an underwater tint option?).

It will be next tuesday or wednesday if that's ok, I'm tied up at work this week (plus I need to brush up on how I set up the post shaders, it's been a while since I messed with them!)

I haven't had a whole lot of time to devote to FPSC this past year, so it's very likely I missed your emails completely.

EDIT: This shader will need to load an external texture for the refraction. I've only provided one empty "slot" in FPSC for a shader of this type called "multi.fx". We have a couple of choices if you want multiple versions of this shader. You can simply replace one of the existing shaders that use external textures (like rain or gasmask). OR...I could add more slots to FPSC to allow more shaders of this type - I would just need to add it to the source, which is no big deal.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 26th Jul 2012 02:41
Replacing gasmask would be totally ok, so NP on that.

Quote: " But the wavy refraction is no problem (maybe with an underwater tint option?)."


Yeah, that would help a lot.

Quote: "I would think that would be suited more for a particle effect."


Well, i thought so, too, but with v 12002 particles dont work anymore on my side.

Quote: "It will be next tuesday or wednesday if that's ok, "


yes, of course.

Quote: " so it's very likely I missed your emails completely."


well, basically i tried to throw money on you to make me a zombie cat

Come to where the madness is:http://www.homegrowngames.at
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 26th Jul 2012 02:54
Ok one more question: Is this shader meant to be used underwater in FPSC? If so, I really don't need to add a tinting option, since water fogging is already available via scripting which tints everything.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 26th Jul 2012 03:00
no, it doesnt tint shadered stuff. At least not static entities and segments with your shaders applied to them...

Come to where the madness is:http://www.homegrowngames.at
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 26th Jul 2012 03:16
Ok I had a bit of time to do a little test. See attached video.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro

Attachments

Login to view attachments
raymondlee306
14
Years of Service
User Offline
Joined: 24th Oct 2009
Location: Ohio
Posted: 26th Jul 2012 03:46 Edited at: 26th Jul 2012 03:47
Bond1,

Are You Serious?!? That looks awesome and it looks like you did it in 22 minutes from post to post! Do you do this for a living or are you some kind of god among programers? If I could ask where did you learn HLSL? I have DarkShader and can get things working in that, but I can't quite get them FPSC ready unless I start with an already working one and mod it with DarkShader.
seth zer0
17
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Fort Walton Beach, FL
Posted: 26th Jul 2012 04:16
@bond1 Wow!

that is awesome. Just wish i could find some good tutorials on shader coding.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 26th Jul 2012 09:35
Yeah, that looks already very nice

Come to where the madness is:http://www.homegrowngames.at
uzi idiot
Valued Member
14
Years of Service
User Offline
Joined: 27th Dec 2009
Location: Who Knows?
Posted: 26th Jul 2012 11:38
Wow, that's awesome.

If something compiles on the first try. Something is terribly wrong.
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 26th Jul 2012 11:49
Wow! That truly looks legen........wait for it.......dary!

In case you find my grammar and spelling weird ---> native German speaker ^^
TheK
17
Years of Service
User Offline
Joined: 4th Mar 2007
Location: Germany
Posted: 26th Jul 2012 13:13
The effect already looks pretty neat!

Greetings,
Jan

Skype name: thek491
Cosmic Prophet
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location: The Cosmos
Posted: 26th Jul 2012 15:59 Edited at: 26th Jul 2012 22:16
Bond1: That is awesome! Could the same be done to a dynamic entity, ie. a transparent window. To get the effect that you spoke of (Like the windows in Bioshock)? This is something I've been wanting for a long time to get my "Nautilus Sub" worked out. "Will pay!"

Back from the Wasteland.
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 27th Jul 2012 02:02 Edited at: 27th Jul 2012 02:03
I just need to plug it into the bloom shader. I have an idea for the particle "floaties" that might work as well. Like I said earlier, I'll release it sometime next week. I'll build in controls to vary the speed and amount of distortion so you can alter it to your needs.

Quote: "
Could the same be done to a dynamic entity, ie. a transparent window"


A entity version of the shader would work too, you could apply it to a window with an image of the ocean in the background, only you wouldn't get any parallax, so it would be best to keep the ocean texture pretty simple without any major up-close details to ruin the effect.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 27th Jul 2012 03:32 Edited at: 27th Jul 2012 03:42
Had a bit more time to try out the particle effect. It turned out even better than I had hoped! Now there are random, underwater "floaties" that waft around - some are near the camer, some father away.

Check out attached video.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro

Attachments

Login to view attachments
rolfy
17
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 27th Jul 2012 06:44 Edited at: 27th Jul 2012 06:54
Really nice shader I could think of some nice uses for this. How does this look when you move around?
Even as it is that would make a nice damaged helmet filled with water death scene, I can feel an Atlantis vibe coming on.
Strangely enough I was planning an underwater level.

Awesome! Its one of those threads.
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 27th Jul 2012 06:55 Edited at: 27th Jul 2012 06:56
That is true you're not going to move THROUGH the particles using a post-process technique. With the constant movement and amount of distortion it doesn't totally ruin the effect unless you're focusing on one particular particle -which is really difficult when you're moving around.

But I'll include controls vary the amount and opacity of the particles.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
michael x
15
Years of Service
User Offline
Joined: 10th Jan 2009
Location: Cybertron
Posted: 27th Jul 2012 08:25
blond1 I been emailing you about a scifi model i want to buy off you.

more than what meets the eye

Welcome to SciFi Summer
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 27th Jul 2012 09:37
Very nice. lots of uses for this. great job.

Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 27th Jul 2012 14:00
You`re a freaking genius. Still I would pay a decent sum for a zombie cat

Come to where the madness is:http://www.homegrowngames.at
Soviet176
14
Years of Service
User Offline
Joined: 19th Sep 2009
Location: Volgograd
Posted: 27th Jul 2012 18:31
Wow this is amazing bond. How exactly does this work? I mean, is there a way to tell if your in water or not to turn the shader off?

bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 28th Jul 2012 01:55
Are there any scripting commands to detect if the player is underwater? I'm not sure of Ertlov's intended use, but otherwise you'd just set up a trigger zone like any other post-shader.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 28th Jul 2012 04:59
There is PLRUNDERWATER=1 which is used for air scripts afaik.

In case you find my grammar and spelling weird ---> native German speaker ^^
Fuzz
17
Years of Service
User Offline
Joined: 14th Nov 2006
Location: Tasmania, Australia
Posted: 29th Jul 2012 07:07
That is awesome!

starmind 001
FPSC Reloaded Backer
16
Years of Service
User Offline
Joined: 23rd Sep 2007
Location:
Posted: 29th Jul 2012 14:31
@Cosmic something like this?


I don't wish to steal Bond's thunder, but I believe this was what he was talking about for a shader. Below is the files I used to get this effect. I edited a shader in dark shader for this effect. I was playing with it for Cp's new western pack. Enjoy!!

Attachments

Login to view attachments
The Storyteller 01
14
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 29th Jul 2012 16:00
@starmind: I assume in your case the shader is put on the glass?

In case you find my grammar and spelling weird ---> native German speaker ^^
starmind 001
FPSC Reloaded Backer
16
Years of Service
User Offline
Joined: 23rd Sep 2007
Location:
Posted: 29th Jul 2012 18:59
Quote: "@starmind: I assume in your case the shader is put on the glass?
"


Yes or something simple behind the glass where the cannot go. In my case here I used the Bond's containment room as a barrier as the glass has no collision.

Cosmic Prophet
16
Years of Service
User Offline
Joined: 17th Mar 2008
Location: The Cosmos
Posted: 29th Jul 2012 19:27
Yeah there ya go. That's exactly what I was needing for the bay windows of the sub. Thanks Starmind! This, along with Bond's full screen shader, wil make for some really new, and spctacular level creation opertunities.

Back from the Wasteland.
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 2nd Aug 2012 14:56
I won`t be able to test till tomorrow evening, however I wanted to ask if there is a version to test tomorrow

Come to where the madness is:http://www.homegrowngames.at
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 2nd Aug 2012 20:29
Yes I'll finish it up today.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 3rd Aug 2012 01:19
thx a lot!

Come to where the madness is:http://www.homegrowngames.at
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 3rd Aug 2012 06:05 Edited at: 3rd Aug 2012 06:31
Attached is the underwater shader with integrated bloom.

Check out the video here, watch it at 1080p in fullscreen if you can: http://www.youtube.com/watch?v=Jn-ccrx64S0&feature=youtu.be

You can tweak the shader by opening it up in notepad. Here you will find "waterspeed", "refractamount", and "watertint" variables that you can alter to suit your needs. Also, you can alter the particles texture if you wish with your own - or set it to completely black for no particles. You can experiment with your own normal map for a different refraction pattern as well. NOTE: you cannot view this shader in Dark Shader because Dark Shader does not load external textures for post shaders. Any changes you make you must view in FPSC.

Enjoy - I'm really happy how it turned out!

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro

Attachments

Login to view attachments
AngelTheKiller
FPSC Reloaded TGC Backer
14
Years of Service
User Offline
Joined: 17th Feb 2010
Location: In your house
Posted: 3rd Aug 2012 06:58
bond1 where do I out the textures at? I just get a blue screen

I'm not here go away >_>

Attachments

Login to view attachments
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 3rd Aug 2012 19:50
@starmind - shader works great. thanks

@bond1 - Nice addition to the arsinal of shaders. Why is it that one cannot just copy and change the name of the Post shader and change the texture to it. I see texture assignments in the code in notepad. But when I try changing it, I get an error that the shader cant find the file or it just uses the texture that was made with it.

Example: Filmreel Post process shader. I wanted two versions in the same level with different decal textures for a slightly different effect. Copied filmreel.fx to Filmrewind.fx. Change the texture name to film_rewind instead of Film_scratches in the fx file.

But still looks for and shows the original texture. when I change the name of the original texture, then I just get an error the shader cant find the original texture.

anayar
14
Years of Service
User Offline
Joined: 19th Aug 2009
Location: Minneapolis, MN
Posted: 3rd Aug 2012 20:44
Amazing, terrific, incredible... Need I say more?

Big thanks to starmind and bond!

Cheers,
Anayar


For KeithC
MK83
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN
Posted: 4th Aug 2012 06:13
how about a sample .fpm please

mk83 Productions
MK83
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN
Posted: 4th Aug 2012 07:04 Edited at: 4th Aug 2012 07:40
I can't get any of bond1's post processing shaders to work. Im using version 1.18.17 post processing=1, full shaders set to on. GTX 260 video card. amd 9800 quad core processor, win 7 X64 ultimate.
any ideas?

[b]EDIT
I upgrades to 1.20 and the shaders work now. But the viral outbreak shaders won't work. hummmmmmmm

mk83 Productions
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Aug 2012 14:54 Edited at: 4th Aug 2012 15:32
Sadly, this one doesnt work. at least not with a triggerzone and the attached fpi.
When I call setposteffect=multi from one of my custom scripts, it does work.

Come to where the madness is:http://www.homegrowngames.at
BlackFox
FPSC Master
15
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 4th Aug 2012 15:48 Edited at: 4th Aug 2012 15:51
The script worked fine for us on our end with a triggerzone.

Nice work, Bond. Thank you for taking time to produce this.


Twitter: @NFoxMedia
Ertlov
17
Years of Service
User Offline
Joined: 18th Jan 2007
Location: Austria
Posted: 4th Aug 2012 18:12
got it working. very nice indeed and thanks a lot!

Come to where the madness is:http://www.homegrowngames.at
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 4th Aug 2012 18:19 Edited at: 4th Aug 2012 18:20
No problem.

There is one other control that may be useful that I didn't set up a variable name for. While you can control the opacity of the particles by altering the texture, you can also do it directly in the shader. By default, it is set to 5% opacity. Find this line in the shader and change the 0.05 value to something else to alter the particle opacity:

float3 final=lerp(MaxAmount, ScreenMap, Luminance)* watertint + (0.05 * Particles) ;

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Aug 2012 18:22
Why is it that one cannot just copy and change the name of the Post shader and change the texture to it. I see texture assignments in the code in notepad. But when I try changing it, I get an error that the shader cant find the file or it just uses the texture that was made with it.

Example: Filmreel Post process shader. I wanted two versions in the same level with different decal textures for a slightly different effect. Copied filmreel.fx to Filmrewind.fx. Change the texture name to film_rewind instead of Film_scratches in the fx file.

But still looks for and shows the original texture. when I change the name of the original texture, then I just get an error the shader cant find the original texture.

bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 4th Aug 2012 18:35 Edited at: 4th Aug 2012 18:40
Quote: "Why is it that one cannot just copy and change the name of the Post shader and change the texture to i"


Because fullscreen shaders that require external textures need to have them loaded and defined explicitly in DBPro. Other fullscreen shaders that just use the screen itself as an input don't have this requirement (like bloom). You can freely name these type of shaders whatever you want and use as many as you want.

But for post shaders that use external textures, you can't do this. I have provided one "slot" for users called "multi.fx" that can use two external textures - and this is why I named the water shader in this manner - to use the one user-defined "slot".

If you'd like, I can add more slots to the source code. How many do you think most users would need for a typical game? I'm thinking 3-5 for most FPSC power users.

SPECS: Intel Corei7 3770k, Nvidia GTX680, 16GB RAM, Win7 Pro
Pirate Myke
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, Ca
Posted: 4th Aug 2012 18:39
Thanks for the reply.
I see. it was driving me crazy.

Instead of adding more slots, Could I call a different version from another folder in the effectsbank, say postprocess\post2?

Thou, more slots could come in handy.

Login to post a reply

Server time is: 2024-04-19 10:26:24
Your offset time is: 2024-04-19 10:26:24