I’ve been following along Dylan Neills excellent tutorial on creating a large scale ocean in Blender - which essentially bakes out a couple of ocean modifiers (one for swell, one for detail), and then applies the baked maps as a vector displacement via a shader. Which is working well! Below is the shader, where the two baked maps are being mixed together:
My challenge now is getting the ocean to loop. I’ve been following a tutorial where two Ocean modifiers are stacked on top of each other - where the first has a scale value ramping down to 0, and the second has a scale starting at 0 and ramping upward (and the second modifier having an offset time value, too.) This is working nicely as live deformers.
My question is how to effectively bake down each ocean modifier - and blend them within the shader so that the baked maps loop correctly on the large scale ocean. I attempted to simply use a Mix Color node to blend them together, but I’m unfortunately not getting the looping behavior of the live deformers here. I suspect it may be the way I’m blending the maps together in the shader that’s at fault, as it’s not emulating the way that the stacked ocean modifiers are behaving? (i.e one ocean modifier being set to generate, and the other set to displace.)
Any breadcrumbs would be super appreciated. Thanks!
In fact, you can plug any wire from the material that way to see what it contains. Does the texture itself contain the problem if you observe it directly? If it does, the texture is wrong to begin with and the material setup isn’t at fault.
I understand what you mean by looping. I was having the same issue as you, and I believe I have found a way around it. Worth noting I’m a complete Blender noob so there may be an easier way but this is working for me.
Changes
Instead of one mesh with two modifiers for the looping ocean, create two separate meshes with one modifier each (and Generate mode):
Do not animate the scale of either modifier - just the time (same way as you had it with both modifiers on the same mesh). Leave your scale hardset as whatever max value you had.
Bake both mesh modifiers in different directories (e.g. ocean_ramp_up and ocean_ramp_down).
Material nodes
Here is what my ocean swell displacement looks like:
Basically, I duplicated the displacement setup that Dylan creates in their tutorial (I’m not showing the other sequences he creates afterwards - just the first ocean swell one). The two sequences in my image are the ocean_ramp_up and ocean_ramp_down from above, and instead of animating the scale of the modifiers, I’m animating the scale of the vector displacement (from 0 to 1 and 1 to 0 respectively), then mixing them at 50/50.