4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Blender】メッシュのボロノイ分割

Last updated at Posted at 2022-02-15

概要

Blenderを使って、メッシュ(基本形状)をボロノイ分割する方法についてまとめました。

応用すると、以下のような表現ができるようになります。

準備

Blenderは、3.0.0を使用してます。
Preferenceで、Add-onのCell Fractureをインポートします。
スクリーンショット 2022-02-15 233705.png

手順

Meshの準備

Meshは、ある程度細分化されている必要があります。例えば、Cubeの場合5×5×5くらいに細分化します。

[Edit Mode]で、右クリックからSubdivideを選択して、分割数を5にします。
スクリーンショット 2022-02-15 234248.png
スクリーンショット 2022-02-15 234521.png

Smoothをかける場合

球体などの表面をSmooth Shadeしたい場合は、分割前にかけておきます。

Materialの設定

分割した後に、表面と内部の面のMaterialを分けたい場合は、あらかじめ内部の面のMaterialをMeshに追加しておきます。

スクリーンショット 2022-02-15 235001.png
スクリーンショット 2022-02-15 235159.png

分割する

[Object]→[Quick Effects]→[Cell Fracture]を選択します。
スクリーンショット 2022-02-15 235351.png

設定画面では、以下のように設定し、[OK]を押します。
スクリーンショット 2022-02-15 235849.png

  • Noise:seed値で、分割した形が気に入らなければ調整します。
  • Material:内部の面に使うMaterialのインデックスを設定します。表面のMaterial(Outer)が「0」で、内部の面のMaterial(Inner)が「1」。
  • その他:☑が入っているプロパティを設定することで、Innerが適用されます。

スクリーンショット 2022-02-16 000827.png

分割がうまくいかない

メッシュの形状が閉じていない場合や、メッシュが薄すぎる場合は、分割がうまく行かない場合があります。

生成過程を見るとわかりますが、面の法線(の逆向き)とその直線上にあるFaceの裏面とのあたり判定で、形状を認識している挙動をしています。
なので、部分的に面がなかったり、法線の向きがおかしいと正常に分割できません。
スクリーンショット 2022-02-18 205508.png

法線の修正方法

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?