idiom@Posted: Thu Feb 24, 2005 6:08 am :
Inolen and I have been working for a little while on getting water to look and work properly in Doom3. We now have a proper fresnel effected water shader and proper swimmable water with sounds and splash effects (just placeholders) for the communuity to use.

Image

Image

You can download it here thanks to doom3reference.com.

To install just unzip to your Doom3 directory and load up water as a mod. There is a testmap called 'water' that shows working water.

Make sure you read the readme if you want to use these assets for your own project.

We are aware of the problem when you're half in the water and the mirror effect reflects the inside of the player model. We think there might be a way to work around this but inolen is busy working on other projects atm.



Jehar@Posted: Thu Feb 24, 2005 6:13 am :
Oh my god.
That second pic is picturesque.

Downloading now.

Edit: Well it looks fantastic. I dig the proper reflection, and I see what you mean about the player model.

You said its swim\shootable? felt like a plexiglass covering was over it. shot and felt like a solid surface.

but by the way it runs real nice. not a rescource hog. nice.



inolen@Posted: Thu Feb 24, 2005 6:37 am :
Jehar wrote:
Oh my god.
That second pic is picturesque.

Downloading now.

Edit: Well it looks fantastic. I dig the proper reflection, and I see what you mean about the player model.

You said its swim\shootable? felt like a plexiglass covering was over it. shot and felt like a solid surface.

but by the way it runs real nice. not a rescource hog. nice.


You need to make the water a func_water.



Jehar@Posted: Thu Feb 24, 2005 6:38 am :
watashiwa baka.

conslole command?
:?::?:



goliathvt@Posted: Thu Feb 24, 2005 6:39 am :
Holy piss on a stick that's amazing. I'm going swimming!

G



iceheart@Posted: Thu Feb 24, 2005 6:40 am :
inolen: You forgot to say "oops" :).



Jehar@Posted: Thu Feb 24, 2005 6:41 am :
Jah im not quite too deep into d3 editing yet.
So far im just here for the ride.
So what would it take to make the func_water in the TEST map.

>.>
<.<



idiom@Posted: Thu Feb 24, 2005 6:46 am :
DOH! Sorry guys, forgot to make the testmap with a func_water. Will do that and upload again.



Jehar@Posted: Thu Feb 24, 2005 6:47 am :
danke sehr



inolen@Posted: Thu Feb 24, 2005 6:48 am :
idiom wrote:
DOH! Sorry guys, forgot to make the testmap with a func_water. Will do that and upload again.


What a douche. :P



iceheart@Posted: Thu Feb 24, 2005 6:56 am :
Updated.



Dinky@Posted: Thu Feb 24, 2005 6:56 am :
Wow... fantastic job.... *downloads*

Mmmm the other guy said it's shootable... I'm not getting anything on this side, am I doing something wrong?



Jehar@Posted: Thu Feb 24, 2005 7:13 am :
Jah me neither.

I assume that crate was put there to push in and get some splash?

One of the few thing i dislike about the d3 engine is the way it currently handles fog. It still "clips" the way it did in q3 and even doom.

Why oh why?

by clipping you know what i mean right? you see "layers" of the fog in parralel lines. If one thing could be improved on the engine, I would say this is the thing most in need.

anyways, beutiful work.



inolen@Posted: Thu Feb 24, 2005 7:16 am :
The crate is just there to show a reflection :P



BloodRayne@Posted: Thu Feb 24, 2005 7:19 am :
Looking great!

Don't mind us when we use it in EOC. :wink:

:D



idiom@Posted: Thu Feb 24, 2005 7:26 am :
It's there to be used 8)



zakath@Posted: Thu Feb 24, 2005 7:29 am :
heh, looks damn nice.

might be that it will be used in another TC as well :wink:



butmunch@Posted: Thu Feb 24, 2005 9:21 am :
Just one thing when i throw a body into the water it sinks to the bottom like a rock. Otherwise the water looks damn fine.



iceheart@Posted: Thu Feb 24, 2005 9:25 am :
Throwing bodies? What are you some kind of psycho killer who needs to dispose of bodies???



idiom@Posted: Thu Feb 24, 2005 9:37 am :
I don't think inolen has coded in effects of physics objects. Maybe I can get him to do it if there's enough support :P If not, if someone else wants to, feel completely free.



mikebart@Posted: Tue Mar 29, 2005 9:15 pm :
thanks dante, its pretty much doing the same thing in window mode as in fullscreen mode but sometimes with a different image, its a realy random occurance.
I had the texture reflecting properly in the water test map, I even copied and pasted the func_water with that texture into my map after several failed attempts but I still couldnt get it to work, I really dont think its a performance issue but heres my specs anyway;

AMD Athlon 2400 512 with Gforce 4 ti 4200 with AGP 8x

thanks again :)



mikebart@Posted: Wed Apr 06, 2005 9:07 pm :
Have you heard back from brian?



Dante_uk@Posted: Wed Apr 06, 2005 9:20 pm :
mikebart wrote:
Have you heard back from brian?


I'm afraid not, I guess he's a little busy with ROE just coming out, hopefully putting together the SDK for 1.2/3.



Gmz1013@Posted: Wed Apr 06, 2005 10:18 pm :
is it soposed to be soild or liquid its soild for me... Help please...



Dante_uk@Posted: Wed Apr 06, 2005 10:57 pm :
Gmz1013 wrote:
is it soposed to be soild or liquid its soild for me... Help please...


To what are you refering?

If you are trying to use func_water then it should not be solid, this is a change in the SDK, are you using the .dll from my water.zip?
Are you testing my test map or one of your own?
Do you have any errors appear in the console?

Try my newest test map & dll, just unzip into doom3 folder it will create a folder called GravityMod, in there should be a run.bat, double click it. This should load my test map, turn to your right and you should see a door with a sign next to it saying Water Tests.
http://homepages.nildram.co.uk/~danteuk/GravityMod.zip



ReubenDSala@Posted: Wed Apr 06, 2005 11:28 pm :
I dont think that works with the new patch (1.3)



Fitzsimmons@Posted: Mon Apr 25, 2005 9:25 pm :
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)



Dante_uk@Posted: Tue Apr 26, 2005 10:04 am :
ReubenDSala wrote:
I dont think that works with the new patch (1.3)


Nothing works with 1.3 because it's not out yet, nothing works with 1.2 yet because the SDK for it isn't out.

I believe 1.3 will be released sometime soon and shortly after the SDK for it.

Then we all have the fun task of merging all our code changes into it.

Fitzsimmons wrote:
I'm having a render problem on linux

Without information about your video chipset I can't really help.
I guess from the shot it's a DX 9 level chipset.

Some of the those pools don't renderer correctly of some hardware.
I have access to 3 machines with doom3 on at 3 different DX levels: 7,8,9
All are Nvidia cards though.
The purpose of that test map was to try lots of different method for making water, then test it on all three chipsets and find one method that looks good on all three.



breakerfall@Posted: Sat Apr 30, 2005 3:09 pm :
Fitzsimmons wrote:
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)


This is very similar to what I posted a page or two back. Same thing, under linux, ATI drivers etc.



Fitzsimmons@Posted: Sat Apr 30, 2005 5:18 pm :
I have an nVidia card, if that makes any difference.



MichaelZee@Posted: Tue Aug 16, 2005 6:01 am :
I load up the water mod and then type in "map water"

Your map loads up but there is no water inside the pool. Any ideas?



Sebazzz@Posted: Mon Nov 14, 2005 1:01 am :
You're not the only one.

nVidia Geforce FX 5700 LE
Amd athlon XP 2600+
Windows XP Home

Doom 3 with 1.3 patch



mth@Posted: Thu Dec 01, 2005 10:11 am :
same thing. only fog in the pit, without any water. Any ideas?



der_coach@Posted: Thu May 11, 2006 7:37 am :
lo.

we merged inolens code in the sdk1.3-vanilla version.

:arrow:http://themir.de/public/doom3/doom3water13.rar

you can find the changes searching for: // BEGIN WATER orig. by inolen -- v1.3 by jobst

--
jobst

http://www.themir.de



6th Venom@Posted: Thu May 11, 2006 8:18 am :
Thanks for releasing that! I think it's very helpfull for non-coders! :D

For the "black-draw" problem, i had this the first timei ran pbmax's water, cause i was not in high details' settings, now all is ok. i don't know why... maybe medium & low disable heathazes and/or mirrorrenders. :wink:



ARON2431@Posted: Fri Jun 09, 2006 1:38 am :
I'm getting the same issue. I load up the mod and the map, and the only thing I see is fog



Bauul@Posted: Sun Jun 11, 2006 6:05 pm :
Make sure high detail is enabled in the options menu, the water effects are classed by the game as high detail.



coldkodiak@Posted: Mon Jan 29, 2007 8:18 am :
There are a lot of dead links in this thread.

I was wondering if anyone has this water shader current?



Dj Dooms Day@Posted: Mon Jan 29, 2007 8:23 am :
Woah, now theres a blast from the past. Hiya Ck, how are ya? Back on the D3 engine eh? Anyway, kind of off-topic there. But you might want to message Dante_uk. He'd have the latest build i'd say.



mikebart@Posted: Tue Mar 29, 2005 9:15 pm :
thanks dante, its pretty much doing the same thing in window mode as in fullscreen mode but sometimes with a different image, its a realy random occurance.
I had the texture reflecting properly in the water test map, I even copied and pasted the func_water with that texture into my map after several failed attempts but I still couldnt get it to work, I really dont think its a performance issue but heres my specs anyway;

AMD Athlon 2400 512 with Gforce 4 ti 4200 with AGP 8x

thanks again :)



mikebart@Posted: Wed Apr 06, 2005 9:07 pm :
Have you heard back from brian?



Dante_uk@Posted: Wed Apr 06, 2005 9:20 pm :
mikebart wrote:
Have you heard back from brian?


I'm afraid not, I guess he's a little busy with ROE just coming out, hopefully putting together the SDK for 1.2/3.



Gmz1013@Posted: Wed Apr 06, 2005 10:18 pm :
is it soposed to be soild or liquid its soild for me... Help please...



Dante_uk@Posted: Wed Apr 06, 2005 10:57 pm :
Gmz1013 wrote:
is it soposed to be soild or liquid its soild for me... Help please...


To what are you refering?

If you are trying to use func_water then it should not be solid, this is a change in the SDK, are you using the .dll from my water.zip?
Are you testing my test map or one of your own?
Do you have any errors appear in the console?

Try my newest test map & dll, just unzip into doom3 folder it will create a folder called GravityMod, in there should be a run.bat, double click it. This should load my test map, turn to your right and you should see a door with a sign next to it saying Water Tests.
http://homepages.nildram.co.uk/~danteuk/GravityMod.zip



ReubenDSala@Posted: Wed Apr 06, 2005 11:28 pm :
I dont think that works with the new patch (1.3)



Fitzsimmons@Posted: Mon Apr 25, 2005 9:25 pm :
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)



Dante_uk@Posted: Tue Apr 26, 2005 10:04 am :
ReubenDSala wrote:
I dont think that works with the new patch (1.3)


Nothing works with 1.3 because it's not out yet, nothing works with 1.2 yet because the SDK for it isn't out.

