パーティクルシステムは、パーティクルと呼ばれる多くの小さな画像やメッシュをを擬態してレンダリングし、視覚効果を生み出します。システムの各パーティクルは、エフェクトの個々のグラフィカルな要素を表します。個々のパーティクルのシミュレーションをまとめて行い、全体的な効果を作成します。
Particle systems are useful when you want to create dynamic objects like fire, smoke, or liquids, because it is difficult to depict this kind of object with a Mesh (3D) or Sprite (2D). Meshes and Sprites are better at depicting solid objects such as a house or a car.
パーティクルシステムを作成するときに柔軟に対応できるよう、Unity には 2 つのソリューションがあります。プロジェクトが コンピュートシェーダー をサポートするプラットフォームをターゲットにしている場合、両方を同時に使用することができます。パーティクルシステムソリューションは以下の 2 つです。
The following table shows a high-level comparison of the two particle system solutions. For more information about either solution, see Built-in Particle System or Visual Effect Graph.
機能 | ビルトインパーティクルシステム | Visual Effect Graph |
---|---|---|
レンダリングパイプラインの互換性 | ビルトインレンダーパイプライン、ユニバーサルレンダーパイプライン、HD レンダーパイプライン | ユニバーサルレンダーパイプライン、HD レンダーパイプライン |
可能なパーティクル数 | 数千 | 数百万 |
パーティクルシステムのオーサリング | インスペクターで Particle System コンポーネント を使用する簡単なモジュラー式オーサリングプロセス。各モジュールは、パーティクルの定義済みの動作を表します。 | グラフビューを使用する高度にカスタマイズ可能なオーサリングプロセス。 |
物理演算 | パーティクルは Unity の基礎となる物理演算システムと相互作用します。 | パーティクルは、Visual Effect Graph で定義する特定の要素と相互作用できます。例えば、パーティクルは深度バッファと相互作用します。 |
スクリプトの相互作用 | C# スクリプトを使用して、ランタイムにパーティクルシステムを完全にカスタマイズできます。システム内の各パーティクルの読み取りと書き込みを行い、衝突イベントに応答できます。Particle System コンポーネント は再生制御 API も提供します。つまり、スクリプトを使用してエフェクトを再生および一時停止し、カスタムのステップサイズでエフェクトのシミュレーションを行います。 | グラフのプロパティを公開し、C# スクリプトを通してそれらにアクセスして、エフェクトのインスタンスをカスタマイズできます。また、イベントインターフェース を使用して、グラフが処理できる添付データと共にカスタムイベントを送信することもできます。Visual Effect コンポーネント は再生制御 API も提供します。つまり、スクリプトを使用してエフェクトを再生および一時停止し、カスタムのステップサイズでエフェクトのシミュレーションを行います。 |
フレームバッファ | なし | HD レンダーパイプラインで、カラーバッファと深度バッファにアクセスできます。例えば、カラーバッファをサンプルし、その結果を使用してパーティクルの色を設定したり、深度バッファを使用して衝突のシミュレーションを行います。 |
Unity のビルトインパーティクルシステムを使用すると、Unity がサポートするすべてのプラットフォーム用のエフェクトを作成できます。ビルトインのパーティクルシステムは、CPU 上でパーティクルの動作のシミュレーションを行います。これにより、以下の主な利点があります。
ビルトインパーティクルシステムの使用方法については、Particle System コンポーネント を参照してください。
Visual Effect Graphは、Unity プロジェクトの大規模な視覚効果を作成するためのパッケージです。Visual Effect Graphは GPU のパーティクルの動作をシミュレートします。これにより、ビルトインのパーティクルシステムよりもはるかに多くのパーティクルをシミュレートできます。多数のパーティクルを含み、高度にカスタマイズ可能動作が必要な視覚効果を作成したい場合は、ビルトインパーティクルシステムの代わりに Visual Effect Graph を使用します。Visual Effect Graph のインストールと使用方法については、入門ガイド を参照してください。
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.