Page 1 of 1

Water foam trace like in GTA5 or SILENT HUNTER 5. How?

Posted: Mon Jul 03, 2017 9:12 pm
by nuke
For example we have water like HYDRAX.
How to make a trace of foam like in GTA5 and SILENT HUNTER 5?

I tried to realize this by directing horizontally-lying particles below the Hydrax water mesh, but the result is terrible. :(
I would like it to be beautiful like in GTA5 or SH5.
The foam in Hydrax is present too and perfectly realized, but it is evenly distributed throughout the all water mesh, and is drawn as one of the textures on the Hydrax water mesh.
But it is not localized, it is everywhere.
How to localize the foam so that it is drawn where the player boat/ship is?
Again, the option with individual foam particles under the water, which I realized, is terrible. :(
How the foam is implemented in GTA5 and SH5? :(
Any ideas?
Any ideas?

Re: Water foam trace like in GTA5 or SILENT HUNTER 5. How?

Posted: Fri Jul 21, 2017 4:00 pm
by frostbyte
impressive foam...i don't think its particles...sharing my ideas:
1) i guess you can tweak hydrax shaders to do what you please in order to restrict foam area and make
it rise the above surface, this still won't give you the effect of foam-trail, which bring me to 2...
2) in ogre samples( 1.x sampleBrowser ) there is a demo with water trail( i think it the "water" demo )
maybe you can tweak its shader to create foam-trails, by integrating the foam shader code from hydrax into the "water" demo-shader and leave hydrax as it is, or go the other way around and integrate the water-trail code from the demo into hydrax

my recommendation is that since hydrax is a bit complex you better start by looking at ogre-water-trail demo( easier code ) and start tweaking it to look like hydrax foam
after you see nice results and get some confidence in your foam trails, intergrate the foam-trails back into hydrax in order for it to move with hydrax waves

3) search the web/shadertoy for good looking opengl/directx foam shaders/demos and port them to ogre
How the foam is implemented in GTA5 and SH5?
no idea...but it reminds me a bit of some procedural snow/ice terrain shaders i saw once on shader-toy....
anyway from the foam light/shade it looks to me like the foam is integrated into the geometry and have some complex light calculations ( its gta-5 after all... ) it doesn't look like a fake texturing trick

edit: i see from hydrax wiki page that it support decals for use in stuff like water-vegetation and ship-trail and also have a demo for it( couldn't find it ) http://www.ogre3d.org/addonforums/viewtopic.php?t=8540

Re: Water foam trace like in GTA5 or SILENT HUNTER 5. How?

Posted: Fri Sep 15, 2017 10:41 pm
by nuke
Thank you for the answer! :D