I believe 1.3 will be released sometime soon and shortly after the SDK for it.

Then we all have the fun task of merging all our code changes into it.

Fitzsimmons wrote:
I'm having a render problem on linux

Without information about your video chipset I can't really help.
I guess from the shot it's a DX 9 level chipset.

Some of the those pools don't renderer correctly of some hardware.
I have access to 3 machines with doom3 on at 3 different DX levels: 7,8,9
All are Nvidia cards though.
The purpose of that test map was to try lots of different method for making water, then test it on all three chipsets and find one method that looks good on all three.



breakerfall@Posted: Sat Apr 30, 2005 3:09 pm :
Fitzsimmons wrote:
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)


This is very similar to what I posted a page or two back. Same thing, under linux, ATI drivers etc.



Fitzsimmons@Posted: Sat Apr 30, 2005 5:18 pm :
I have an nVidia card, if that makes any difference.



MichaelZee@Posted: Tue Aug 16, 2005 6:01 am :
I load up the water mod and then type in "map water"

Your map loads up but there is no water inside the pool. Any ideas?



Sebazzz@Posted: Mon Nov 14, 2005 1:01 am :
You're not the only one.

nVidia Geforce FX 5700 LE
Amd athlon XP 2600+
Windows XP Home

Doom 3 with 1.3 patch



mth@Posted: Thu Dec 01, 2005 10:11 am :
same thing. only fog in the pit, without any water. Any ideas?



der_coach@Posted: Thu May 11, 2006 7:37 am :
lo.

we merged inolens code in the sdk1.3-vanilla version.

:arrow:http://themir.de/public/doom3/doom3water13.rar

you can find the changes searching for: // BEGIN WATER orig. by inolen -- v1.3 by jobst

--
jobst

http://www.themir.de



6th Venom@Posted: Thu May 11, 2006 8:18 am :
Thanks for releasing that! I think it's very helpfull for non-coders! :D

For the "black-draw" problem, i had this the first timei ran pbmax's water, cause i was not in high details' settings, now all is ok. i don't know why... maybe medium & low disable heathazes and/or mirrorrenders. :wink:



ARON2431@Posted: Fri Jun 09, 2006 1:38 am :
I'm getting the same issue. I load up the mod and the map, and the only thing I see is fog



Bauul@Posted: Sun Jun 11, 2006 6:05 pm :
Make sure high detail is enabled in the options menu, the water effects are classed by the game as high detail.



coldkodiak@Posted: Mon Jan 29, 2007 8:18 am :
There are a lot of dead links in this thread.

I was wondering if anyone has this water shader current?



Dj Dooms Day@Posted: Mon Jan 29, 2007 8:23 am :
Woah, now theres a blast from the past. Hiya Ck, how are ya? Back on the D3 engine eh? Anyway, kind of off-topic there. But you might want to message Dante_uk. He'd have the latest build i'd say.



idiom@Posted: Thu Feb 24, 2005 6:08 am :
Inolen and I have been working for a little while on getting water to look and work properly in Doom3. We now have a proper fresnel effected water shader and proper swimmable water with sounds and splash effects (just placeholders) for the communuity to use.

Image

Image

You can download it here thanks to doom3reference.com.

To install just unzip to your Doom3 directory and load up water as a mod. There is a testmap called 'water' that shows working water.

Make sure you read the readme if you want to use these assets for your own project.

We are aware of the problem when you're half in the water and the mirror effect reflects the inside of the player model. We think there might be a way to work around this but inolen is busy working on other projects atm.



Jehar@Posted: Thu Feb 24, 2005 6:13 am :
Oh my god.
That second pic is picturesque.

Downloading now.

Edit: Well it looks fantastic. I dig the proper reflection, and I see what you mean about the player model.

You said its swim\shootable? felt like a plexiglass covering was over it. shot and felt like a solid surface.

but by the way it runs real nice. not a rescource hog. nice.



inolen@Posted: Thu Feb 24, 2005 6:37 am :
Jehar wrote:
Oh my god.
That second pic is picturesque.

Downloading now.

Edit: Well it looks fantastic. I dig the proper reflection, and I see what you mean about the player model.

You said its swim\shootable? felt like a plexiglass covering was over it. shot and felt like a solid surface.

but by the way it runs real nice. not a rescource hog. nice.


You need to make the water a func_water.



Jehar@Posted: Thu Feb 24, 2005 6:38 am :
watashiwa baka.

conslole command?
:?::?:



goliathvt@Posted: Thu Feb 24, 2005 6:39 am :
Holy piss on a stick that's amazing. I'm going swimming!

G



iceheart@Posted: Thu Feb 24, 2005 6:40 am :
inolen: You forgot to say "oops" :).



Jehar@Posted: Thu Feb 24, 2005 6:41 am :
Jah im not quite too deep into d3 editing yet.
So far im just here for the ride.
So what would it take to make the func_water in the TEST map.

>.>
<.<



idiom@Posted: Thu Feb 24, 2005 6:46 am :
DOH! Sorry guys, forgot to make the testmap with a func_water. Will do that and upload again.



Jehar@Posted: Thu Feb 24, 2005 6:47 am :
danke sehr



inolen@Posted: Thu Feb 24, 2005 6:48 am :
idiom wrote:
DOH! Sorry guys, forgot to make the testmap with a func_water. Will do that and upload again.


What a douche. :P



iceheart@Posted: Thu Feb 24, 2005 6:56 am :
Updated.



Dinky@Posted: Thu Feb 24, 2005 6:56 am :
Wow... fantastic job.... *downloads*

Mmmm the other guy said it's shootable... I'm not getting anything on this side, am I doing something wrong?



Jehar@Posted: Thu Feb 24, 2005 7:13 am :
Jah me neither.

I assume that crate was put there to push in and get some splash?

One of the few thing i dislike about the d3 engine is the way it currently handles fog. It still "clips" the way it did in q3 and even doom.

Why oh why?

by clipping you know what i mean right? you see "layers" of the fog in parralel lines. If one thing could be improved on the engine, I would say this is the thing most in need.

anyways, beutiful work.



inolen@Posted: Thu Feb 24, 2005 7:16 am :
The crate is just there to show a reflection :P



BloodRayne@Posted: Thu Feb 24, 2005 7:19 am :
Looking great!

Don't mind us when we use it in EOC. :wink:

:D



idiom@Posted: Thu Feb 24, 2005 7:26 am :
It's there to be used 8)



zakath@Posted: Thu Feb 24, 2005 7:29 am :
heh, looks damn nice.

might be that it will be used in another TC as well :wink:



butmunch@Posted: Thu Feb 24, 2005 9:21 am :
Just one thing when i throw a body into the water it sinks to the bottom like a rock. Otherwise the water looks damn fine.



iceheart@Posted: Thu Feb 24, 2005 9:25 am :
Throwing bodies? What are you some kind of psycho killer who needs to dispose of bodies???



idiom@Posted: Thu Feb 24, 2005 9:37 am :
I don't think inolen has coded in effects of physics objects. Maybe I can get him to do it if there's enough support :P If not, if someone else wants to, feel completely free.



butmunch@Posted: Thu Feb 24, 2005 9:41 am :
Oh so you've never dumped a body into a river before. :lol: I was just trying out the water. Jes gime some slack.



breakerfall@Posted: Thu Feb 24, 2005 10:35 am :
That looks awesome in the shots.... unfortunately it doesn't work for me. I run the mod and load the map, but I only see fog where the water should be. There's nothing there though - just an empty space that I fall down. No reflections neither.

If it's of any importance, I'm running Doom3 in linux using the latest ATI drivers.



Tenko@Posted: Thu Feb 24, 2005 10:37 am :
There's a gamex86.dll but no .so... I guess there's no linux compilation included so the water code won't be there...



breakerfall@Posted: Thu Feb 24, 2005 10:47 am :
Gaghh, I didn't even think of checking for that. Shame on me. :(



Tenko@Posted: Thu Feb 24, 2005 11:51 am :
Heh, don't worry... I ran into the same problem, and I don't have a windows computer to test it on. So, I'm waiting for some nice person to come along and compile a linux gamex86.so for all of us ^_^



Intel17@Posted: Sat Feb 26, 2005 8:17 pm :
What annoys me is that the water is dependent on massive quantities of geometry to achieve acceptable results.

I thought the age of doing things per-vertex ended with Doom 3?



iceheart@Posted: Sat Feb 26, 2005 8:28 pm :
"Massive quantities" is a pretty massive overstatement of things here...



Intel17@Posted: Sat Feb 26, 2005 8:32 pm :
iceheart wrote:
"Massive quantities" is a pretty massive overstatement of things here...


Perhaps, but I cannot see why it would be done per-vertex. It wouldn't take many instructions at all to do it per-pixel in a fragment program.



Mordenkainen@Posted: Sat Feb 26, 2005 11:38 pm :
Nice work on the fresnel! Two questions:

Firstly, is there any way we can control the fresnel factor from the editor (say a key/val for the func_water or in the material entry)?

Secondly, I noticed that loading the custom game dll makes game loading quite a bit slower. In normal D3 I have to wait around 3 seconds from clicking icon to id logo ROQ starting. Using a shortcut (or from the Mods menu) to the water mod I have to wait around 12 seconds.



idiom@Posted: Sat Feb 26, 2005 11:47 pm :
Well inolen made it per-vertex and I don't think the extra subdivisions needed on the patch would make much difference to fps. That said, I made a different version of the shader that calculates the normal per-pixel and based on a normalmap and I got it semi-working :P It did however add at least 6 more instructions and probably would have needed more to get it to work properly. Calculating the vector the viewer per-pixel would have added even more instructions. Doing this could possibly yield better looking results but I'm not very good at coding and inolen is now working on his own engine plus there might be a performance loss greater then just putting more vertices in.

EDIT: There are a couple of things you can do. In the water material, inolen_water_mirror uses vertexparm 0. The default value is .0200593122. You can change that and it'll basically effect the overall reflectivity of the water, the higher the more reflective.

You can also edit the shader itself. Where it goes "SUB R3, 1.0, program.local[0];" I have in the past changed that 1.0 to a higher number. This makes the water get more reflective more quickly but if you make the value too high it'll lead to the problem where the reflectivity can become too high in some areas that the colours go wierd as if they're oversaturated or something.

Another thing you could try is increase the number of "MUL R4, R4, R3;" instructions. This should I think make the change from transparent to reflective more abrupt but my own experiments didn't show a very noticeable difference.


For your second question, I didn't notice the game load speed difference. Kinda wierd :P Might talk to inolen about it, he might know.



Tenko@Posted: Sun Feb 27, 2005 6:51 am :
I've managed to get gcc 3.3 working on my computer (usually use 3.4) and so I've compiled a linux gamex86.so for anyone that wants it. It's currently hosted at https://skyandlight.no-ip.com/~amackenzie/game01.pk4 . Just download it and stick it into your water directory, and it should work.

Please tell me if there's any problems with it, since this is the first time I've done this. Many thanks! ^_^

PS. If anyone can recommend a good place to host this sort of stuff, I'd appreciate that too, since right now it's hosted on my own comp, that might be up and down... a definite annoyance for anyone trying to get it...



inolen@Posted: Sun Feb 27, 2005 7:15 am :
Mordenkainen wrote:
Nice work on the fresnel! Two questions:

