2
$\begingroup$

I would like to apply the ocean modifier in a non-uniform way. I basically want the edges of the are o the ocean to be flat and gradually increase in height towards the center of the tile. Could you give me some tips how to achieve this? Thanks!

$\endgroup$
2
  • $\begingroup$ Something like this? $\endgroup$
    – Blunder
    Commented Dec 14, 2022 at 2:24
  • $\begingroup$ yes, pretty much..! $\endgroup$ Commented Dec 14, 2022 at 2:25

2 Answers 2

2
$\begingroup$

you can use this node setup:

enter image description here

to get this:

enter image description here

Basically i just lay a grid "under" the ocean modifier and mix the grid vectors with the ocean vertex positions.

Of course you could use some cleverer math than i did to blend the value. I just used length (i prerequisite the your ocean modifier has the middle in 0,0,0 - but of course you could use a vector distance node from whatever point you want instead of length) to determine some mix factor for the both positions.

Note: i used a standard ocean modifier. If you change the spatial or resolution size, you have to adapt the sizexy/verticesxy accordingly.

$\endgroup$
2
  • $\begingroup$ thanks a lot mate for the alternative! $\endgroup$ Commented Dec 14, 2022 at 12:27
  • 1
    $\begingroup$ Nice one, Chris! Mixing a vector. That's crazy :D -- If you don't like the math calculations you also can plug in a vertex group or an image, and use it with GN. This should work, too. $\endgroup$
    – Blunder
    Commented Dec 14, 2022 at 13:17
2
$\begingroup$

Here is a solution with modifiers.

The Ocean modifier has no vertex group to control the influence. But you can use another larger plane and deform it with either the Shrinkwrap (1) or the Surface Deform modifier (2). Both support a vertex group for the falloff.

screenshot 1

To create the larger plane just create a single face the same size as the faces of the Ocean modifier. Then add & apply 2 Array modifiers (in X and Y directions) to expand the plane.

In the Weight Paint mode paint the weights for the influence of the modifier. The created vertex group (Ocean Displ) is then used for the modifier.

weight paint

The Shrinkwrap modifier must be set to Project mode with [X) Negative and [X] Positive axe directions enabled.

While for the Surface Deform modifier you need to specify the vertex group and press the Bind button.

Example:
animation

$\endgroup$
2
  • $\begingroup$ +1 nice solution! $\endgroup$
    – Chris
    Commented Dec 14, 2022 at 3:25
  • $\begingroup$ amazing, cheers for taking the time! $\endgroup$ Commented Dec 14, 2022 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .