Sea simulation problems

So, i’m with a problem. I need to project a ocean in the surface of a sphere, i tried many times, but doesn’t work’s. Can anybody help me? (Remember, the ocean needs to have a sphere form, but with waves). Thank you, guys

Have you tried the ocean modifier?

Can you provide more details? What was the best result you got so far? What was wrong with it?

In general, projecting flat height maps onto strongly curved surfaces will inevitably result in strong stretching, or requires seams (in case of a sphere anyway). My approach would be use UV maps for projection, but more than one with seams placed differently. Then you can blend over between them and thus the seams will be invisible. What the best method of blending over is depends on the texture. Never tried it with an ocean, but should be doable.

Yes, but the the result is a “plane” sea, i’m with problem to make the sea with sphere shape

My idea is create a scene with the sky and the sea, but i want to give the rounded idea of the planet.

See the image, the blue will be sky and the purple the sea, i tried to use the sea modifier with shrinkwrap to project the sea in the surface of the sphere, but it’s not working.

Basically, i want to create waves in the surface of the sphere.

you can try;
Surface Deform modifier


Wave modifier and
Dynamic Paint

Ocean and shrinkwrap as you already know won’t work. You could create a grey scale png sequence of the waves used as texture for a displacement modifier map or node.

Yes, that is what I meant also.

@Kleber_Duarte say, do you need to render only the part of the sphere shown in the image, or the complete sphere? If it is the former, you probably will not have to mess with blending over between UV islands, as for this segment you likely will get away with having only one UV island.

I just need to render the part of the sphere shown in the image

Thank u, i will try

Okay, that’s pretty simple then. To bake a height map, you just need to feed the z-coordinate into an emission shader (after appropriate scaling). The baked image you feed then as a texture into a displace modifier for your sphare segment.

I did the baking in the file below by rendering with an orthographic camera, as regular bake does not work on the ocean modifier, because it does not have an UV map. But it can also be done by applying the modifier, then the create an UV map with ‘project from view’ followed by regular bake of ‘emit’.

ocean-sphere.blend (3.4 MB)

Didn’t bother to find good settings for the ocean modifier, it just shows the principle.

Thank you, it’s working. I created my own height map.
image

Maybe i was using the displace modifier wrong, doesn’t work here, but i’m getting the expected result using displacement node in the shader editor.

Can you tell me how to use the displace modifier in the right way?

One more thing, why did you use the .exr extension instead of .png to the height map?

Can I see the blend file? Would likely be the fastest way to figure what is wrong with the displace modifier.

About the file format, it’s not wrong to use png. I just somehow developed a habit of using exr, as it avoids a few problems. It always uses linear colorspace, so one doesn’t have to thing about picking the right setting, and using floating point reduces the probability of getting discretization artifacts with height maps and such. When compressed, file size is not much different than for png, so I’m happy with it.

I tried to upload the archive but i received the message “Sorry, new users can not upload attachments.”

:confused:


Using displace modifier, i got a very strange result, i dont have control of what happens.

image
Using displacement node, i got a better result (closer than what i wanted).

Looks to me like the mesh is very coarse in the displace modifier case. Is there a subdiv modifier after the displace on the modifier stack? Or have you enabled adaptive subdivision?