Firstly, is there any way we can control the fresnel factor from the editor (say a key/val for the func_water or in the material entry)?

Secondly, I noticed that loading the custom game dll makes game loading quite a bit slower. In normal D3 I have to wait around 3 seconds from clicking icon to id logo ROQ starting. Using a shortcut (or from the Mods menu) to the water mod I have to wait around 12 seconds.


The dll in the pak file is a debug dll. I forgot to compile the release version. Oh well.



inolen@Posted: Sun Feb 27, 2005 7:59 am :
Intel17 wrote:
What annoys me is that the water is dependent on massive quantities of geometry to achieve acceptable results.

I thought the age of doing things per-vertex ended with Doom 3?


Yea, ok.

By adding a 5x5 patch mesh, we add, what, 32 vertices? So we calculate the fresnel term 36 times for our water. The vertex shader is around 12 instructions I believe. So we use around 432 instructions calculating the fresnel term for the water with a 5x5 patch mesh (which looks just fine as well, I doubt you'd notice much difference from a pixel shader in that map). Now.. lets move this all over to the pixel shader. First, we are going to add probably at least 5 instructions to get the fragment.position into world space. Then, lets say our user is running the game at 1024 x 768 and the entire screen is water. We will have about 17 instructions per pixel calculating the fresnel term. So this would come out to about 13,369,344 instructions calculating the fresnel term for the water (compared to the 432 when done per-vertex), for a marginable increase in visual quality.



nexx@Posted: Sun Feb 27, 2005 10:34 am :
Anybody kind enough to upload a small video?



nd.LaZ@Posted: Sun Feb 27, 2005 12:25 pm :
With swimable water comes the wierdness in lack of swimming animations. I sure hope that RoE will have water because I'd love to make a multiplayer map with water in it. But seeing other players float arround in a not-so-swimming manner would kind of ruin the illusion.

Unless offcourse someone could create and add custom animations.



Dj Dooms Day@Posted: Sun Feb 27, 2005 11:59 pm :
What about the physics of the water? Its applied to the player but not any other movables. Why? Its only a guess but i would think it would only take 1 line of code to give the water a physics property that acts on the world around it and not just the player.



goliathvt@Posted: Mon Feb 28, 2005 3:00 am :
It would be a bit more than that. There are no bouyancy equations in the physics code, if I recall correctly. So, you would need to add them to the system, figure out a way to detect when for moveables are in water, and apply proper physics to them.

G



Dj Dooms Day@Posted: Mon Feb 28, 2005 3:10 am :
Your right, there are no bouyancy physics. But i remember when i was messing around with water that some objects WOULD float, they were completely static but they were floating. As soon as i shot a floating ojbect (ala applying physics to it) it'd sink to the bottem like a rock.
Although we have no bouyancy code i'm pretty sure we could get an object to atleast sink to the bottem with the proper gravity properties.



BEERman@Posted: Mon Feb 28, 2005 4:37 am :
func_forcefield pushing up enough to slow things down without levitating should work ok. You'd have to play around to find the best amount of force to apply.



rich_is_bored@Posted: Mon Feb 28, 2005 4:56 am :
Well considering that they've created a new entity called func_water, might as well integrate boyancy type functionality into this new entity.



Dj Dooms Day@Posted: Mon Feb 28, 2005 6:36 am :
Problem is, you'll have to class every single movable item as a floater or sinker.



inolen@Posted: Mon Feb 28, 2005 7:27 am :
Dj Dooms Day wrote:
Problem is, you'll have to class every single movable item as a floater or sinker.


No? You give them a mass, and set the density of the water and then do your calculations. It shouldn't be hard at all.



heXum@Posted: Mon Feb 28, 2005 8:37 am :
I downloaded this and tested it out... looks great! Was very close to adding it into a multiplayer mod that I'm working on... then I tested something.

Spawned a ragdoll and let it drop to the bottom. Swam down to it and shot it. When it starts taking hits and eventually gibs, FPS drops down to single digits. Not good. :(

Excellent work though. It's beautiful



Dj Dooms Day@Posted: Mon Feb 28, 2005 8:52 am :
inolen wrote:
Dj Dooms Day wrote:
Problem is, you'll have to class every single movable item as a floater or sinker.


No? You give them a mass, and set the density of the water and then do your calculations. It shouldn't be hard at all.

What about hollow objects? We could have a giant barrel, if we make its mass small then we'll be kicking them around like paper. It'll make it unrealistic out of water.
A small brick isn't going to float, but a giant crate would. The brick would wiegh less than the crate, so your going to have to make the giant crate wiegh less than the brick. Out of water that'll look unrealistic.



radix2@Posted: Mon Feb 28, 2005 10:05 am :
Dj Dooms Day wrote:
inolen wrote:
Dj Dooms Day wrote:
Problem is, you'll have to class every single movable item as a floater or sinker.


No? You give them a mass, and set the density of the water and then do your calculations. It shouldn't be hard at all.

What about hollow objects? We could have a giant barrel, if we make its mass small then we'll be kicking them around like paper. It'll make it unrealistic out of water.
A small brick isn't going to float, but a giant crate would. The brick would wiegh less than the crate, so your going to have to make the giant crate wiegh less than the brick. Out of water that'll look unrealistic.


OK - so you need a density attribute too. Or perhaps only a density value as you could calculate mass from volume/density and volume is inherent in the object itself.

hmm - need to think back to science class... That seems arse about...

EDIT: No. You can (roughly) infer volume from the bounding box. Also, each object has a mass attached to it I believe. Therefore you can calculate the density and deal with it from there in terms of bouyancy . If Bouyancy != environment (ie water) then sink/rise at difference(*fudge) whilst within medium. The boundary condition would be a shit though.

EDIT #2. As an aside, does anyone recall within HL2 when you have to shoot some planks of wood underwater (after dealing with manhacks, exploding barrels and flooding a chamber) and the spool floats straight up to the surface upon which you can jump and move on? In the "real" world that spool would be all over the place depending on the angle at which it started. Rising to the left, then the right, then forward, all depending on its initial angle and the "phase of the moon"

Dont ever believe that the Havoc P-engine has modelled things perfectly.



iceheart@Posted: Mon Feb 28, 2005 10:13 am :
Both density and mass are already in the physics system so I don't see what the fuss is about here.



radix2@Posted: Mon Feb 28, 2005 10:25 am :
iceheart wrote:
Both density and mass are already in the physics system so I don't see what the fuss is about here.


If they are then one less calculation. Excellent!



Dj Dooms Day@Posted: Mon Feb 28, 2005 12:04 pm :
Good write up radix2, i think we're getting closer to figuring out just how complicated this can get. :wink:

radix2 wrote:
EDIT #2. As an aside, does anyone recall within HL2 when you have to shoot some planks of wood underwater (after dealing with manhacks, exploding barrels and flooding a chamber) and the spool floats straight up to the surface upon which you can jump and move on? In the "real" world that spool would be all over the place depending on the angle at which it started. Rising to the left, then the right, then forward, all depending on its initial angle and the "phase of the moon"

Dont ever believe that the Havoc P-engine has modelled things perfectly.
Well, i don't think ANY engine (in the gaming world) has ever replicated an objects projection based on such a complicated equation. I'm sure you could emagine the calculations the computer would have to do to create that. It could almost be 'per-pixel physics'. :P

I think another problem that needs to be fixed is the basic way D3 does the physics. It won't apply physics to an object unless it is being acted upon by another force. The big problem is, the 'other forces' don't include gravity. Meaning you could flip a room and the crate won't fall to the roof unless you for example, shoot at it. Only then will it apply the new direction of gravity.



sxotty@Posted: Mon Feb 28, 2005 1:39 pm :
http://www.doom3world.org/phpbb2/viewtopic.php?t=7869&postdays=0&postorder=asc&start=34
We had this discussion before :P There were some simple ideas in that thread about how to hack it and make things look nice, including how to deal with the boundary condition...



Bauul@Posted: Mon Feb 28, 2005 2:02 pm :
Just a thought on the issue of how fast objects sinks compared to others, it's not to do with how heavy they are, it's whether they're denser than water, and then simply how much water they can displace in any one given time. A kilo of metal in a flat sheet will sink slower than a kilo of metal in a thin rod, as the thin rod needs to displace less water to sink.

On the moon, where there is no air, a hammer and a feather will fall at the same rate, it's the same idea, because they're not displacing anything, they just drop at the exact force of gravity.

Therefor, the only thing you need to code is whether an object floats or sinks, one something definatly is going to sink, it's speed will be indirectly proportional to the in game volume of the object, which means every object already has the data it needs for us to work out how fast it sinks.



sxotty@Posted: Mon Feb 28, 2005 2:24 pm :
Baul that isn't quite right b/c a sheet will sink slower than a rod of the same volume and same density. It is probably more a cause of turbulent flow than most anything. As you might or might not remember the friction force is not really related to the area of an object b/c the smaller it is (if the same mass) than the higher the friction (that is why ice skates melt ice and skaters are on a thin sheen of water).

Anyway the water flowing around the sheet has to flow quite a ways, and the water around the rod just moves a tiny bit. Though to be completely honest I am not sure whether it has to do with a transfer of energy to the water as momentum or to do with turbulence and viscosity as suggested earlier, but either way it is unfortunately quite complex. To be honest though I think if things sank or floated and if the floaters floated at the proper height people would be happy enough...



Dj Dooms Day@Posted: Tue Mar 01, 2005 7:01 am :
Your both right, but lets stop talking about that aspect since it really is seriously too complicated for any commercial engine like D3.
Is anyone willing to put together working water physics?



radix2@Posted: Tue Mar 01, 2005 7:35 am :
Dj Dooms Day wrote:
Your both right, but lets stop talking about that aspect since it really is seriously too complicated for any commercial engine like D3.


Exactly my point about the Havoc P-engine. It (as exemplar of todays games out of the box) is not perfect, so why should we be expected to get every detail perfect

Dj Dooms Day wrote:
Is anyone willing to put together working water physics?


I would love to, but alas, I would not know where to start



Dj Dooms Day@Posted: Tue Mar 01, 2005 8:20 am :
radix2 wrote:
Dj Dooms Day wrote:
Is anyone willing to put together working water physics?


I would love to, but alas, I would not know where to start

Well i've created a new thread specificly for this right here: http://www.doom3world.org/phpbb2/viewto ... 9974#79974
So lets atleast start thinking of ways we can go about it.



Dante_uk@Posted: Tue Mar 01, 2005 12:09 pm :
breakerfall wrote:
That looks awesome in the shots.... unfortunately it doesn't work for me. I run the mod and load the map, but I only see fog where the water should be. There's nothing there though - just an empty space that I fall down. No reflections neither.

If it's of any importance, I'm running Doom3 in linux using the latest ATI drivers.


I ported the code to Linux and I only a fog effect too.
Image
I don't drop straight to the bottom though, I sink slowly and can swim.
I'm testing a laptop which is Geforce 4600GO ( DX8.1 I think ). So obviously the dx9 effect won't appear, I was still expecting to see the reflections though as I know they can work on this chipset in doom3.
Here you can see a screenshot I took before using my basic water .mtr file for the fountain. http://homepages.nildram.co.uk/%7Edanteuk/euro/screenshots/lnx_gf4go1.jpg

I assume that before using the standard gamex86.so you should have had an error complaining about the missing class idWater.

What I do get is:
Code:
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
    0 purged from previous
  148 kept from previous
  411 new loaded
all images loaded in  20.1 seconds
----------------------------------------
-----------------------------------
28406 msec to load water
idRenderWorld::GenerateAllInteractions, msec = 0, staticAllocCount = 0.
interactionTable size: 44084 bytes
21 interaction take 2352 bytes
------------- Warnings ---------------
during water...
WARNING: material 'textures/inolen_water' had stage with no image
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
3 warnings



idiom@Posted: Wed Mar 02, 2005 1:20 am :
The reflection is rendered but only shown through the fresnel shader so if the shader doesn't work for your card you probably wouldn't get the reflection.



binaryc@Posted: Wed Mar 02, 2005 2:23 am :
You may want to add a section like this for those with lower-end video cards:
{
if ( fragmentPrograms == 0 )
blend blend
map _scratch
alpha 0.5
}



idiom@Posted: Wed Mar 02, 2005 2:44 am :
Well the code seems to be v1.0 fp/vp so it might not be the fresnel shader. Could it be the heathaze?



Gazzul@Posted: Wed Mar 02, 2005 9:17 am :
I don't kown if it's of any use.

I had problems to see the reflections too, so I just turned the quality in Doom3 from Low Quality to High Quality and after a vid_restart, I was able to see them...



Dante_uk@Posted: Wed Mar 02, 2005 9:19 am :
I know the heathaze won't work on my laptop chipset but in the water .mtr that I use it doesn't stop the reflection.


Code:
{
   noSelfShadow
   noshadows
//   translucent
   nonsolid
   water
   {
                vertexProgram           heatHazeWithMask.vfp
                vertexParm              0       time * 0.1 , time * 0.5*Parm3
                vertexParm              1       3
                fragmentProgram         heatHazeWithMask.vfp
                fragmentMap             0       _currentRender
                fragmentMap             1       textures/sfx/vp1.tga
                fragmentMap             2       textures/sfx/vp1_alpha.tga
   }

   { // Mirror effect
      mirrorRenderMap      512   256
      blend   blend

      red      0.3
      green   0.3
      blue   0.1
      alpha   0.7

      // these may not be necessary when I finish the code
      translate   0.5 , 0.5
      scale   0.5 , 0.5
   } // End Mirror effect


   //
   // first part of the crossfade
   //
   {
      if snapFive[ time / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled001, 4)
   }
   {
      if snapFive[ time + 1.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled003, 4)
   }
   {
      if snapFive[ time + 2.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled005, 4)
   }
   {
      if snapFive[ time + 3.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled007, 4)
   }
   {
      if snapFive[ time + 4.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled009, 4)
   }
   

   //
   // second part of the crossfade
   //
   {
      if snapFive[ time + 0.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled002, 4)
   }
   {
      if snapFive[ time + 1.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled004, 4)
   }
   {
      if snapFive[ time + 2.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled006, 4)
   }
   {
      if snapFive[ time + 3.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled008, 4)
   }
   {
      if snapFive[ time + 4.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled010, 4)
   }


   {
      blend      specularmap
      map      textures/water_njm/water_njm_s.tga
   }
   {
      blend      diffusemap
      map      textures/water_njm/water_njm.tga
   }
}



Dante_uk@Posted: Wed Mar 02, 2005 12:24 pm :
I've been looking the .mtr on a DX8 & DX9 cards and basically as in my post above nothing is drawn.

I've made a small change to .mtr and added one of my own, then I changed the test map slightly to have two tanks of water and a little more detail & light.
Image

This file contains it all ( INCLUDING gamex86.so for Linux !! ) NON DEBUG - *UPDATED* map to test 4 tanks of different water now.
http://homepages.nildram.co.uk/~danteuk/water.zip

I can't test what this looks like on DX9 level cards till I get home tonight so it would be interesting if someone could post a shot.



breakerfall@Posted: Wed Mar 02, 2005 4:59 pm :
My system:

AMD64 3000
1 GIG RAM
ATI 9700pro - latest linux drivers

The blue/green water (on the right in your shot) doesn't look so good. The actual surface ripples look like a 2d film just sitting on top of the water and the movement is very awkward, seemingly changing every half second or so. Doesn't look right. The darker water (left) looks much better ripple wise but the reflections still seem a little blocky. Also, a strange glitch occurs when viewing the darker water whilst hovering just over the green tank - looking over the diving wall. You see the stripes across the whole reflection. You also see the inside of the marines body whilst emerging from water.



Dante_uk@Posted: Wed Mar 02, 2005 5:33 pm :
Yeah the blue/green animation is a tacky hack.
I don't know much about ATI cards, does that card(& drivers) support DX9 level shaders?
The blue/green water should have the heathaze effect to make the surface move too.(as well as the jerky animation).

Both the reflections have the hollow model problem, I think something in the func_water code should be added (or in player.def ??? )so the player model isn't drawn for 1st person view when in or touching water.



iceheart@Posted: Wed Mar 02, 2005 5:45 pm :
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.



inolen@Posted: Wed Mar 02, 2005 7:58 pm :
iceheart wrote:
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.


Not really... I haven't worked on this for a while, but I think I just never figured out how the mirrorRenderMap got it's view. If someone finds out how, they can just suppress the local player model from it when in the water.



Mordenkainen@Posted: Wed Mar 02, 2005 8:22 pm :
inolen wrote:
iceheart wrote:
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.


Not really... I haven't worked on this for a while, but I think I just never figured out how the mirrorRenderMap got it's view. If someone finds out how, they can just suppress the local player model from it when in the water.


If at all possible, only supress backfaces?



inolen@Posted: Wed Mar 02, 2005 9:46 pm :
Mordenkainen wrote:
inolen wrote:
iceheart wrote:
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.


Not really... I haven't worked on this for a while, but I think I just never figured out how the mirrorRenderMap got it's view. If someone finds out how, they can just suppress the local player model from it when in the water.


If at all possible, only supress backfaces?


Why?



Dante_uk@Posted: Thu Mar 03, 2005 1:30 am :
In the interest of experimenting I've extended the map to have 8 pools of water.

1 - The original water by inolen & idiom.
2 - A varation on the above.
3 - Material by me
4 - Material by me
5 - Mordenkainen - failed test by me
6 - Mordenkainen
7 - water07 / water07_surf ( have a go, please !! )
8 - water08 / water08_surf ( have a go, please !! )

This zip has all you need to run the map in Windows or Linux.(source code removed b'c not changed).
http://homepages.nildram.co.uk/~danteuk/water.zip

Image



Mordenkainen@Posted: Thu Mar 03, 2005 11:55 am :
inolen wrote:
Mordenkainen wrote:
If at all possible, only supress backfaces?


Why?


The problem is the player model intersecting with the reflection plane right? The reflection shows the inside of the model. If you can draw only front faces (as viewed from the reflection plane) then the visual artefact should disappear but you still have the player's reflection, right?

I was just thinking that completely removing the player model from the reflection when we step into the water is going to look awkward. That's probably why in HL2 we never see gordon's reflection, even when we're not touching the water surface.



Bauul@Posted: Thu Mar 03, 2005 3:16 pm :
Not seeing the player's reflection in water is so common in games it's pratically a given. Other stuff like that, e.g player shadows, have been excluded from games almost universally, so not including them in D3 isn't going to be noticed by anyone.

Then again, if you could actually see your reflection, that would be rather cool. For the mean time, just surpressing the player model when in the water I think will solve the immidate artifact problem, surpressing only the back faces is something to look at later.



iceheart@Posted: Thu Mar 03, 2005 3:29 pm :
I think it should be pretty obvious that you should see yourself in a reflective surface, anything else is just the devs taking the easy, cheap way out.



dolver@Posted: Sun Mar 06, 2005 5:31 pm :
i noticed with a func_water that when you sprint-jump into it it shows a splash decal and particle but when you walk on it it only shows the splash decal. this isnt as much of a problem though than the fact that when you shoot it it doesnt make a splash decal or particle. why is this? ive tried to fix it myself but i cant figure it out. could someone help?



radix2@Posted: Sun Mar 06, 2005 7:57 pm :
Dante_uk wrote:

1 - The original water by inolen & idiom.
2 - A varation on the above.
3 - Material by me
4 - Material by me
5 - Mordenkainen - failed test by me
6 - Mordenkainen
7 - water07 / water07_surf ( have a go, please !! )
8 - water08 / water08_surf ( have a go, please !! )


7 and 4 look the best to me, although neither seem to reflect. 5 is a pit of nodraw for me.



Dante_uk@Posted: Sun Mar 06, 2005 10:12 pm :
radix2 wrote:
Dante_uk wrote:

1 - The original water by inolen & idiom.
2 - A varation on the above.
3 - Material by me
4 - Material by me
5 - Mordenkainen - failed test by me
6 - Mordenkainen
7 - water07 / water07_surf ( have a go, please !! )
8 - water08 / water08_surf ( have a go, please !! )


7 and 4 look the best to me, although neither seem to reflect. 5 is a pit of nodraw for me.


What DX Level gfx card do you have?
Some of the effects being used as require a DX 9 level card.



inolen@Posted: Sun Mar 06, 2005 10:47 pm :
dolver wrote:
i noticed with a func_water that when you sprint-jump into it it shows a splash decal and particle but when you walk on it it only shows the splash decal. this isnt as much of a problem though than the fact that when you shoot it it doesnt make a splash decal or particle. why is this? ive tried to fix it myself but i cant figure it out. could someone help?


I talked about that in the readme.



radix2@Posted: Sun Mar 06, 2005 10:54 pm :
Dante_uk wrote:
What DX Level gfx card do you have?
Some of the effects being used as require a DX 9 level card.


Sorry, I should have posted those details orginally. Now I am not am home to check the minor revision, but I can tell you that it is DX9 capable.. I will edit this post with the proper information when I get home.



dolver@Posted: Mon Mar 07, 2005 4:39 am :
inolen wrote:
dolver wrote:
i noticed with a func_water that when you sprint-jump into it it shows a splash decal and particle but when you walk on it it only shows the splash decal. this isnt as much of a problem though than the fact that when you shoot it it doesnt make a splash decal or particle. why is this? ive tried to fix it myself but i cant figure it out. could someone help?


I talked about that in the readme.


oh sorry i didnt see that. any idea how to fix it or what file to modify? wheres that BulletWaterTrail function you mentioned

edit: nevermind i found the file



radix2@Posted: Wed Mar 09, 2005 10:45 am :
Dante_uk wrote:
What DX Level gfx card do you have?
Some of the effects being used as require a DX 9 level card.


Damn - was running old Cat version (4.8 with Doom3 patch). I have now updated to 5.2 and these are my observations. System spec in signature..

1 - The original water by inolen & idiom.
No reflection. Artifacts around crate (maybe the water surface is too close to the crate). Water is too clear

2 - A varation on the above.
No drawing of water surface, but still an odd reflection from flashight

3 - Material by Dante_uk
ripples "stutter" or "lag". Reflection of crate, lighthanger placeholders and an image of player. Good apart from lag, although too clear.

4 - Material by Dante_uk
Good. Nice ripples and flareout from flashlight. Nice distortion of drum from the right of the crate whilst facing the wall

5 - Mordenkainen - failed test by me
No draw aside from weird reflection of flashlight

6 - Mordenkainen
Good - interesting diffraction bands but no reflection. Too clear

7 - water07 / water07_surf ( have a go, please !! )
no reflection. good ripples and distortion. Nice murkiness

8 - water08 / water08_surf ( have a go, please !! )
no reflection. Good ripples and distortion. Too clear.


One thing that I notice is that if you are on the right side of the crate then the drum is distorted/displaced (which is correct), but on the left side of the crate, you just get a slight ripple effect.

I like aspects of 3 for reflections; 7 for murkiness, ripples and distortion and 4 for the flashlight glare effect. These might be exclusionary though... :D



mikebart@Posted: Mon Mar 28, 2005 2:19 am :
Im having a problem getting the water reflection to run in game but it runs fine in the editor, im using the texture: njm_water_reflect
could it be a graphics card issue? if so why does it work in editor mode?

check out this post if you want to see screenshots: http://www.doom3world.org/phpbb2/viewtopic.php?t=9589

thanks, nice work by the way :)



Dante_uk@Posted: Tue Mar 29, 2005 12:37 pm :
When you run the game are you running fullscreen?
if so can you try in windowed mode, just to see that's where the problem is.

I've seen things before that look different in the editor than in game, not sure really why that would be the case.

I've mailed Brian at id about this:
Quote:
There seems to be odd little differences in the rendered image in the editor from the in-game image.

Specifically problems with reflections that look fine in editor but don’t appear in game.

Could you post an explanation/list of differences in the rendering from the Editor preview window and the normal game rendering (plus any between running in windowed mode vs fullscreen).


With a little luck we may get an answer.



mikebart@Posted: Tue Mar 29, 2005 9:15 pm :
thanks dante, its pretty much doing the same thing in window mode as in fullscreen mode but sometimes with a different image, its a realy random occurance.
I had the texture reflecting properly in the water test map, I even copied and pasted the func_water with that texture into my map after several failed attempts but I still couldnt get it to work, I really dont think its a performance issue but heres my specs anyway;

AMD Athlon 2400 512 with Gforce 4 ti 4200 with AGP 8x

thanks again :)



mikebart@Posted: Wed Apr 06, 2005 9:07 pm :
Have you heard back from brian?



Dante_uk@Posted: Wed Apr 06, 2005 9:20 pm :
mikebart wrote:
Have you heard back from brian?


I'm afraid not, I guess he's a little busy with ROE just coming out, hopefully putting together the SDK for 1.2/3.



Gmz1013@Posted: Wed Apr 06, 2005 10:18 pm :
is it soposed to be soild or liquid its soild for me... Help please...



Dante_uk@Posted: Wed Apr 06, 2005 10:57 pm :
Gmz1013 wrote:
is it soposed to be soild or liquid its soild for me... Help please...


To what are you refering?

If you are trying to use func_water then it should not be solid, this is a change in the SDK, are you using the .dll from my water.zip?
Are you testing my test map or one of your own?
Do you have any errors appear in the console?

Try my newest test map & dll, just unzip into doom3 folder it will create a folder called GravityMod, in there should be a run.bat, double click it. This should load my test map, turn to your right and you should see a door with a sign next to it saying Water Tests.
http://homepages.nildram.co.uk/~danteuk/GravityMod.zip



ReubenDSala@Posted: Wed Apr 06, 2005 11:28 pm :
I dont think that works with the new patch (1.3)



Fitzsimmons@Posted: Mon Apr 25, 2005 9:25 pm :
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)



