Irrlicht Water Question
-
- Posts: 12
- Joined: Sun Jul 11, 2004 7:55 pm
- Location: Tampa
- Contact:
Irrlicht Water Question
I have used addWaterSurfaceSceneNode on several different kinds of meshes including addHillPlaneMesh and addTerrainMesh all with favorable results.
I have examined the special effects demo, kinghtofflight's terrainv002, and thesmileman's summer fun winner, as well as my own results and I have come to realize that addWaterSurfaceSceneNode SEEMS to only create a "skin" of water over the mesh. Once you go "under" the water...its empty.
IS there a way within Irrlicht to create water volume? To actually be within the water?
I have examined the special effects demo, kinghtofflight's terrainv002, and thesmileman's summer fun winner, as well as my own results and I have come to realize that addWaterSurfaceSceneNode SEEMS to only create a "skin" of water over the mesh. Once you go "under" the water...its empty.
IS there a way within Irrlicht to create water volume? To actually be within the water?
-
- Posts: 12
- Joined: Sun Jul 11, 2004 7:55 pm
- Location: Tampa
- Contact:
hmm
Yeah I was thinking, even if I made a cube and applied waterscenenode to it, it would still be empty inside. Does anybody know how an underwater effect is made usually? It is particle system or something? thanks
-
- Posts: 360
- Joined: Tue Feb 10, 2004 2:20 am
- Location: Lubbock, TX
Once simple way to do it would be create a box with blue textures with the normals inverted so that you can not see it from the outside but once you go inside everything will be blue. If you made the texture somewhat transparent it would give the impression of being underwater(I think).
As a side note: does anyone know if you can have a two sided texture in Irrlicht. This may be a RTFM question but I dont really care.
As a side note: does anyone know if you can have a two sided texture in Irrlicht. This may be a RTFM question but I dont really care.
Okay, this is just a theory (since I am away from my development system), but if you created your water box and turned off back face culling, would you then see water from both inside and out?
I guess that's the easiest way to make 2-faced polygons - only you get the same texture (but seen from the other side) on both faces. As arras says, if you want 2 different textures, you'd have to have 2 polygons.
I guess that's the easiest way to make 2-faced polygons - only you get the same texture (but seen from the other side) on both faces. As arras says, if you want 2 different textures, you'd have to have 2 polygons.
-
- Posts: 12
- Joined: Sun Jul 11, 2004 7:55 pm
- Location: Tampa
- Contact:
The simplest thing to do would be to make a square (could load from a .x file for example or just code it).
Then make it a child of the camera node. Translate it forward a bit and make sure it is facing back towards the camera. Then make it blue and make it transparent.
Also make sure it is large enough to cover the entire screen and make sure it is close enough to be with the player's clip volume so world polys don't get between it and the camera.
This way everything will be seen through the transparent square
Then make it a child of the camera node. Translate it forward a bit and make sure it is facing back towards the camera. Then make it blue and make it transparent.
Also make sure it is large enough to cover the entire screen and make sure it is close enough to be with the player's clip volume so world polys don't get between it and the camera.
This way everything will be seen through the transparent square
-= Want your C code to control real life robots? www.users.on.net/~symes =-
Particles are one part of creating an under water look, having blue fog applied to the water scene node should also give the under water look. There are also some shader algorithms around that filter what the camera sees to give it the blurred, distorted look of being under water. Having bubbles come up in front of the camera from a particle emmiter and having gentle blue fog applied should give a fairly reasonable effect.
-
- Posts: 12
- Joined: Sun Jul 11, 2004 7:55 pm
- Location: Tampa
- Contact:
ok
I'm goint to try and use a numer of methods to create an underwater effect. The first thing I am working out is underwater caustics animation which i have working fairly well. Gonna try this with fog I think.
Here's screen shot of the caustics, though you can't see it animated. Just imagine a pool bottom.
http://www.bogwraith.com/images/underwatercaustics.jpg
Here's screen shot of the caustics, though you can't see it animated. Just imagine a pool bottom.
http://www.bogwraith.com/images/underwatercaustics.jpg
I would use the fog approach for a large body of water and especially if it is outdoors (naturalt lighting).
If it is just a small body of water with lights under the water line then I'd just tint the scene blue with an altered light or child box of the camera.
BTW with the caustics, does that mean you'll be creating a node for Irrlicht that handles DX9/Cg/GLSL shaders?
Once I've got throught the Orange Book I'll be looking to do this
If it is just a small body of water with lights under the water line then I'd just tint the scene blue with an altered light or child box of the camera.
BTW with the caustics, does that mean you'll be creating a node for Irrlicht that handles DX9/Cg/GLSL shaders?
Once I've got throught the Orange Book I'll be looking to do this
-= Want your C code to control real life robots? www.users.on.net/~symes =-
in rtcw there was a map called tank that had the coolest water I've ever seen in a game.
they used layers of foggy looking mesh to look like water depths and it was foggier underwater.
might be a good idea to get GTK and download the TANK map for return to castle wolfenstien I think you might be interested to see how they did it.
o wait I just realised you can't see that unless you decompile the map and that would remove the textures so...I'm downloading it now and I'll post some screenshots after I install rtcw again and load it up.
they used layers of foggy looking mesh to look like water depths and it was foggier underwater.
might be a good idea to get GTK and download the TANK map for return to castle wolfenstien I think you might be interested to see how they did it.
o wait I just realised you can't see that unless you decompile the map and that would remove the textures so...I'm downloading it now and I'll post some screenshots after I install rtcw again and load it up.