Hi guys,

A little new year gift for you:
nodeEditor.jpg  nodeEditorRender.jpg 

I present you ooOcean based on oceanClass provide by "Amaan Akram" -> https://bitbucket.org/amaanakram/aaocean

This plugin is composed of one node that can be used as deformer and or as vectorDispalcement shader for Arnold/MtoA. This was something I want to experiment not for ocean only, but I like the idea to have one node that can be used as deformer and shading, I think it's can simplify rigging and rendering workflow. It means: what you deform in viewport can be translated to Arnold and you will have the same result, except that you can increase detail more easily in render via subdivision. I say deformer, but it's not a usual maya deformer but a simple node.

By the past, I've used various approach for creating an ocean in Maya:
- hotOcean from Nico Rehberg -> http://www.nico-rehberg.de/shader.html
- aaOcean (custom) from Amaan Akram -> http://www.amaanakram.com/plugins-shaders/aaocean-suite/
- BOSS included in Maya
All of them are really great but there all have in my opinion some pro and cons, it's why I try to create an alternative approach and also experiment a few things between Maya/MtoA.

As I have a first working version I would like to share with you this experiment, if you have any ideas, critics etc don't hesitate.

So what is ooOcean right now:
- one node for deforming geometry (with colorSet:eigen and foam) or render (vector and foam), the foam can be computed by Arnold and applied on a deformed mesh with one node during render
- multi-spectrum
- layering ooOcean
- point based (will see if i add UV support later)
- time repeat for looping ocean
- quickly rig/render possibility as one node is invoked

What I would like to add:
- export velocity on colorSet for using it in render and other situation
- add simplex noise to reduce the tiled issue, can be already reduced by using multi ocean layer
- could be nice to create other node like this one, for combining noise/deformer, ex: vortex,simplex, mountain, wave etc...

How it works:
The node "ooOcean", can be create via the node editor.
On this node you can plug as inputMesh a geometry, for showing the result you need to create an empty mesh and plug the outpuMesh from ooOcean to inputMesh of the new mesh previously created:
quickOcean.jpg  If you want to render it via vector displacement, just simply connect outVector from ooOcean node into displacement shader, and set the node "mode" parameter to shader:
For create layering ocean, simply use multiple ooOcean node, see below for connections:

Node interface:

The plugs is provided as maya module with examples and can be downloaded here : 
For windows and Linux
Maya 2018/2019 and MtoA 3.1.1
Quote 0 0
Looking good.
Thank you for the gift.

I don't know if you remember Arete DNT back then. They had something pretty good going for big water and atmospherics.
The geometry was tied to the camera frustum. Basically i see the mesh only within the camera frustum and clipping planes.
Also, the wave displacement was happening in world space, so even i move the camera around the mesh recomputes but the waves stay in place.
Maybe you can do something like that ?

I really-really liked their system.
Quote 0 0

I don't know Arete DNT, i look and it look great apparently some people are missing this tools. If i am correct this one is now available via redGiant and now named psunami : https://www.redgiant.com/products/effects-psunami/

Right now with ooOcean you can plug a worldMatrix as stickTransform, and if you plug the worldMatrix from the final mesh and animated it you will have this kind of world effect. The final mesh will work as a "window" over the ocean, see video here:


With ooModulate available here : https://octoplug.xyz/plugins/modulate/
You can modulate subdiv mesh or deleteFace , via translate/geometry/curve etc, it could be nice to add camera modulate possibility too:
See below ooModulate apply on a polySmoothFaceNode and deleteFaceNode, where camera position is used as input for modulate.


It could be nice to add baseMesh generation on a seperate node based on camera, in this way and if i understand correctly it will be closed to the process you describe, or perhaps allowing the possibility into the ooOceanNode to plug a camera for querying frustrum, clip plane and apply operation on the mesh.

Quote 0 0
Here is a screenshot for you.

This can be a single inCameraWorldMatrix attribute on your node that will allow you to gather the camera info, obtain the camera node and take the rest of the info needed from there, etc.
What you have is already pretty good anyway.
Quote 0 0
really like the "outVector" option, good addition.
Quote 0 0
Very cool.  What are the licensing/usage limitations/options on this? 

Also, I cannot see the stickTransform input available.  How do I enable that?
Quote 0 0
Add noise possibility is now available in the node under noise tab, this noise is apply before the ocean deformation in XZ and add after in Y, it can help a bit to avoid tile. But the best way to avoid tiled effect and keep a natural look will be to create multi layer with various size and parameter:

You can do what you want with the plug-in 😉, no license limitation
Concerning the stickTransform, i update the file you can redownload it, sorry i upload an old version last time.

Yes and you can also send to arnold the foam via outAlpha attribute available on the node. I would like to avoid this name but i can't, i contact the support (which is great) and it's a limitation for now. If anyone have find a workaround it will be great 🙂
foam render exemple:

Thank you for the reference image. I am thinking to do a node for that, and it will not in ooOcean node but a separate one . I think i will use message attribute for connecting and querying camera info.
Right now i am thinking on how i can create this plane:
- projection through the camera onto Y=0?
- querying intersection between frustum volume with Y=0?
- etc ..
Quote 0 0
This reminds me of a small tutorial i posted like maybe 10+ years ago that is related to multilayer approach to making ocean surface look nice.
Linking it here:  http://petershipkov.com/tutorials/oceanSurface/oceanSurface.htm
Quote 0 0
Just saw your questions at the end of your last message.
Will send you some code tonight.
Quote 0 0
Thanks, got the stickTransform working now.

However, I cannot get any information from the OutAlpha or OutVector, which means I cannot get the foam and displacement working like your setup.  Any thoughts?

Also, regarding setup, where do the 3 files from the "bin" folder get placed?  The ones relating to ooOceanShader...
Quote 0 0

probably because Arnold is not aware of the dll in the bin folder.

you have to point to it


Quote 0 0
Scott_vfx: do you use the plugin as module like it's provide in the archive? Because in the mod file the var env are correctly set for arnold.

pshipkov: i just start to build the node and starting to query camera information, i am looking for math regarding compute of this culling plane, i find some math example an will try to implement but if you have something this would be very helpful
Quote 0 0
I have distributed the files into network accessible folders that maya.env points to.  I have added a path to the bin files, and now get the following errors when I hit render:

# Warning: ooOceanShader.dll was compiled against non-compatible Arnold #
# Error: line 1: [mtoa.translator] ooOceanShader_translator: Arnold node type ooOceanShader does not exist. #

Using Maya 2018.4 with provided Arnold plug-in
Quote 0 0
Ah yes ok i compil the plugin with last arnold/mtoa version, i can look now if i can compil a version for you. Which mtoa version are you using. I think you want to say Arnold right?
Quote 0 0
Maya 2018.4 uses:

Arnold Core
Quote 0 0