Dante_uk@Posted: Tue Apr 26, 2005 10:04 am :
ReubenDSala wrote:
I dont think that works with the new patch (1.3)


Nothing works with 1.3 because it's not out yet, nothing works with 1.2 yet because the SDK for it isn't out.

I believe 1.3 will be released sometime soon and shortly after the SDK for it.

Then we all have the fun task of merging all our code changes into it.

Fitzsimmons wrote:
I'm having a render problem on linux

Without information about your video chipset I can't really help.
I guess from the shot it's a DX 9 level chipset.

Some of the those pools don't renderer correctly of some hardware.
I have access to 3 machines with doom3 on at 3 different DX levels: 7,8,9
All are Nvidia cards though.
The purpose of that test map was to try lots of different method for making water, then test it on all three chipsets and find one method that looks good on all three.



breakerfall@Posted: Sat Apr 30, 2005 3:09 pm :
Fitzsimmons wrote:
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)


This is very similar to what I posted a page or two back. Same thing, under linux, ATI drivers etc.



Fitzsimmons@Posted: Sat Apr 30, 2005 5:18 pm :
I have an nVidia card, if that makes any difference.



MichaelZee@Posted: Tue Aug 16, 2005 6:01 am :
I load up the water mod and then type in "map water"

Your map loads up but there is no water inside the pool. Any ideas?



Sebazzz@Posted: Mon Nov 14, 2005 1:01 am :
You're not the only one.

nVidia Geforce FX 5700 LE
Amd athlon XP 2600+
Windows XP Home

Doom 3 with 1.3 patch



mth@Posted: Thu Dec 01, 2005 10:11 am :
same thing. only fog in the pit, without any water. Any ideas?



der_coach@Posted: Thu May 11, 2006 7:37 am :
lo.

we merged inolens code in the sdk1.3-vanilla version.

:arrow:http://themir.de/public/doom3/doom3water13.rar

you can find the changes searching for: // BEGIN WATER orig. by inolen -- v1.3 by jobst

--
jobst

http://www.themir.de



6th Venom@Posted: Thu May 11, 2006 8:18 am :
Thanks for releasing that! I think it's very helpfull for non-coders! :D

For the "black-draw" problem, i had this the first timei ran pbmax's water, cause i was not in high details' settings, now all is ok. i don't know why... maybe medium & low disable heathazes and/or mirrorrenders. :wink:



ARON2431@Posted: Fri Jun 09, 2006 1:38 am :
I'm getting the same issue. I load up the mod and the map, and the only thing I see is fog



Bauul@Posted: Sun Jun 11, 2006 6:05 pm :
Make sure high detail is enabled in the options menu, the water effects are classed by the game as high detail.



coldkodiak@Posted: Mon Jan 29, 2007 8:18 am :
There are a lot of dead links in this thread.

I was wondering if anyone has this water shader current?



Dj Dooms Day@Posted: Mon Jan 29, 2007 8:23 am :
Woah, now theres a blast from the past. Hiya Ck, how are ya? Back on the D3 engine eh? Anyway, kind of off-topic there. But you might want to message Dante_uk. He'd have the latest build i'd say.



idiom@Posted: Thu Feb 24, 2005 6:08 am :
Inolen and I have been working for a little while on getting water to look and work properly in Doom3. We now have a proper fresnel effected water shader and proper swimmable water with sounds and splash effects (just placeholders) for the communuity to use.

Image

Image

You can download it here thanks to doom3reference.com.

To install just unzip to your Doom3 directory and load up water as a mod. There is a testmap called 'water' that shows working water.

Make sure you read the readme if you want to use these assets for your own project.

We are aware of the problem when you're half in the water and the mirror effect reflects the inside of the player model. We think there might be a way to work around this but inolen is busy working on other projects atm.



Jehar@Posted: Thu Feb 24, 2005 6:13 am :
Oh my god.
That second pic is picturesque.

Downloading now.

Edit: Well it looks fantastic. I dig the proper reflection, and I see what you mean about the player model.

You said its swim\shootable? felt like a plexiglass covering was over it. shot and felt like a solid surface.

but by the way it runs real nice. not a rescource hog. nice.



inolen@Posted: Thu Feb 24, 2005 6:37 am :
Jehar wrote:
Oh my god.
That second pic is picturesque.

Downloading now.

Edit: Well it looks fantastic. I dig the proper reflection, and I see what you mean about the player model.

You said its swim\shootable? felt like a plexiglass covering was over it. shot and felt like a solid surface.

but by the way it runs real nice. not a rescource hog. nice.


You need to make the water a func_water.



Jehar@Posted: Thu Feb 24, 2005 6:38 am :
watashiwa baka.

conslole command?
:?::?:



goliathvt@Posted: Thu Feb 24, 2005 6:39 am :
Holy piss on a stick that's amazing. I'm going swimming!

G



iceheart@Posted: Thu Feb 24, 2005 6:40 am :
inolen: You forgot to say "oops" :).



Jehar@Posted: Thu Feb 24, 2005 6:41 am :
Jah im not quite too deep into d3 editing yet.
So far im just here for the ride.
So what would it take to make the func_water in the TEST map.

>.>
<.<



idiom@Posted: Thu Feb 24, 2005 6:46 am :
DOH! Sorry guys, forgot to make the testmap with a func_water. Will do that and upload again.



Jehar@Posted: Thu Feb 24, 2005 6:47 am :
danke sehr



inolen@Posted: Thu Feb 24, 2005 6:48 am :
idiom wrote:
DOH! Sorry guys, forgot to make the testmap with a func_water. Will do that and upload again.


What a douche. :P



iceheart@Posted: Thu Feb 24, 2005 6:56 am :
Updated.



Dinky@Posted: Thu Feb 24, 2005 6:56 am :
Wow... fantastic job.... *downloads*

Mmmm the other guy said it's shootable... I'm not getting anything on this side, am I doing something wrong?



Jehar@Posted: Thu Feb 24, 2005 7:13 am :
Jah me neither.

I assume that crate was put there to push in and get some splash?

One of the few thing i dislike about the d3 engine is the way it currently handles fog. It still "clips" the way it did in q3 and even doom.

Why oh why?

by clipping you know what i mean right? you see "layers" of the fog in parralel lines. If one thing could be improved on the engine, I would say this is the thing most in need.

anyways, beutiful work.



inolen@Posted: Thu Feb 24, 2005 7:16 am :
The crate is just there to show a reflection :P



BloodRayne@Posted: Thu Feb 24, 2005 7:19 am :
Looking great!

Don't mind us when we use it in EOC. :wink:

:D



idiom@Posted: Thu Feb 24, 2005 7:26 am :
It's there to be used 8)



zakath@Posted: Thu Feb 24, 2005 7:29 am :
heh, looks damn nice.

might be that it will be used in another TC as well :wink:



butmunch@Posted: Thu Feb 24, 2005 9:21 am :
Just one thing when i throw a body into the water it sinks to the bottom like a rock. Otherwise the water looks damn fine.



iceheart@Posted: Thu Feb 24, 2005 9:25 am :
Throwing bodies? What are you some kind of psycho killer who needs to dispose of bodies???



idiom@Posted: Thu Feb 24, 2005 9:37 am :
I don't think inolen has coded in effects of physics objects. Maybe I can get him to do it if there's enough support :P If not, if someone else wants to, feel completely free.



butmunch@Posted: Thu Feb 24, 2005 9:41 am :
Oh so you've never dumped a body into a river before. :lol: I was just trying out the water. Jes gime some slack.



