Gamestudio Links
Zorro Links
Newest Posts
freewhyblogelsewhere
by 9489cpjf. 06/03/24 06:06
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,321 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 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