Dynamic Ocean Simulation?

I had a thought today: wouldn’t it be nice to have a hybrid between the fluid simulator and the ocean simulator in blender? This way we can deal with wakes from boats, splashes in the water, and so on much easier without needing to use workarounds. The only thing I could come up with is in the .blend attached… but it still doesn’t take care of splashes. Does anyone know of a way to make splashes in an ocean simulation? Say a basketball hits an ocean surface in Blender. How the heck do we get a splash from that in Blender?

Here is the .blend
It is simply an ocean simulation as a dynamic paint canvas, and an icosphere as the brush with “waves” set.
Somewhat Dynamic Ocean.blend (540 KB)

Let me know what you guys can come up with or if you know of any ways to do this already. Thanks so much and happy blending!

Could you please post YouTube video too? (for those who are at work and can’t use Blender :wink: )

I’m at school, but when I get home I can. :slight_smile:

I saw this done about a year ago – with particles and Dynamic Paint – and I have the .blend file. I haven’t had the chance to figure out how it works, but here it is:

The YouTube Demo:

And the .blend file:

I found all this here, in this archived thread from March 2012:

http://blenderartists.org/forum/archive/index.php/t-248850.html?

Yeah I saw that too. But It’s a pretty heavy workaround.

What about water physics? (buoyancy) How do you simulate that?

Btw, while we are on the subject of Ocean Sim, have anyone ever baked seamless textures off simulation ? (animated diffuse/normal/etc. maps)

Yes, buoyancy is also a good point. Any coders around that can make a python tool possibly? Call it dynamic ocean simulator? Haha

Indeed, it is a heavy workaround – the results look pretty good, though – and the .blend file is rather complicated (as trying to figure out someone else’s work usually is). But it can’t be anymore of a pain than the fluid simulator – I have a kinda love/hate relationship with the fluid simulator.

As far as the fluid simulator goes, I don’t think it’s a possible solution unless you have around 32GB of RAM and an 8-core Xeon for simulation as well as a good video card for the render. But theoretically you COULD do some fancy work with a very high res texture (Displacement maps) then another high res to match that as a bump/normal map, all added onto a “subdivided the crap out of” plane. You could then use the dynamic paint after wards to add in the ripples. But this would require animated textures, which I don’t know how to create. Perhaps there is a way to generate displacement textures from an ocean simulation beforehand, then export and import them? That’s an easy workflow workaround, but its definitely not easy for the computer.:spin:

Ok managed to make it to a school computer during my lunch break. Blender experimentation is more important than food in my opinion, plus I have Monster in my system, I’ll just run on that.

Anyways, I have Blender with me on my flash drive. Let me test out my theory from my previous post. I’ll check in for you guys soon.

Success! BUT! No splashes. I get ripples/waves though! One step towards the goal. Now I need to figure out these splashes… Particles seem OK but what about the BIG splashes that come off the water… ones that can’t realistically be depicted with particles? Hmm…
What will be nice with the particles is that you can use them to generate even more little ripples when they fall back onto the water surface! How fun! :slight_smile:

Here is my .Blend. AND! I managed to export .EXR images just by baking to a defined folder. It worked for both the normal maps and the large scale displacement maps, with an option for foam too! This is too exciting!
Water Surface.blend (1.85 MB)
Also if you want the cache files then here you go…
https://onedrive.live.com/redir?resid=8F888C565F869816!4033&authkey=!AEy3hZ6tMiyYX5U&ithint=file%2C.zip
Lets hear some ideas from people for the bigger splashes… I’m stumped. Darn you, fluid sim! Why can’t you and the ocean sim get along???

well, for once, EXR can’t be opened in GIMP and I have no idea how to convert EXR to TGA.

also, baking function built into Ocean Sim depends on sim resolution. So if I have lower res simulation going on, EXR comes out sooo tiny, that it’s of no use :confused:

I basically need 512x512 to 4069x4069 tileable (seamless) maps in TGA format.

Moved from “General Forums > Blender and CG Discussions” to “Support > Particles and Physics Simulations”

I’ll see what I can do. Look for some programs that can perform the conversion, I guess.

Heh, I can’t even load EXR into Blender’s Image Editor :confused:

whaa?? How does that happen? :confused:

Not sure… I haven’t tried since 2.67 or so.

The idea is to bake textures, bake simulation and put it into the game, so it looks similar to this:

Oh my… that’s a beautiful ocean. Unfortunately I don’t know that much about game development. But I could probably bake an ocean for you using the high res exr’s and just give them to you if you’d like, since you’re having trouble with blender. What version of Blender are you using?

2.69 currently (since I need all of my game dev add-ons to be updated for 2.7x). It’s not that I am having issue, I just don’t know why I can’t open EXR and save it as TGA :confused:

By baking ocean I mean turning animation-simulation into shape keys I guess.

Btw, what setting do you use to generate high resolution textures?

Is there a way to generate foam/diffuse/normal/cavity maps separately from each other?

As far as I know all of the different textures automatically bake into separate files. When I baked a simple ocean at school earlier (the link to my OneDrive .zip has them in it) the normals and the displacement files baked separately into the same folder.