8
$\begingroup$

Is it possible to create a "spherical ocean" effect by mapping an ocean texture to a sphere?

I tried baking an ocean simulation, loading the .exr images as an image sequence texture, and setting it to a displace modifier with Normal enabled to displace along the object normals. That resulted in this strange effect:

enter image description here

Is it possible to do this properly, with evenly sized waves, etc.?


Update

I got this to work (partially) with a cycles image texture node set to box, and cycles experimental displacement:

Animated ocean example (2.5MB)

However it's not quite what I expected..

$\endgroup$
8
  • 3
    $\begingroup$ You really love your oceans, don't you? $\endgroup$
    – wchargin
    Commented Sep 14, 2013 at 2:58
  • $\begingroup$ That was one of the first things I tried when the ocean sim was added ;-) I did think about reporting it as a bug. You don't need to bake out to images, you can get the same result by adding the modifier to a sphere and using displace instead of generate. It would appear that the ocean sim always displaces on the object Z-axis, while I believe it should work off the normal. Especially the displace option should not be restricted to only z displacement. $\endgroup$
    – sambler
    Commented Sep 14, 2013 at 5:21
  • $\begingroup$ "Especially the displace option should not be restricted to only z displacement" I would agree, but change that to only the displace option. The Generate option starts by creating a flat plane, where all the normals are Z-up; displacing about Z and Normal are the same, while X and Y would do nothing but make a weird ripple effect at the edges. $\endgroup$
    – wchargin
    Commented Sep 14, 2013 at 13:52
  • $\begingroup$ @sambler I thought using a displace modifier would work because you do have the option to displace along normals (the ocean modifier does not, so I was using it only to generate the textures) however it does not work as expected. I'm not sure the displace option is entierly constrained to the Z, I have had "weird ripple effects at the edges" using it before. $\endgroup$
    – gandalf3
    Commented Sep 14, 2013 at 18:36
  • $\begingroup$ @WChargin yep :) (I tried this before I knew about blender.SE, but only remembered it now with all the other oceany stuff going on..). About "weird ripple effects", I'm not sure the sphere is my question is getting displaced on the Z only, as it bulges out sideways as well as up and down. (see above comment as well) $\endgroup$
    – gandalf3
    Commented Sep 14, 2013 at 18:44

3 Answers 3

1
$\begingroup$

Since the displacement modifier has an option to choose the texture coordinates, this isn't any different from the common problem of UV mapping a sphere.

I recommend some sort of blended box mapping using one modifier for each axis and blending between them with vertex groups.

$\endgroup$
1
  • $\begingroup$ I have tried using a UV sphere, unwrapping it with Sphere mapping and using that as the displace modifier texture coordinates. It results in a more even displacement, though it still far from looking like an ocean. Here is an image $\endgroup$
    – gandalf3
    Commented Sep 16, 2013 at 19:48
1
$\begingroup$

  It looks as if you mapped the image flat. In order to produce a threedimensional texture, Blender projects the texture along an axis through your mesh. While your modifier displaces along the normal, the values it uses are generated with above mentioned method. That's why you get these stripes at the equator.

You might need to create a seamless texture to uvmap onto the sphere.

Turns out Blender can actually do blended box mapping with Cycles. Take a look at this link: http://mango.blender.org/production/blended_box/

enter image description here

$\endgroup$
6
  • $\begingroup$ Could you add more detail on how to create and use such a texture? $\endgroup$
    – gandalf3
    Commented Sep 16, 2013 at 19:50
  • $\begingroup$ I'd like to, but I still think of how to do it effectively. And right now I'm so out of money that I'm starving a little. But I'll see what I can do. $\endgroup$ Commented Sep 16, 2013 at 19:52
  • $\begingroup$ Support for blended box mapping was added to the Image texture node in 2.64, so you don't even need a node setup. I'll test this out with ocean textures/displacement tomorrow. $\endgroup$
    – gandalf3
    Commented Oct 7, 2013 at 5:56
  • $\begingroup$ @gandalf3 Did you ever tested it? BTW: Nice question. $\endgroup$
    – p2or
    Commented May 19, 2015 at 10:30
  • $\begingroup$ @poor Yes, I put the results in the question.. $\endgroup$
    – gandalf3
    Commented May 20, 2015 at 8:09
1
$\begingroup$

You have the option to generate a new mesh for the ocean modifier or to use an existing mesh. If you create a sphere and apply the ocean modifier to it using the option other than 'generate' (sorry, don't have blender at hand right now), you can achieve your desired effect quite simply. This saves you from those mapping issues.

$\endgroup$
1
  • $\begingroup$ This only displaces all the vertices in the object along the Z, so it sort of makes it jump and wobble, but not much else. $\endgroup$
    – gandalf3
    Commented Oct 8, 2013 at 22:15

You must log in to answer this question.

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