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

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.

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

Postby nuke32 » Mon Jul 03, 2017 9:12 pm

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? :(

gta5-foam.jpg
Any ideas?
Xubuntu 14.04 | Eclipse CDT/ADT | NDK r10e
User avatar
nuke32
Gnoblar
 
Posts: 12
Kudos: 0
Joined: 01 Oct 2014
Location: East Europe

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

Postby frostbyte » Fri Jul 21, 2017 4:00 pm

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
For this message the author frostbyte has received 64K kudos

For this message the author frostbyte has received kudos
frostbyte
Gnoll
 
Posts: 689
Kudos: 43
Joined: 31 May 2013


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests