Ocean, extending the ocean modifier to support additional spectra

How long typically does it take for an accepted change to ‘land’ in blender? The resolution fix was accepted.

The multi-spectrum submit is pending review.

2 Likes

So the resolution fix was committed to blender. Woohoo.

The multi-spectra submission is still pending attention. I’ve added a video to it to show why this might be important/useful : https://developer.blender.org/D6889

The new spectra allow for swells to be added.

12 Likes

Brecht has accepted the spectra additions. Shortly, taking to the high seas in blender will be greatly improved. :slight_smile:

14 Likes

Hi Phil, very nice additions to Blender ocean system. Thank you.
Digging just a bit into aaocean I read about Ability to detect region & direction of ocean spray (via Eigen vectors) and trails were generated using velocity vectors on the surface of the aaOcean plugin.
Is these stuff something that can be implemented too in the modifier?

Scenario: making luxury boats videos I’m requested to show them in motion, but I can’t afford the time, cpu power and technical difficulties of running a full physical simulation to get the wake waves generated by the hull colliding with water. I’m struggling with recreating a plausible imitation (instead of simulation :wink: ) of wake waves and trails with a combination of shaders and objects+modifiers manipulating the base ocean object. But it’s hard!
I thought that those eigen and velocity vectors do sound good for having some of the work done automagically (and better than “by hand”).

What I mean is: are those vector stuff things in that paper? And can they be somehow exposed in the modifier to be reused as it happens with foam and normals?

image

3 Likes

I’m sure most things are possible, but I’m not familiar enough yet with blender’s code to know what might be practical. In this case, my primary concern was grafting the alternative spectra into the existing code with least disruption.

Foam being delivered through a map that is integrated in the shading pipeline, you might be able to leverage this with the ‘waterial’ blendermarket system where a wake is provided on the material via its shading network. You can probably integrate the tool easily enough.

I do want to revisit this at some point to see what might be doable to extend the output, but it’s not at the top of my list right now. For ‘spray’, I’ve been holding fire until the new particle system is available (the existing one being EOL); I’d like to see whether the spray output (assuming I get it implemented) can be used to direct particle effects in that new mode.

So, nothing will change here for the time being.

So, I decided to take a look to see what’s already available. Internally, the eigen vectors are obviously available in order to compute foam. Exposing them would be easy enough (it’s a small patch). These could then provide velocity vectors for particles or anything else (assuming the particle system can take this input).

Is this generally useful enough to implement?

4 Likes

Differential is here : https://developer.blender.org/D7182

mmm, i wouldn’t know how to actually take advantage of those additional info. I was especially intrigued by the “trails” part of my post. But I don’t know if it’s related to eigen vectors.

This was more about your first point (spray), but there is a relationship to the second as well, in that the output from these vectors can be considered as a surface velocity for the different parts of the surface. (XYZ are mapped to RGB channels). So, you have velocity vectors on the surface (part 2), by modifying the output velocity vectors from the ocean, to add your trails.

The question from my side is what to label them. I’m leaning towards ‘peak spray data’ and ‘trough spray data’, as the general case seems to be for spray effects and the ability to perhaps put some ‘froth’ in the troughs, if desired.

This question is somewhat uninformed…but I think it might get relevant for the future: I am currently trying to use Mantaflow for a ocean water simulation. I want to simulate how the stormy ocean hits a ship / boat, with smaller and bigger waves. Obviously, you don’t want to simulate a huge ocean, when just the interaction with the boat needs to be physically correct, so I tried to let the ocean modifier guide the mantaflow simulation, which just takes place around the boat. Unfortunately, I found that to be pretty difficult with the guiding feature of mantaflow. Do you think it’s feasible to somehow transfer velocity vectors from the ocean modifier to the mantaflow fluid? Does the modifier generate data that could be used by this? Is that what you two are already discussing, could those velocity vectors, theoretically, also be used for simulation?

The ocean modifier is only a 2D surface where the fluid is 3D, so the vectors are really in-the plane (no Y values).

The ocean modifier internally works on a grid - it’s not really a continuum as applied to the mesh (the mathematical expression is sampled using a grid, the density of which comes from the resolution). There are also simplifications in the models. You can see that in extreme cases where the peaks fold through each other.

As such, I’m not convinced that would get nice results; if ‘everything nodes’ allows general attributes to be connected, it could be tested

https://developer.blender.org/D7182 is pending review at the moment; I’m hoping it might make it into 2.90.

8 Likes

Still pending review; not sure how much nudging is appropriate.

Spray map was committed. \o/

9 Likes

Another differential has been submitted to allow for independent viewport and render resolution settings.

https://developer.blender.org/D8336

5 Likes

How would one use that spray map? I just had a look, but it doesn’t look like a map that’s directly usable - or am I mistaken? Thanks!

The spray map provides vectors that I hope to be usable with the new @jacqueslucke particle system to drive emission velocities. My current thought is that the foam map could be used to screen emission rates and then the spray map would be used to drive the velocity.

4 Likes

This one will have to wait until 2.91; missed the window for 2.90, it seems.

3 Likes

Differential for baking of spray maps. Seems to work. https://developer.blender.org/D8470. Pending review.

1 Like

Brecht accepted this today; not sure when it will land, though.

6 Likes