Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (AndrewAMD), 14,661 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
How to create water #426441
07/23/13 09:15
07/23/13 09:15
Joined: Jul 2013
Posts: 34
Nagykanizsa
Robogamer Offline OP
Newbie
Robogamer  Offline OP
Newbie

Joined: Jul 2013
Posts: 34
Nagykanizsa
Hello, I have got a problem with water. I've got an FPS game, which has got water.
I've created a terrain for water, and I've applied a water skin on it. I've applied a nice mirror shader on it. My question is, how can I register the water terrain into the PhysX physical engine, to enable the player diving in it, and how can I add fog, if the player sinks in it?

Last edited by Robogamer; 07/23/13 09:21.
Re: How to create water [Re: Robogamer] #426444
07/23/13 10:11
07/23/13 10:11
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
in the mystimoods demo you can find example of underwater effects.

unfortunately I don't know the answer for the physx question.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: How to create water [Re: Robogamer] #426446
07/23/13 10:14
07/23/13 10:14
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
The first I dont know. The second, how about checking if the player is in water (c_trace + mode 'scan_texture' or maybe region, not sure about region though) and checking its height through c_trace.

Than add fog by doing e.g.:

Code:
camera.fog_start = 0.05 * camera.clip_far; // fog starts at 5% of clip range
camera.fog_end = 0.3 * camera.clip_far; // total foggy at 30% of clip range
d3d_fogcolor1.red = 55;
d3d_fogcolor1.green = 55;
d3d_fogcolor1.blue = 155; // blue fog


Last edited by Reconnoiter; 07/23/13 10:15.
Re: How to create water [Re: Reconnoiter] #426458
07/23/13 11:23
07/23/13 11:23
Joined: Jul 2013
Posts: 34
Nagykanizsa
Robogamer Offline OP
Newbie
Robogamer  Offline OP
Newbie

Joined: Jul 2013
Posts: 34
Nagykanizsa
Thanks for the replies, it works!

I have heard once that PhysX allows the player to dive in the water, but I don't know how. They were saying about applying an mtl_envWater material or something like this, but it didn't work for me.

Re: How to create water [Re: Robogamer] #426461
07/23/13 11:31
07/23/13 11:31
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
I have never heared of a solution that brings together water and PhysX. What you should do is really to look at mystymood, they have a nice implementation for that.

Re: How to create water [Re: PadMalcom] #426462
07/23/13 11:36
07/23/13 11:36
Joined: Jul 2013
Posts: 34
Nagykanizsa
Robogamer Offline OP
Newbie
Robogamer  Offline OP
Newbie

Joined: Jul 2013
Posts: 34
Nagykanizsa
Okay, but where can I find mystymood?

Re: How to create water [Re: Robogamer] #426463
07/23/13 11:38
07/23/13 11:38
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe

Re: How to create water [Re: PadMalcom] #426465
07/23/13 11:40
07/23/13 11:40
Joined: Jul 2013
Posts: 34
Nagykanizsa
Robogamer Offline OP
Newbie
Robogamer  Offline OP
Newbie

Joined: Jul 2013
Posts: 34
Nagykanizsa
Thanks, and I sorry I couldn't find it by myself laugh

Re: How to create water [Re: Robogamer] #426466
07/23/13 11:43
07/23/13 11:43
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
I guess you could, but you didn't even try wink

Re: How to create water [Re: PadMalcom] #426467
07/23/13 11:46
07/23/13 11:46
Joined: Jul 2013
Posts: 34
Nagykanizsa
Robogamer Offline OP
Newbie
Robogamer  Offline OP
Newbie

Joined: Jul 2013
Posts: 34
Nagykanizsa
Maybe you are right... laugh

Page 1 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1