Am wondering how to create water. Not just a flat plane simulating waves but the mesh needs to be deformed. For my scene I need ships to interact with the waves.
Have looked around the internet but only found 'Neat and awesome water'. One is with manipulating the mesh and the other is using a shader.
Anyone how can help me by pointing out where to start, which type I should use and more over why that one? I'll figure out myself how to do it, just need some help in which one. My first thought is using a shader, if so, please point me in the direction I should be heading.
r,
Water, shader or mesh manipulation?
-
- Posts: 28
- Joined: Mon Mar 27, 2017 7:29 am
Water, shader or mesh manipulation?
For my end result I am working on:
- Volume Voxel System
- Simple light weight physics engine
- Volume Voxel System
- Simple light weight physics engine
Re: Water, shader or mesh manipulation?
If you need the ship to collide against the waves I would use mesh manipulation. You might also have to write your own ITriangleSelector for that as I think updating triangleselectors for static-meshes still is on my todo-list. Sorry about that, but it's not too hard - just have to create triangles for the mesh on cpu and return those (and for speed optimization this is likely also one of those cases where you would put your triangles in a gridwhich Irrlicht doesn't support yet anyway).
You might add some shader-effect on top of that (to get nice white on top and dark blue on bottom of waves for example).
And... I'm just guessing... I haven't coded an ocean yet.
You might add some shader-effect on top of that (to get nice white on top and dark blue on bottom of waves for example).
And... I'm just guessing... I haven't coded an ocean yet.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 386
- Joined: Sun May 11, 2014 12:13 am
Re: Water, shader or mesh manipulation?
I've never done this so I'm not even sure this method is possible but:
Could you make an animated mesh scene node that does wave actions using bones, set the material to transparent, and add collision from the Irrlicht tutorials?
Add collision such as have a boat upper-half with collision, then a boat bottom-half without collision.
Could you make an animated mesh scene node that does wave actions using bones, set the material to transparent, and add collision from the Irrlicht tutorials?
Add collision such as have a boat upper-half with collision, then a boat bottom-half without collision.