This is what i want to createhttps://youtube.com/watch?v=Kn5G1yA0F8o
And i don’t mean i want to recreate Halo 3’s water, i want to create water that acts somewhat like that. Small and realistic looking waves.
I can’t find ANY tutorials anywhere, does anybody know what the technique is to create water like that?
I don’t mean to move one texture, but to play bunch of displacement textures repeatedly. If my simulation would go 30fps in blender, and i bake every frame on a displacement texture, is it possible to play it back as a tessellation in unreal engine?
You could use the flip book material function to sort of play a movie from you’re textures if that is what you want. But it is more performance friendly to just render 3-6 displacement textures and move those around using a panner or similar. I believe that in Assassins Creed: Black Flag they used 4 pre-computed wave height maps. There is also a material function somewhere in the engine called something like 4waychaos which is an easy way to move a single texture around in four different directions. The chaos function would be useful to for example move one detail texture around on the surface easily.
If you want to get really advanced there is this paper written by Jerry Tessendorf that explains how you could do statistical ocean simulations using FFTs (this is what the used in AC:BF as a mentioned in the previous post). This article also touches on how you could do the actual shading of the surface, like inscattering and attenuation. Link: http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf.
Thanks guys! I managed to get a pretty cool result with only one displacement map and normal map baked in blender, and it looks like this with a freeze frame:
The wave animation looks very cool in my opinion. But I’m still struggling to get a nice, shiny oceanish shader for it. For now the material looks very bad. For some reason, i can’t get a translucent shader look shiny. Also if i use two sided material, it looks REALLY BUGGY.
In version 4.8 there will be SSR for translucency, but as it stands currently it is really difficult to get the right look. I have tested 4.8 out (latest build from GitHub) and the SSR adds a lot to the scene, but it is not the full solution. Make sure you have a Skylight in your scene to get some specular highlights, but full reflection is not available at this time.
I am also working on an ocean shader, it uses Gerstner waves along with some extra displacement maps to get a fairly realistic looking ocean surface. It has controls for adjusting just about anything through the blueprint, still needs some more work but it’s getting better.
One issue you may come across is when the camera is right down at the surface you will notice some pretty extreme artifacting issues where a wave is being rendered behind another wave, causing black or invisible sections of the surface to appear. To fix this you will need to render 2 separate meshes, one with your translucent material and the another new opaque material with the displacement only connected. Then set the opaque material/mesh so “Render in main pass” is Off, and turn on “Render Custom Depth”. So all that mesh is doing is providing data that can be used through a SceneTexture:CustomDepth node to prevent any translucent sorting issues that come up.
Here is the thread I created due to the artifacts appearing on the waves, it was a while ago but the info is still relevant, TheBeej’s answer has all the info:
Feel free to download my project (link below) from the other thread to see how I got around that part, or if you need more info (which is likely, this isn’t very straightforward ;)) let me know.
Thanks DotCam i will check them out once i have time! Having really busy week now…
I got an idea from your post. I managed to get really good looking ocean shader with opaque material, but it look unrealistic because its not a see-through. Is it possible to mix two shaders in UE4, opaque and translucent materials together? This way it would be possible to get a great shiny look and also see the bottom. What i mean is, is a Blender like “mix shader”. I know there is no mix shader where i could mix diffuse and glossy materials together. Still is it possible to use 2 meshes with one being opaque and other being translucent, and show 50/50 of both of them?