breakerfall@Posted: Thu Feb 24, 2005 10:35 am :
That looks awesome in the shots.... unfortunately it doesn't work for me. I run the mod and load the map, but I only see fog where the water should be. There's nothing there though - just an empty space that I fall down. No reflections neither.

If it's of any importance, I'm running Doom3 in linux using the latest ATI drivers.



Tenko@Posted: Thu Feb 24, 2005 10:37 am :
There's a gamex86.dll but no .so... I guess there's no linux compilation included so the water code won't be there...



breakerfall@Posted: Thu Feb 24, 2005 10:47 am :
Gaghh, I didn't even think of checking for that. Shame on me. :(



Tenko@Posted: Thu Feb 24, 2005 11:51 am :
Heh, don't worry... I ran into the same problem, and I don't have a windows computer to test it on. So, I'm waiting for some nice person to come along and compile a linux gamex86.so for all of us ^_^



Intel17@Posted: Sat Feb 26, 2005 8:17 pm :
What annoys me is that the water is dependent on massive quantities of geometry to achieve acceptable results.

I thought the age of doing things per-vertex ended with Doom 3?



iceheart@Posted: Sat Feb 26, 2005 8:28 pm :
"Massive quantities" is a pretty massive overstatement of things here...



Intel17@Posted: Sat Feb 26, 2005 8:32 pm :
iceheart wrote:
"Massive quantities" is a pretty massive overstatement of things here...


Perhaps, but I cannot see why it would be done per-vertex. It wouldn't take many instructions at all to do it per-pixel in a fragment program.



Mordenkainen@Posted: Sat Feb 26, 2005 11:38 pm :
Nice work on the fresnel! Two questions:

Firstly, is there any way we can control the fresnel factor from the editor (say a key/val for the func_water or in the material entry)?

Secondly, I noticed that loading the custom game dll makes game loading quite a bit slower. In normal D3 I have to wait around 3 seconds from clicking icon to id logo ROQ starting. Using a shortcut (or from the Mods menu) to the water mod I have to wait around 12 seconds.



idiom@Posted: Sat Feb 26, 2005 11:47 pm :
Well inolen made it per-vertex and I don't think the extra subdivisions needed on the patch would make much difference to fps. That said, I made a different version of the shader that calculates the normal per-pixel and based on a normalmap and I got it semi-working :P It did however add at least 6 more instructions and probably would have needed more to get it to work properly. Calculating the vector the viewer per-pixel would have added even more instructions. Doing this could possibly yield better looking results but I'm not very good at coding and inolen is now working on his own engine plus there might be a performance loss greater then just putting more vertices in.

EDIT: There are a couple of things you can do. In the water material, inolen_water_mirror uses vertexparm 0. The default value is .0200593122. You can change that and it'll basically effect the overall reflectivity of the water, the higher the more reflective.

You can also edit the shader itself. Where it goes "SUB R3, 1.0, program.local[0];" I have in the past changed that 1.0 to a higher number. This makes the water get more reflective more quickly but if you make the value too high it'll lead to the problem where the reflectivity can become too high in some areas that the colours go wierd as if they're oversaturated or something.

Another thing you could try is increase the number of "MUL R4, R4, R3;" instructions. This should I think make the change from transparent to reflective more abrupt but my own experiments didn't show a very noticeable difference.


For your second question, I didn't notice the game load speed difference. Kinda wierd :P Might talk to inolen about it, he might know.



Tenko@Posted: Sun Feb 27, 2005 6:51 am :
I've managed to get gcc 3.3 working on my computer (usually use 3.4) and so I've compiled a linux gamex86.so for anyone that wants it. It's currently hosted at https://skyandlight.no-ip.com/~amackenzie/game01.pk4 . Just download it and stick it into your water directory, and it should work.

Please tell me if there's any problems with it, since this is the first time I've done this. Many thanks! ^_^

PS. If anyone can recommend a good place to host this sort of stuff, I'd appreciate that too, since right now it's hosted on my own comp, that might be up and down... a definite annoyance for anyone trying to get it...



inolen@Posted: Sun Feb 27, 2005 7:15 am :
Mordenkainen wrote:
Nice work on the fresnel! Two questions:

Firstly, is there any way we can control the fresnel factor from the editor (say a key/val for the func_water or in the material entry)?

Secondly, I noticed that loading the custom game dll makes game loading quite a bit slower. In normal D3 I have to wait around 3 seconds from clicking icon to id logo ROQ starting. Using a shortcut (or from the Mods menu) to the water mod I have to wait around 12 seconds.


The dll in the pak file is a debug dll. I forgot to compile the release version. Oh well.



inolen@Posted: Sun Feb 27, 2005 7:59 am :
Intel17 wrote:
What annoys me is that the water is dependent on massive quantities of geometry to achieve acceptable results.

I thought the age of doing things per-vertex ended with Doom 3?


Yea, ok.

