I’m trying my hand at creating a proper shoreline material, I have no experience with the math behind FFT simulations and et cetera, I’m going for something a lot more simple, yet something no one else has managed to do, and release.
The man vanished from the forums around 3-4 months ago, and hasn’t been seen since, likely because the idea is dropped all together, and his work wasn’t documented or uploaded to github, to my knowledge.
Starting off, I’d like to know how he managed to ‘spawn’ waves close to the shore it’s clearly a material method, as there’s no blueprints going on.
I’m /NOT/ trying to create edge foam, or anything similar, I’m creating the waves that break onto the shore, and roll back out to sea, no one has done this yet, and fully released it. The benefit of this thread is, the work is documented, and released even if unfinished, so that everyone else can continue the project if I vanish / or someone else vanishes after its taken over.
I hope atleast, that it will get enough attention to become that popular, but I’m not sure how interested people are in having properly rendered shorelines.
The only method I can think of, for ‘spawning’ waves at the shore, is using a texture panner, and maybe something to do with world position, to have the texture pan only at a certain place.
Panners are definitely used, as he mentions moving and masking textures, as his first method.
I’m sure someone out there has the interest to get this thing moving, I have the interest, but lack the knowledge, most of the work I do with materials is hit or miss. Learning only by experimentation.
As of 4.12 or 4.13, landscapes generate a distance field that you can just query from the material to determine how close you are to the shore. This should let you add in a panner node in tandem with the known distance to accomplish what you’re going for.
As I said before, I’m very limited in my understanding of materials and finding values. Could you please elaborate on how I’ll find the distance field value? Plug a distance field node into WPO?
So from what I gather from your post, you’re telling me to go about masking the area, the same way you would when trying to create edge-foam.
With that step done, what’s next? I can’t just tag a texture in and hook it up to a panner, that texture would play over the entire area, what I want it to do is move like in his video.
Unless there’s a way to now split up that mask into several different parts, where the waves and foam move into shore, I’m stumped.
What I’m trying to figure out atm is how to displace only the masked area of my ocean, I want 0 displacement on the outside, or atleast a hell of a lot less, I can’t figure out how to make my displacement follow the distancetonearest node mask. Please help?
Perhaps using flow maps based on the distance fields for a dynamic solution to make the stuff move towards/away from the shore. I’m terrible at the stuff though, still trying to figure things out myself.
I understand the flowmap is a mask, but how is it possible to see where the specific places are waves will form ( aka, near the shore?) And how do I tell those specific places to use a certain displacement texture?
I thought you were looking for how to do the displacement in the right direction, which is precisely what that article answers. Throw a Sine wave in what you’ve got and you’re nearly there. Also you appear to be missing a clamp.
I am, but the displacement sequence isn’t just tossed in there with a mask.
I’m following in the footsteps of a guy called Fewks, he made one of the best shorelines I’ve ever seen in Ue4 and Cry. So the thing about his surface, is that there wasn’t any complicated math in it whatsoever, until he added it. Which means, there’s another way about this.
So what I want to know specifically, is how I get my waves to spawn in a similar, or exact same sequence as his? One after the other, breaking beside eachother, never one wave behind another, like gerstners for example.
Watch the video example, and notice the horizontal spacing between the waves. How?
ALSO. What am I not explaining properly?
The main thing is, the guy had a months knowledge of UE4, mostly in the material shader side of things… I have much more and I can’t figure out how to spawn waves very far spaced out, they always end up covering the entire mesh, and they’re not spaced.
The idea I had was using the distancefield for masking, ie telling it where it should appear and where not.
But after reading this guys comments, his waves were only traveling in a single direction and did not rotate around objects like dynamic flowmaps could supposedly do.
I want to achieve his results the same way he did, and then work from there on wards, so a single direction for the waves is fine for now.
My main focus is getting a single wave that takes up a tiny portion of the screen to form BY its self, within a mask around the shore. This project might just die, because no matter how hard I tried the past 3-4 days, I learned nothing and achieved nothing.
First off, I REALLY appreciate you took time out of your daily life which is probably very busy to do this for me, this is EXACTLY what I was looking for.
Second, I really appreciate not only have you helped me, but you’ve basically shown me he how to do it myself.
Third, the only thing I need to know now is how to split them up, and offset them in the shape of the shore, and have them become flatter as they come over the shore.
The next thing I wanna know is, does anyone know how to tell foam to spawn and follow that displacement? The ocean project did it, but I’m not sure where exactly in the material node it’s referenced.