Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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 | chip programmers | 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