パーティクルシステムを作成するときに柔軟に対応できるよう、Unity には 2 つのソリューションがあります。プロジェクトが コンピュートシェーダー をサポートするプラットフォームをターゲットにしている場合、両方を同時に使用することができます。パーティクルシステムソリューションは以下の 2 つです。
以下の表は、2 つのパーティクルシステムソリューションを比較しています。各ソリューションの詳細については、ビルトインのパーティクルシステム か Visual Effect Graph を参照してください。
機能 | ビルトインパーティクルシステム | Visual Effect Graph |
---|---|---|
レンダリングパイプラインの互換性 | ビルトインレンダーパイプライン、ユニバーサルレンダーパイプライン、HD レンダーパイプライン | ユニバーサルレンダーパイプライン、HD レンダーパイプライン |
可能なパーティクル数 | 数千 | 数百万 |
パーティクルシステムのオーサリング | インスペクターで Particle System コンポーネント を使用する簡単なモジュラー式オーサリングプロセス。各モジュールは、パーティクルの定義済みの動作を表します。 | グラフビューを使用する高度にカスタマイズ可能なオーサリングプロセス。 |
物理演算 | パーティクルは Unity の基礎となる物理演算システムと相互作用します。 | パーティクルは、Visual Effect Graph で定義する特定の要素と相互作用できます。例えば、パーティクルは深度バッファと相互作用します。 |
スクリプトの相互作用 | C# スクリプトを使用して、ランタイムにパーティクルシステムを完全にカスタマイズできます。システム内の各パーティクルの読み取りと書き込みを行い、衝突イベントに応答できます。Particle System コンポーネント は再生制御 API も提供します。つまり、スクリプトを使用してエフェクトを再生および一時停止し、カスタムのステップサイズでエフェクトのシミュレーションを行います。 | グラフのプロパティを公開し、C# スクリプトを通してそれらにアクセスして、エフェクトのインスタンスをカスタマイズできます。また、イベントインターフェース を使用して、グラフが処理できる添付データと共にカスタムイベントを送信することもできます。Visual Effect コンポーネント は再生制御 API も提供します。つまり、スクリプトを使用してエフェクトを再生および一時停止し、カスタムのステップサイズでエフェクトのシミュレーションを行います。 |
フレームバッファ | なし | HD レンダーパイプラインで、カラーバッファと深度バッファにアクセスできます。例えば、カラーバッファをサンプルし、その結果を使用してパーティクルの色を設定したり、深度バッファを使用して衝突のシミュレーションを行います。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.