By adding a 5x5 patch mesh, we add, what, 32 vertices? So we calculate the fresnel term 36 times for our water. The vertex shader is around 12 instructions I believe. So we use around 432 instructions calculating the fresnel term for the water with a 5x5 patch mesh (which looks just fine as well, I doubt you'd notice much difference from a pixel shader in that map). Now.. lets move this all over to the pixel shader. First, we are going to add probably at least 5 instructions to get the fragment.position into world space. Then, lets say our user is running the game at 1024 x 768 and the entire screen is water. We will have about 17 instructions per pixel calculating the fresnel term. So this would come out to about 13,369,344 instructions calculating the fresnel term for the water (compared to the 432 when done per-vertex), for a marginable increase in visual quality.



nexx@Posted: Sun Feb 27, 2005 10:34 am :
Anybody kind enough to upload a small video?



nd.LaZ@Posted: Sun Feb 27, 2005 12:25 pm :
With swimable water comes the wierdness in lack of swimming animations. I sure hope that RoE will have water because I'd love to make a multiplayer map with water in it. But seeing other players float arround in a not-so-swimming manner would kind of ruin the illusion.

Unless offcourse someone could create and add custom animations.



Dj Dooms Day@Posted: Sun Feb 27, 2005 11:59 pm :
What about the physics of the water? Its applied to the player but not any other movables. Why? Its only a guess but i would think it would only take 1 line of code to give the water a physics property that acts on the world around it and not just the player.



goliathvt@Posted: Mon Feb 28, 2005 3:00 am :
It would be a bit more than that. There are no bouyancy equations in the physics code, if I recall correctly. So, you would need to add them to the system, figure out a way to detect when for moveables are in water, and apply proper physics to them.

G



Dj Dooms Day@Posted: Mon Feb 28, 2005 3:10 am :
Your right, there are no bouyancy physics. But i remember when i was messing around with water that some objects WOULD float, they were completely static but they were floating. As soon as i shot a floating ojbect (ala applying physics to it) it'd sink to the bottem like a rock.
Although we have no bouyancy code i'm pretty sure we could get an object to atleast sink to the bottem with the proper gravity properties.



BEERman@Posted: Mon Feb 28, 2005 4:37 am :
func_forcefield pushing up enough to slow things down without levitating should work ok. You'd have to play around to find the best amount of force to apply.



rich_is_bored@Posted: Mon Feb 28, 2005 4:56 am :
Well considering that they've created a new entity called func_water, might as well integrate boyancy type functionality into this new entity.



Dj Dooms Day@Posted: Mon Feb 28, 2005 6:36 am :
Problem is, you'll have to class every single movable item as a floater or sinker.



inolen@Posted: Mon Feb 28, 2005 7:27 am :
Dj Dooms Day wrote:
Problem is, you'll have to class every single movable item as a floater or sinker.


No? You give them a mass, and set the density of the water and then do your calculations. It shouldn't be hard at all.



heXum@Posted: Mon Feb 28, 2005 8:37 am :
I downloaded this and tested it out... looks great! Was very close to adding it into a multiplayer mod that I'm working on... then I tested something.

Spawned a ragdoll and let it drop to the bottom. Swam down to it and shot it. When it starts taking hits and eventually gibs, FPS drops down to single digits. Not good. :(

Excellent work though. It's beautiful



Dj Dooms Day@Posted: Mon Feb 28, 2005 8:52 am :
inolen wrote:
Dj Dooms Day wrote:
Problem is, you'll have to class every single movable item as a floater or sinker.


No? You give them a mass, and set the density of the water and then do your calculations. It shouldn't be hard at all.

What about hollow objects? We could have a giant barrel, if we make its mass small then we'll be kicking them around like paper. It'll make it unrealistic out of water.
A small brick isn't going to float, but a giant crate would. The brick would wiegh less than the crate, so your going to have to make the giant crate wiegh less than the brick. Out of water that'll look unrealistic.



radix2@Posted: Mon Feb 28, 2005 10:05 am :
Dj Dooms Day wrote:
inolen wrote:
Dj Dooms Day wrote:
Problem is, you'll have to class every single movable item as a floater or sinker.


No? You give them a mass, and set the density of the water and then do your calculations. It shouldn't be hard at all.

What about hollow objects? We could have a giant barrel, if we make its mass small then we'll be kicking them around like paper. It'll make it unrealistic out of water.
A small brick isn't going to float, but a giant crate would. The brick would wiegh less than the crate, so your going to have to make the giant crate wiegh less than the brick. Out of water that'll look unrealistic.


OK - so you need a density attribute too. Or perhaps only a density value as you could calculate mass from volume/density and volume is inherent in the object itself.

hmm - need to think back to science class... That seems arse about...

EDIT: No. You can (roughly) infer volume from the bounding box. Also, each object has a mass attached to it I believe. Therefore you can calculate the density and deal with it from there in terms of bouyancy . If Bouyancy != environment (ie water) then sink/rise at difference(*fudge) whilst within medium. The boundary condition would be a shit though.

EDIT #2. As an aside, does anyone recall within HL2 when you have to shoot some planks of wood underwater (after dealing with manhacks, exploding barrels and flooding a chamber) and the spool floats straight up to the surface upon which you can jump and move on? In the "real" world that spool would be all over the place depending on the angle at which it started. Rising to the left, then the right, then forward, all depending on its initial angle and the "phase of the moon"

Dont ever believe that the Havoc P-engine has modelled things perfectly.



iceheart@Posted: Mon Feb 28, 2005 10:13 am :
Both density and mass are already in the physics system so I don't see what the fuss is about here.



radix2@Posted: Mon Feb 28, 2005 10:25 am :
iceheart wrote:
Both density and mass are already in the physics system so I don't see what the fuss is about here.


If they are then one less calculation. Excellent!



Dj Dooms Day@Posted: Mon Feb 28, 2005 12:04 pm :
Good write up radix2, i think we're getting closer to figuring out just how complicated this can get. :wink:

radix2 wrote:
EDIT #2. As an aside, does anyone recall within HL2 when you have to shoot some planks of wood underwater (after dealing with manhacks, exploding barrels and flooding a chamber) and the spool floats straight up to the surface upon which you can jump and move on? In the "real" world that spool would be all over the place depending on the angle at which it started. Rising to the left, then the right, then forward, all depending on its initial angle and the "phase of the moon"

Dont ever believe that the Havoc P-engine has modelled things perfectly.
Well, i don't think ANY engine (in the gaming world) has ever replicated an objects projection based on such a complicated equation. I'm sure you could emagine the calculations the computer would have to do to create that. It could almost be 'per-pixel physics'. :P

I think another problem that needs to be fixed is the basic way D3 does the physics. It won't apply physics to an object unless it is being acted upon by another force. The big problem is, the 'other forces' don't include gravity. Meaning you could flip a room and the crate won't fall to the roof unless you for example, shoot at it. Only then will it apply the new direction of gravity.



sxotty@Posted: Mon Feb 28, 2005 1:39 pm :
http://www.doom3world.org/phpbb2/viewtopic.php?t=7869&postdays=0&postorder=asc&start=34
We had this discussion before :P There were some simple ideas in that thread about how to hack it and make things look nice, including how to deal with the boundary condition...



Bauul@Posted: Mon Feb 28, 2005 2:02 pm :
Just a thought on the issue of how fast objects sinks compared to others, it's not to do with how heavy they are, it's whether they're denser than water, and then simply how much water they can displace in any one given time. A kilo of metal in a flat sheet will sink slower than a kilo of metal in a thin rod, as the thin rod needs to displace less water to sink.

On the moon, where there is no air, a hammer and a feather will fall at the same rate, it's the same idea, because they're not displacing anything, they just drop at the exact force of gravity.

Therefor, the only thing you need to code is whether an object floats or sinks, one something definatly is going to sink, it's speed will be indirectly proportional to the in game volume of the object, which means every object already has the data it needs for us to work out how fast it sinks.



sxotty@Posted: Mon Feb 28, 2005 2:24 pm :
Baul that isn't quite right b/c a sheet will sink slower than a rod of the same volume and same density. It is probably more a cause of turbulent flow than most anything. As you might or might not remember the friction force is not really related to the area of an object b/c the smaller it is (if the same mass) than the higher the friction (that is why ice skates melt ice and skaters are on a thin sheen of water).

Anyway the water flowing around the sheet has to flow quite a ways, and the water around the rod just moves a tiny bit. Though to be completely honest I am not sure whether it has to do with a transfer of energy to the water as momentum or to do with turbulence and viscosity as suggested earlier, but either way it is unfortunately quite complex. To be honest though I think if things sank or floated and if the floaters floated at the proper height people would be happy enough...



Dj Dooms Day@Posted: Tue Mar 01, 2005 7:01 am :
Your both right, but lets stop talking about that aspect since it really is seriously too complicated for any commercial engine like D3.
Is anyone willing to put together working water physics?



radix2@Posted: Tue Mar 01, 2005 7:35 am :
Dj Dooms Day wrote:
Your both right, but lets stop talking about that aspect since it really is seriously too complicated for any commercial engine like D3.


Exactly my point about the Havoc P-engine. It (as exemplar of todays games out of the box) is not perfect, so why should we be expected to get every detail perfect

Dj Dooms Day wrote:
Is anyone willing to put together working water physics?


I would love to, but alas, I would not know where to start



Dj Dooms Day@Posted: Tue Mar 01, 2005 8:20 am :
radix2 wrote:
Dj Dooms Day wrote:
Is anyone willing to put together working water physics?


I would love to, but alas, I would not know where to start

Well i've created a new thread specificly for this right here: http://www.doom3world.org/phpbb2/viewto ... 9974#79974
So lets atleast start thinking of ways we can go about it.



Dante_uk@Posted: Tue Mar 01, 2005 12:09 pm :
breakerfall wrote:
That looks awesome in the shots.... unfortunately it doesn't work for me. I run the mod and load the map, but I only see fog where the water should be. There's nothing there though - just an empty space that I fall down. No reflections neither.

If it's of any importance, I'm running Doom3 in linux using the latest ATI drivers.


I ported the code to Linux and I only a fog effect too.
Image
I don't drop straight to the bottom though, I sink slowly and can swim.
I'm testing a laptop which is Geforce 4600GO ( DX8.1 I think ). So obviously the dx9 effect won't appear, I was still expecting to see the reflections though as I know they can work on this chipset in doom3.
Here you can see a screenshot I took before using my basic water .mtr file for the fountain. http://homepages.nildram.co.uk/%7Edanteuk/euro/screenshots/lnx_gf4go1.jpg

I assume that before using the standard gamex86.so you should have had an error complaining about the missing class idWater.

What I do get is:
Code:
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
    0 purged from previous
  148 kept from previous
  411 new loaded
all images loaded in  20.1 seconds
----------------------------------------
-----------------------------------
28406 msec to load water
idRenderWorld::GenerateAllInteractions, msec = 0, staticAllocCount = 0.
interactionTable size: 44084 bytes
21 interaction take 2352 bytes
------------- Warnings ---------------
during water...
WARNING: material 'textures/inolen_water' had stage with no image
WARNING: Non-portable: path contains uppercase characters: base/dds/makeIntensity/lights
WARNING: Non-portable: path contains uppercase characters: water/dds/makeIntensity/lights
3 warnings



idiom@Posted: Wed Mar 02, 2005 1:20 am :
The reflection is rendered but only shown through the fresnel shader so if the shader doesn't work for your card you probably wouldn't get the reflection.



binaryc@Posted: Wed Mar 02, 2005 2:23 am :
You may want to add a section like this for those with lower-end video cards:
{
if ( fragmentPrograms == 0 )
blend blend
map _scratch
alpha 0.5
}



idiom@Posted: Wed Mar 02, 2005 2:44 am :
Well the code seems to be v1.0 fp/vp so it might not be the fresnel shader. Could it be the heathaze?



Gazzul@Posted: Wed Mar 02, 2005 9:17 am :
I don't kown if it's of any use.

I had problems to see the reflections too, so I just turned the quality in Doom3 from Low Quality to High Quality and after a vid_restart, I was able to see them...



Dante_uk@Posted: Wed Mar 02, 2005 9:19 am :
I know the heathaze won't work on my laptop chipset but in the water .mtr that I use it doesn't stop the reflection.


Code:
{
   noSelfShadow
   noshadows
//   translucent
   nonsolid
   water
   {
                vertexProgram           heatHazeWithMask.vfp
                vertexParm              0       time * 0.1 , time * 0.5*Parm3
                vertexParm              1       3
                fragmentProgram         heatHazeWithMask.vfp
                fragmentMap             0       _currentRender
                fragmentMap             1       textures/sfx/vp1.tga
                fragmentMap             2       textures/sfx/vp1_alpha.tga
   }

   { // Mirror effect
      mirrorRenderMap      512   256
      blend   blend

      red      0.3
      green   0.3
      blue   0.1
      alpha   0.7

      // these may not be necessary when I finish the code
      translate   0.5 , 0.5
      scale   0.5 , 0.5
   } // End Mirror effect


   //
   // first part of the crossfade
   //
   {
      if snapFive[ time / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled001, 4)
   }
   {
      if snapFive[ time + 1.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled003, 4)
   }
   {
      if snapFive[ time + 2.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled005, 4)
   }
   {
      if snapFive[ time + 3.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled007, 4)
   }
   {
      if snapFive[ time + 4.0 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled009, 4)
   }
   

   //
   // second part of the crossfade
   //
   {
      if snapFive[ time + 0.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled002, 4)
   }
   {
      if snapFive[ time + 1.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled004, 4)
   }
   {
      if snapFive[ time + 2.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled006, 4)
   }
   {
      if snapFive[ time + 3.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled008, 4)
   }
   {
      if snapFive[ time + 4.5 / 5 ]
      blend    bumpmap
      map   heightmap (textures/water_njm/untitled010, 4)
   }


   {
      blend      specularmap
      map      textures/water_njm/water_njm_s.tga
   }
   {
      blend      diffusemap
      map      textures/water_njm/water_njm.tga
   }
}



Dante_uk@Posted: Wed Mar 02, 2005 12:24 pm :
I've been looking the .mtr on a DX8 & DX9 cards and basically as in my post above nothing is drawn.

I've made a small change to .mtr and added one of my own, then I changed the test map slightly to have two tanks of water and a little more detail & light.
Image

This file contains it all ( INCLUDING gamex86.so for Linux !! ) NON DEBUG - *UPDATED* map to test 4 tanks of different water now.
http://homepages.nildram.co.uk/~danteuk/water.zip

I can't test what this looks like on DX9 level cards till I get home tonight so it would be interesting if someone could post a shot.



breakerfall@Posted: Wed Mar 02, 2005 4:59 pm :
My system:

AMD64 3000
1 GIG RAM
ATI 9700pro - latest linux drivers

The blue/green water (on the right in your shot) doesn't look so good. The actual surface ripples look like a 2d film just sitting on top of the water and the movement is very awkward, seemingly changing every half second or so. Doesn't look right. The darker water (left) looks much better ripple wise but the reflections still seem a little blocky. Also, a strange glitch occurs when viewing the darker water whilst hovering just over the green tank - looking over the diving wall. You see the stripes across the whole reflection. You also see the inside of the marines body whilst emerging from water.



Dante_uk@Posted: Wed Mar 02, 2005 5:33 pm :
Yeah the blue/green animation is a tacky hack.
I don't know much about ATI cards, does that card(& drivers) support DX9 level shaders?
The blue/green water should have the heathaze effect to make the surface move too.(as well as the jerky animation).

Both the reflections have the hollow model problem, I think something in the func_water code should be added (or in player.def ??? )so the player model isn't drawn for 1st person view when in or touching water.



iceheart@Posted: Wed Mar 02, 2005 5:45 pm :
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.



inolen@Posted: Wed Mar 02, 2005 7:58 pm :
iceheart wrote:
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.


Not really... I haven't worked on this for a while, but I think I just never figured out how the mirrorRenderMap got it's view. If someone finds out how, they can just suppress the local player model from it when in the water.



Mordenkainen@Posted: Wed Mar 02, 2005 8:22 pm :
inolen wrote:
iceheart wrote:
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.


Not really... I haven't worked on this for a while, but I think I just never figured out how the mirrorRenderMap got it's view. If someone finds out how, they can just suppress the local player model from it when in the water.


If at all possible, only supress backfaces?



inolen@Posted: Wed Mar 02, 2005 9:46 pm :
Mordenkainen wrote:
inolen wrote:
iceheart wrote:
I think the problem is with the mirrorRenderMap and inolen and idiom have been trying to fix this for a while.


Not really... I haven't worked on this for a while, but I think I just never figured out how the mirrorRenderMap got it's view. If someone finds out how, they can just suppress the local player model from it when in the water.


If at all possible, only supress backfaces?


Why?



Dante_uk@Posted: Thu Mar 03, 2005 1:30 am :
In the interest of experimenting I've extended the map to have 8 pools of water.

1 - The original water by inolen & idiom.
2 - A varation on the above.
3 - Material by me
4 - Material by me
5 - Mordenkainen - failed test by me
6 - Mordenkainen
7 - water07 / water07_surf ( have a go, please !! )
8 - water08 / water08_surf ( have a go, please !! )

This zip has all you need to run the map in Windows or Linux.(source code removed b'c not changed).
http://homepages.nildram.co.uk/~danteuk/water.zip

Image



Mordenkainen@Posted: Thu Mar 03, 2005 11:55 am :
inolen wrote:
Mordenkainen wrote:
If at all possible, only supress backfaces?


Why?


The problem is the player model intersecting with the reflection plane right? The reflection shows the inside of the model. If you can draw only front faces (as viewed from the reflection plane) then the visual artefact should disappear but you still have the player's reflection, right?

I was just thinking that completely removing the player model from the reflection when we step into the water is going to look awkward. That's probably why in HL2 we never see gordon's reflection, even when we're not touching the water surface.



Bauul@Posted: Thu Mar 03, 2005 3:16 pm :
Not seeing the player's reflection in water is so common in games it's pratically a given. Other stuff like that, e.g player shadows, have been excluded from games almost universally, so not including them in D3 isn't going to be noticed by anyone.

Then again, if you could actually see your reflection, that would be rather cool. For the mean time, just surpressing the player model when in the water I think will solve the immidate artifact problem, surpressing only the back faces is something to look at later.



iceheart@Posted: Thu Mar 03, 2005 3:29 pm :
I think it should be pretty obvious that you should see yourself in a reflective surface, anything else is just the devs taking the easy, cheap way out.



dolver@Posted: Sun Mar 06, 2005 5:31 pm :
i noticed with a func_water that when you sprint-jump into it it shows a splash decal and particle but when you walk on it it only shows the splash decal. this isnt as much of a problem though than the fact that when you shoot it it doesnt make a splash decal or particle. why is this? ive tried to fix it myself but i cant figure it out. could someone help?



radix2@Posted: Sun Mar 06, 2005 7:57 pm :
Dante_uk wrote:

1 - The original water by inolen & idiom.
2 - A varation on the above.
3 - Material by me
4 - Material by me
5 - Mordenkainen - failed test by me
6 - Mordenkainen
7 - water07 / water07_surf ( have a go, please !! )
8 - water08 / water08_surf ( have a go, please !! )


7 and 4 look the best to me, although neither seem to reflect. 5 is a pit of nodraw for me.



Dante_uk@Posted: Sun Mar 06, 2005 10:12 pm :
radix2 wrote:
Dante_uk wrote:

1 - The original water by inolen & idiom.
2 - A varation on the above.
3 - Material by me
4 - Material by me
5 - Mordenkainen - failed test by me
6 - Mordenkainen
7 - water07 / water07_surf ( have a go, please !! )
8 - water08 / water08_surf ( have a go, please !! )


7 and 4 look the best to me, although neither seem to reflect. 5 is a pit of nodraw for me.


What DX Level gfx card do you have?
Some of the effects being used as require a DX 9 level card.



inolen@Posted: Sun Mar 06, 2005 10:47 pm :
dolver wrote:
i noticed with a func_water that when you sprint-jump into it it shows a splash decal and particle but when you walk on it it only shows the splash decal. this isnt as much of a problem though than the fact that when you shoot it it doesnt make a splash decal or particle. why is this? ive tried to fix it myself but i cant figure it out. could someone help?


I talked about that in the readme.



radix2@Posted: Sun Mar 06, 2005 10:54 pm :
Dante_uk wrote:
What DX Level gfx card do you have?
Some of the effects being used as require a DX 9 level card.


Sorry, I should have posted those details orginally. Now I am not am home to check the minor revision, but I can tell you that it is DX9 capable.. I will edit this post with the proper information when I get home.



dolver@Posted: Mon Mar 07, 2005 4:39 am :
inolen wrote:
dolver wrote:
i noticed with a func_water that when you sprint-jump into it it shows a splash decal and particle but when you walk on it it only shows the splash decal. this isnt as much of a problem though than the fact that when you shoot it it doesnt make a splash decal or particle. why is this? ive tried to fix it myself but i cant figure it out. could someone help?


I talked about that in the readme.


oh sorry i didnt see that. any idea how to fix it or what file to modify? wheres that BulletWaterTrail function you mentioned

edit: nevermind i found the file



radix2@Posted: Wed Mar 09, 2005 10:45 am :
Dante_uk wrote:
What DX Level gfx card do you have?
Some of the effects being used as require a DX 9 level card.


Damn - was running old Cat version (4.8 with Doom3 patch). I have now updated to 5.2 and these are my observations. System spec in signature..

1 - The original water by inolen & idiom.
No reflection. Artifacts around crate (maybe the water surface is too close to the crate). Water is too clear

2 - A varation on the above.
No drawing of water surface, but still an odd reflection from flashight

3 - Material by Dante_uk
ripples "stutter" or "lag". Reflection of crate, lighthanger placeholders and an image of player. Good apart from lag, although too clear.

4 - Material by Dante_uk
Good. Nice ripples and flareout from flashlight. Nice distortion of drum from the right of the crate whilst facing the wall

5 - Mordenkainen - failed test by me
No draw aside from weird reflection of flashlight

6 - Mordenkainen
Good - interesting diffraction bands but no reflection. Too clear

7 - water07 / water07_surf ( have a go, please !! )
no reflection. good ripples and distortion. Nice murkiness

8 - water08 / water08_surf ( have a go, please !! )
no reflection. Good ripples and distortion. Too clear.


One thing that I notice is that if you are on the right side of the crate then the drum is distorted/displaced (which is correct), but on the left side of the crate, you just get a slight ripple effect.

I like aspects of 3 for reflections; 7 for murkiness, ripples and distortion and 4 for the flashlight glare effect. These might be exclusionary though... :D



mikebart@Posted: Mon Mar 28, 2005 2:19 am :
Im having a problem getting the water reflection to run in game but it runs fine in the editor, im using the texture: njm_water_reflect
could it be a graphics card issue? if so why does it work in editor mode?

check out this post if you want to see screenshots: http://www.doom3world.org/phpbb2/viewtopic.php?t=9589

thanks, nice work by the way :)



Dante_uk@Posted: Tue Mar 29, 2005 12:37 pm :
When you run the game are you running fullscreen?
if so can you try in windowed mode, just to see that's where the problem is.

I've seen things before that look different in the editor than in game, not sure really why that would be the case.

I've mailed Brian at id about this:
Quote:
There seems to be odd little differences in the rendered image in the editor from the in-game image.

Specifically problems with reflections that look fine in editor but don’t appear in game.

Could you post an explanation/list of differences in the rendering from the Editor preview window and the normal game rendering (plus any between running in windowed mode vs fullscreen).


With a little luck we may get an answer.



mikebart@Posted: Tue Mar 29, 2005 9:15 pm :
thanks dante, its pretty much doing the same thing in window mode as in fullscreen mode but sometimes with a different image, its a realy random occurance.
I had the texture reflecting properly in the water test map, I even copied and pasted the func_water with that texture into my map after several failed attempts but I still couldnt get it to work, I really dont think its a performance issue but heres my specs anyway;

AMD Athlon 2400 512 with Gforce 4 ti 4200 with AGP 8x

thanks again :)



mikebart@Posted: Wed Apr 06, 2005 9:07 pm :
Have you heard back from brian?



Dante_uk@Posted: Wed Apr 06, 2005 9:20 pm :
mikebart wrote:
Have you heard back from brian?


I'm afraid not, I guess he's a little busy with ROE just coming out, hopefully putting together the SDK for 1.2/3.



Gmz1013@Posted: Wed Apr 06, 2005 10:18 pm :
is it soposed to be soild or liquid its soild for me... Help please...



Dante_uk@Posted: Wed Apr 06, 2005 10:57 pm :
Gmz1013 wrote:
is it soposed to be soild or liquid its soild for me... Help please...


To what are you refering?

If you are trying to use func_water then it should not be solid, this is a change in the SDK, are you using the .dll from my water.zip?
Are you testing my test map or one of your own?
Do you have any errors appear in the console?

Try my newest test map & dll, just unzip into doom3 folder it will create a folder called GravityMod, in there should be a run.bat, double click it. This should load my test map, turn to your right and you should see a door with a sign next to it saying Water Tests.
http://homepages.nildram.co.uk/~danteuk/GravityMod.zip



ReubenDSala@Posted: Wed Apr 06, 2005 11:28 pm :
I dont think that works with the new patch (1.3)



Fitzsimmons@Posted: Mon Apr 25, 2005 9:25 pm :
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)



