Download

Displacement within mask (Diagram)

I’m trying to bring back a dead project. I want to form waves around the landscape’s shore, but I can’t do it, no matter how I go about it, the displacement happens outside and inside the mask, I want displacement just within the mask.

So where you see the white color, I want individual waves crashing in, but not outside the white area, black is regular ocean, white is crashing individual waves.

I’m STUMPED. NO IDEA how to do it.

Are you sure your mask is actually going all the way to black? Does the mask go into negatives? If you’re multiplying a displacement value by zero/black it should just not displace.

Here’s the material setup for the mask. I’m not sure what to do at this point, all the ocean / beach threads are inactive, I barely get thread responses, and when I do, they’re fleeting and aren’t around for the response. The entire community on that side just seems dead in the water since the last few months.

This happens whenever I put the displacement through the mask.

ac844cfd82419abd7d7697f2a7548aebc0220fa6.jpeg

Any ideas?

Surely someone knows how to mask an area for displacement…

THE ONLY WAY I see this happening now is if I use two planes that intersect with eachother, similar to how the ocean community project does.
The outter plane is for the open ocean, has large waves that aren’t breaking, a wild random ocean.

The inner plane is less random, less frequent, more seperated shore waves. I’ll worry about how to blend them together later, but for now I just want to know how I can have a certain displacement map occur in only one place, just for starters.

For instance, I want a trochidal wave close to shore, just one, but I don’t want it to encompass the entire mesh, just a tiny part of it.

Daelus makes a good point. Clamp.

Looking at the material, I’d guess there’s some weirdness coming out of the distance to nearest surface function. If you plug in numbers outside of the 0-1 range into a lerp it will overdrive it, so to start with I’d clamp the alpha value before you feed it into the lerp. Beyond that, I could suggest manually creating a mask if the level is pretty static. You could use vertex painting to map out areas and feed that into the material.

Daelus is right that you will want to clamp the value. You may also be running into limits of the max distance field trace distance. You can try going into the world properties and finding the setting “Default Max DistanceField Occlusion Distance” and increasing it.

Generally, the global distance fields can have blocky type artifacts as they transition to full black in my testing so you may be better off capturing the terrain heightmap and using that instead.