Understanding the ocean modifier code?

I’d like to better understand how this is implemented, but the code is largely devoid of comments and I’ve no idea how to dig into the history of this system. Is there a place where I can find the history of this code? I’d be interested in a parallel implementation of the aaOcean library (which has advantages), using the existing ocean code as a reference for how to proceed.

1 Like

Do you need something more than git log?

As mentioned, I’m not even sure where to start digging in. I’m a little surprised by the lack of comments in the code.

Ok. I don’t know what OS your using but this advice should work for, at least, Linux and Windows.

First, I assume you have a zip of the codebase? If so, then you should know that it doesn’t come with a history. For the history, you’ll need to follow these directions to get the codebase with the history - just click on Building Blender

Just download the software called “git” from https://git-scm.com/. It’s what Blender uses to track all the changes to the codebase. It’s a VERY commonly used file versioning system(i.e. it records all the changes to your copy/clone of the codebase)

You’ll also probably want a good gui for git. Git, at least the one I linked to, does come with it’s own gui buuut you could do better. So a couple descent popular gui’s for git are TortoiseGit and SourceTree. I have both installed.

IF you want to build Blender then you also must get cmake. And you’ll also need a subversion program for the dependency files - they don’t use git, for now. I use TortioseSVN. It comes prepackaged with SVN.

After you’ve made a clone of the codebase, on Windows and using TortioseGit, at least, you can then right click on the repository folder called “blender”. Then a context menu will pop up. Go to “TortioseGit” >> “Show log”.

With SourceTree, just run the program then open the “blender” folder in SourceTree, and then click on “History” underneath “WORKSPACE”.

The git logs will show you a history of most changes that have been in Blender since its purchase. But I’m sure that a lot of the history has been discarded, unfortunately.

The complete history of this file you can view online here. There is some information on the old wiki available here.

The modifier seems to be the result of a crowdfunding campaign, the website is long gone, but the internet archive still has a copy of the site here, don’t really go beyond 2013 cause it seems to be hosting some adult Japanese content now.

That’s useful - thanks. I’ll start trying to piece things together.

Gah, well I tried, but the lack of comments to understand the implementation made this more than I can handle. It would be really neat to get this in blender, though, as the ocean changing result when the resolution is changed is quite frustrating.