Dante_uk@Posted: Tue Apr 26, 2005 10:04 am :
ReubenDSala wrote:
I dont think that works with the new patch (1.3)


Nothing works with 1.3 because it's not out yet, nothing works with 1.2 yet because the SDK for it isn't out.

I believe 1.3 will be released sometime soon and shortly after the SDK for it.

Then we all have the fun task of merging all our code changes into it.

Fitzsimmons wrote:
I'm having a render problem on linux

Without information about your video chipset I can't really help.
I guess from the shot it's a DX 9 level chipset.

Some of the those pools don't renderer correctly of some hardware.
I have access to 3 machines with doom3 on at 3 different DX levels: 7,8,9
All are Nvidia cards though.
The purpose of that test map was to try lots of different method for making water, then test it on all three chipsets and find one method that looks good on all three.



breakerfall@Posted: Sat Apr 30, 2005 3:09 pm :
Fitzsimmons wrote:
I'm having a render problem on linux:

http://fitzsimmons.ca/images/shot00002-downscale.png

This is the only pool that this happens on. I also have the one pool that doesn't render problem.

(OT: Could someone please tell me how to post those nifty thumbnails of images?)


This is very similar to what I posted a page or two back. Same thing, under linux, ATI drivers etc.



Fitzsimmons@Posted: Sat Apr 30, 2005 5:18 pm :
I have an nVidia card, if that makes any difference.



MichaelZee@Posted: Tue Aug 16, 2005 6:01 am :
I load up the water mod and then type in "map water"

Your map loads up but there is no water inside the pool. Any ideas?



Sebazzz@Posted: Mon Nov 14, 2005 1:01 am :
You're not the only one.

nVidia Geforce FX 5700 LE
Amd athlon XP 2600+
Windows XP Home

Doom 3 with 1.3 patch



mth@Posted: Thu Dec 01, 2005 10:11 am :
same thing. only fog in the pit, without any water. Any ideas?



der_coach@Posted: Thu May 11, 2006 7:37 am :
lo.

we merged inolens code in the sdk1.3-vanilla version.

:arrow:http://themir.de/public/doom3/doom3water13.rar

you can find the changes searching for: // BEGIN WATER orig. by inolen -- v1.3 by jobst

--
jobst

http://www.themir.de



6th Venom@Posted: Thu May 11, 2006 8:18 am :
Thanks for releasing that! I think it's very helpfull for non-coders! :D

For the "black-draw" problem, i had this the first timei ran pbmax's water, cause i was not in high details' settings, now all is ok. i don't know why... maybe medium & low disable heathazes and/or mirrorrenders. :wink:



ARON2431@Posted: Fri Jun 09, 2006 1:38 am :
I'm getting the same issue. I load up the mod and the map, and the only thing I see is fog



Bauul@Posted: Sun Jun 11, 2006 6:05 pm :
Make sure high detail is enabled in the options menu, the water effects are classed by the game as high detail.



coldkodiak@Posted: Mon Jan 29, 2007 8:18 am :
There are a lot of dead links in this thread.

I was wondering if anyone has this water shader current?



Dj Dooms Day@Posted: Mon Jan 29, 2007 8:23 am :
Woah, now theres a blast from the past. Hiya Ck, how are ya? Back on the D3 engine eh? Anyway, kind of off-topic there. But you might want to message Dante_uk. He'd have the latest build i'd say.