Flip FluidsとOcean Modifierの連携【Blender】

スポンサーリンク

液体のシミュレーションに特化したBlenderアドオンのFlip Fluidsと、Blenderに備わっているOceanモディファイヤで生成できる海シミュレーションの連携方法のメモ記事です。

※自分のメモ用なので、雑ですが許してください。(現在作成中)

スポンサーリンク

Flip FluidsとOcean Modifier

Flip Fluids公式サイト

https://flipfluids.com

Blender Market

Flip Fluids
FLIP Fluids is a powerful liquid simulation addon that helps you create high quality fluid effects all within Blender!

Ocean Modifierドキュメント

Ocean(海洋)モディファイアー - Blender 4.1 Manual

これは、オープンソースの Houdini Ocean Toolkit からの移植です。

https://docs.blender.org/manual/ja/latest/modeling/modifiers/physics/ocean.html

この機能Houdiniからパクってきた機能なのか…(オープンソースありがたし)

Oceanモディファイヤの設定

適当なPlaneにOceanモディファイヤを適用すると海っぽいものが出来上がる。Resolutionは32とか64にする。実際のDisplaceマップは、Resolutionの2乗になるので、64なら4096×4096ピクセルのDisplaceマップが内部で生成される。Bake機能で、そのマップをEXRで書き出せる。Foamオプションをつけると、泡のマップも書き出す。Coverageは-1くらいがちょうどいい。

Timeパラメータが時間発展なので、これにキーを打ち、TimeLineパネルで、Linear Extrapolationに設定して無限に発展していくようにするとよい。

下記動画のチュートリアルが参考になる。両方ともほぼ同じ手法。Oceanモディファイヤ平面を2パターン用意して、一つは大きなうねり用(Swell)、もう一つは詳細用(Detail)で作り、それらをBakeした後に別の平面にそれらを適用する流れ。

平面は、巨大な円ポリゴンだが、個人的には三角ポリゴンを密集させて極みたいにすると、テクスチャが破綻すると思うので、Add Circle→Fill Type: NothingでFillなしサークルを作ったのち、EditモードでFace→Grid Fillすることで四角ポリゴンで円を作れる。あとはSubdivision Surfaceで細かくする。

円の作り方(1:04付近)

円ポリに、BakeしたDisplaceマップを適用したマテリアルをあてる。その際、Adaptive Subdivisionという機能(カメラに近い部分ほど細かくSubdivideする)を有効にする。こういう機能ゲームとかでよくあるよね。UE5のNanite的な?ただしこの機能はExperimental Featureなので、レンダーパネルでExperimental Featureをオンにしないと使えない。

Oceanモディファイヤの使い方は下記のチュートリアルが参考になる

泡(Foam)つきのチュートリアルは以下が参考になる

参考資料1

ArchiCraig CAD氏のチャンネルでの作例

Oceanモディファイヤが適用されたPlaneとFlip Surfaceに同じDisplaceを適用することでミックスする。

FLIP Fluids Addon: A liquid fluid simulation tool for Blender
Hey Olof, Sorry for the delay, There it is ;

BlenderArtistsにノード情報が投稿されている。消えたら困るのでこちらに転載する(確信犯)。機械翻訳つき

Ocean Shader Node
The 2 generated ocean displacement are masked by a noise texture to try to eliminate the tiles repetitions. The noise texture location is animated and scaled uniformely to mimic wind direction influence.

海洋シェーダー ノード
生成された 2 つの海洋変位は、タイルの繰り返しを排除するためにノイズ テクスチャによってマスクされます。ノイズ テクスチャの位置は、風向の影響を模倣するために均一にアニメーション化され、スケーリングされます。

Ocean Plane Modifier stack
Need to be using experimental cycle render to be able to use the adaptive subdivision option. See ocean youtube video of dylan neil for more in depth information. Youtube – Dylan Neil

海洋平面モディファイア スタック
アダプティブ サブディビジョン オプションを使用するには、実験的なサイクル レンダリングを使用する必要があります。詳細については、Dylan Neil の海洋 YouTube ビデオを参照してください。

Flip Surface info
Flip surface shader node (enlarged screen shot below) :
The node tree is similar to the ocean shader , only exception , the feather edge mask nodes and the speed attribute node that change transmission/ss scattering color.

フリップサーフェス情報
フリップ サーフェス シェーダ ノード(下の拡大スクリーンショット):
ノード ツリーは海洋シェーダに似ていますが、フェザー エッジ マスク ノードと、透過/ss 散乱色を変更する速度属性ノードのみが例外です。

Zoom (Flip surface shader node)
the Opacity of the fluid is greater when the speed is greater. It does mimic foamy water at high speed area. I think that vorticity would make more sense in this case (to be tested).

Zoom (Flip surface shader node)
Same as the ocean displacement

Flip Surface modifier stack
I do not use adaptive subdivision on the Flip surface , as seen on the ocean modifiers. Adaptive subdivision doesnt support custom vertex attributes yet (e.g. speed) T92622. Notes that, it does eat a ton of ram using it on high polycount mesh ( like the surface generated by Flip). To keep the displacement detail constant between the ocean and the flip surface, i need to add some subdivision to it. Make sure the subdivision is at the bottom on the stack, it greatly improve render speed (as of blender 3.1, Optix & Cuda only).

Regarding the Lattice modifier, refer to this Twitter – Francis Jasmin

White Water Geometry node
The white water is displaced by the same displacement map combination as the ocean & Flip surface. it is only a conversion of the shader node displacement to geometry nodes displacement.

ホワイト ウォーター ジオメトリ ノード
ホワイト ウォーターは、海洋とフリップ サーフェスと同じディスプレイスメント マップの組み合わせによってディスプレイスメントされます。これは、シェーダ ノード ディスプレイスメントをジオメトリ ノード ディスプレイスメントに変換するだけです。

コメント

タイトルとURLをコピーしました