Water Demo - Now OpenGL and DX supported

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Water Demo - Now OpenGL and DX supported

Post by BlindSide »

Hey I made a demo for a water shader. It is slightly based off the old one by omaremad, DeusXL and sio2. But I added a few things like:

- Fresnel.
- Bumpmapping.
- Sun/Specular effect.
- Underwater caustics.
- Shallow water colour (Water shader reads from heightmap file).

Image

Image

Download: http://irrlichtirc.g0dsoft.com/BlindSide/WaterDemo.zip
NOTE: This new version includes both DX and OpenGL, newer NVidia cards experiencing trouble with OpenGL version should try Direct3D9.

PS: It would be cool if you can test with other (129x129) heightmap files and see what kinda of colouring effects there are in the water from this.

Cheers

- BlindSide
Last edited by BlindSide on Thu Nov 08, 2007 9:46 am, edited 3 times in total.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

My current computer can't run it cause of my radeon 9200 but the screenshots looks great. Maybe you can post some more?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi Blindside!

The output seem to have problems here. The framerate is also very low (around 70 FPS) (Probably due to the errors rendering this.)

I see only the underwater texture and "some beach". The main water texture is not displayed.

Got this from the console:

Code: Select all

Irrlicht Engine version 1.4beta
Microsoft Windows XP Professional Service Pack 2 (Build 2600)
Using renderer: OpenGL 2.1.1
GeForce 7600 GS/AGP/SSE/3DNOW!: NVIDIA Corporation
OpenGL driver version is 1.2 or better.
GLSL version: 1.3
Loaded texture: irrlicht2_bk.jpg
Loaded texture: irrlicht2_ft.jpg
Loaded texture: irrlicht2_rt.jpg
Loaded texture: irrlicht2_lf.jpg
Loaded texture: irrlicht2_dn.jpg
Loaded texture: irrlicht2_up.jpg
Generated terrain data (129x129) in 0.0190 seconds
Loaded texture: terrain.jpg
Loaded texture: detailmap.jpg
Loaded texture: seafloor.jpg
GLSL shader program failed to link
Vertex info
-----------
(12) : warning C7011: implicit cast from "int" to "float"
(14) : warning C7011: implicit cast from "int" to "float"
(14) : warning C7011: implicit cast from "int" to "float"
(15) : warning C7011: implicit cast from "int" to "float"
(15) : warning C7011: implicit cast from "int" to "float"
(7) : error C5108: unknown semantics "TEX5.XY" specified for "TexCoord"

Fragment info
-------------
(1) : warning C7011: implicit cast from "int" to "float"
(1) : warning C7011: implicit cast from "int" to "cfloat"
(2) : warning C7011: implicit cast from "int" to "float"
(2) : warning C7011: implicit cast from "int" to "cfloat"
(3) : warning C7011: implicit cast from "int" to "float"
(3) : warning C7011: implicit cast from "int" to "cfloat"
(4) : warning C7011: implicit cast from "int" to "float"
(4) : warning C7011: implicit cast from "int" to "cfloat"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(5) : warning C7011: implicit cast from "int" to "float"
(3) : warning C7504: OpenGL does not allow writing to input variable 'TexCoord'
(4) : warning C7504: OpenGL does not allow writing to input variable 'TexCoord'

Loaded texture: water2Normal.png
Loaded texture: terrain.bmp
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Is this the water shader you were talking about on the channel. ;)

Does it use clipping planes? And also, just curious, are you going to try implementing the ability to go under water?
TheQuestion = 2B || !2B
master123467
Posts: 60
Joined: Mon Jan 02, 2006 6:03 pm
Contact:

Post by master123467 »

Hmm well it wont work on my 256mb Nvidia FX5200
Image
DGENXP
Posts: 124
Joined: Tue Dec 27, 2005 2:49 am
Contact:

Re. WOW

Post by DGENXP »

Hi

Works Fine on my machine - no problem

I must say, this is quite a shader you have here. A little bit of constructive critisism though, maybe you could make it a little more wavey as i think this would make it look great.. But what do i know I could never make something like this due to my lack of understanding on Pixel shaders

really good m8 keep it up

BTW will you be releasing the code for this i would much like to study it closer - For my own understanding really.

Spec:

AMD ATHLON 64 DUAL CORE 4200+
Geforce 7600GS
1024MB DDRII Ram
500GB HDD
WINXP HOME
Someone once said A Jack of all trades is a master of none.

Join the Community at the RB3D Forums:

http://www.rpbuilder.org/forum
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

*Halifax's question answered. O.O

That underwater water :P looks so awesome! :)

I don't intend any disrespect. But do you intend on making this look more realistic like Realistic Water Scene Node.
TheQuestion = 2B || !2B
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Yeah I am always improving it, I have only just started, and I will fix all the bugs, sorry about those. Source code will come once all bugs are fixed. I was using clipping planes until I realised they dont work on objects that have shaders applied to them, so I just faked em in the shader.

PS: Thank you for posting error messages!, christianclavet and master123467, this will help me greatly.

UPDATE: Ive fixed ATI errors (I hope.), same download link.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

master123467 wrote:Hmm well it wont work on my 256mb Nvidia FX5200
Image
Same card with yours...
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

All I can see is warnings, can you please paste the full error output so I can see the errors and such? Thanks
EDIT: Oh wait, is it the same thing as christian's?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

I'm getting the same result as Virion and christianclavet :(
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Blindside.

Yes, I think it's the same. I had the same output on my screen.

I've updated all my drivers and DirectX. My computer can play the Crysis demo without any glitches.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Very nice, very nice. Now it compiles with no errors or anything on my ATI Raedon XPRESS 200M. I also saw no artifacts after looking at it from every angle. The only thing that sucks is it takes a some time for the refections to update compared to the terrain, so they look offset when I move the camera. But that is because my graphics card sucks, and only runs it at 9 FPS. :P
TheQuestion = 2B || !2B
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Post by Virion »

BlindSide wrote:All I can see is warnings, can you please paste the full error output so I can see the errors and such? Thanks
EDIT: Oh wait, is it the same thing as christian's?
Yes, same error with him. Is it because our cards do not support the features?
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

I'm not sure, I thought I had fixed it earlier (When I fixed the ATI errors.). You do not have the same cards but you do have the same drivers. The shader compiler is part of the drivers not the card itself. If you can post me the driver version I will update to this version and try to fix it on my Nvidia card.

EDIT: Actually I will just use the latest drivers because thats what christian is using.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Post Reply