炎のエフェクトをPartcle Systemで作ってみたので備忘録として
使用PC: MacBook Pro (13-inch, M1, 2020)
OSバージョン: 11.5.2
Unityバージョン:2020.3.30f
完成図
形はあまり好きではないけど妥協した(°▽°)
作り方
「炎・火の粉・煙」の3部構成になってます!
炎部分
① 【Hierarchy】→【Effect】→【Particle System】で作成し、名前をfire
に変更
② 【Inspector】からモジュール設定を画像のように行う
プロパティ名 | 設定 | 数値 |
---|---|---|
Start Lifetime | Random Between Two Constants | 0.5 - 2 |
Start Speed | Random Between Two Constants | 0.5 - 1 |
Start Size | Random Between Two Constants | 0.5 - 1 |
Start Rotation | Random Between Two Constants | 0 - 360 |
Gravity Modifier | - | -0.2 |
③ 【Inspector】でその他の設定を以下の画像のように行う
モジュール名 | プロパティ名 | 設定 | 数値 |
---|---|---|---|
Emission | Rate over Time | - | 40 |
Shape | Radious | - | 0.2 |
Rotation over Lifetime | Angular Velocity | Random Between Two Constants | -45 - 45 |
④色の設定を行う
-
[Color over Lifetime]→[Color]の横の白色のボックスみたいなものをクリックして[Gradient Editor]を表示する
-
Alphaの設定。 色変更と同じ要領で、一番左はAlphaを0に、適当なところをクリックしていい感じのところでAlphaをmaxにする。
火の粉部分
① 炎部分と同様に、【Hierarchy】→【Effect】→【Particle System】で作成し、名前をhinoko
に変更
② 【Inspector】からモジュールを画像のように設定する
プロパティ名 | 設定 | 数値 |
---|---|---|
Start Lifetime | Random Between Two Constants | 1 - 1.5 |
Start Speed | Random Between Two Constants | 0.5 - 1 |
Start Size | Random Between Two Constants | 0.2 - 0.3 |
Gravity Modifir | - | -0.2 |
③ 【Inspector】でその他の設定を以下の画像のように行う
モジュール名 | プロパティ名 | 設定 | 数値 |
---|---|---|---|
Shape | Angle | - | 20 |
Shape | Radious | - | 0.2 |
④色の設定を行う
煙部分
① 【Hierarchy】→【Effect】→【Particle System】で作成し、名前をsmoke
に変更
② 【Inspector】からモジュールを画像のように設定する
プロパティ名 | 設定 | 数値 |
---|---|---|
Start Lifetime | Random Between Two Constants | 1 - 1.2 |
Start Speed | Random Between Two Constants | 0.3 - 0.5 |
Start Size | Random Between Two Constants | 1 - 2 |
Start Rotation | Random Between Two Constants | 0 - 360 |
Gravity Modifir | - | -0.2 |
Start Color | - | A → 130 |
③ 【Inspector】でその他の設定を以下の画像のように行う
モジュール名 | プロパティ名 | 設定 | 数値 |
---|---|---|---|
Emission | Rate over Time | - | 20 |
Shape | Angle | - | 25 |
Shape | Radious | - | 0.05 |
Rotation over Lifetime | Angukar Velocity | Random Between Two Constants | -45 - 45 |
④色の設定を行う