4
3

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.

Universal RPでブルームを炊こうとしたらうまく動かなかった話(解決済み)

Posted at

今使っているプロジェクト(Unity 2021.1.12f1)ではUniversal RP(11.0.0)を使っているのだが、ブルームを炊こうとしたら上手く動かなかった&Skyboxが正しく表示されていないことに気がついた。

本記事の要点(と補足)は以下の通り。

  • Universal RPで何か上手く動作しない時は――
    • Universal Render Pipeline AssetとForward Renderer Data(またはRenderer 2D Data)を作成しなおす、または設定を見直す。
      • ポストプロセスが動作しない場合Forward Renderer Data → Post-processing → Enabledを確認する。
    • Project Settings → Graphics → Scriptable Render Pipeline Settingsが設定されているか確認する。
    • Cameraコンポーネントのパラメータを見直す。Rendering → Renderer・Post Processing、Environmentを確認する。
    • Global Volumeを作成しなおす。
    • 2DレンダラーではSkyboxはサポートされない
    • Built-in RPとUniversal RPとではポストプロセスの設定方法が異なる。つまり、Built-in RP用のポストプロセスの設定を行ってもUniversal RP環境では反映されないし、逆もまた同様。
    • Universal RPでポストプロセスを使用する場合、Post Processingパッケージは(必ずしも?)必要ない。

HDRPはわかんにゃい。

以下状況再現。

Unity 2021.13f1 without Universal RPでブルームを炊く

3Dで新規プロジェクトを作成。
image.png
image.png

以降はBuilt-in Render Pipeline向けの設定である。Universal RPを使用する場合、次項まで進むこと

Package ManagerからPost Processingをインストール。
image.png

Main CameraにPost-process Layerを追加。
image.png

Post-process LayerのVolume LayerをPostprocessingに変更。レイヤーが無ければ追加する。レイヤー名、インデックスは任意。
image.png
image.png

シーンにPost-process Volumeを追加。
image.png

Post-process VolumeのLayerをPostprocessingに変更。
image.png

Is Globalを有効化。
image.png

Newボタンを押しProfileを新規作成。
image.png

Add effect...からBloomを追加。下図ではBloom追加済み。Intensityを5、Thresholdを0.5に設定。
image.png

完成。
image.png

Unity 2021.1.13f1でUniversal RP 11.0.0を導入する

先程のプロジェクトにUniversal RPを導入する。

Package ManagerからUniversal RPをインストールする。
image.png

Create → Rendering → Universal Render Pipeline → Pipeline Asset (Forward Renderer) からPipeline Assetを作成。メニューが見当たらない場合エディタを再起動すると直る場合がある。他にもいくつかプリセットが用意されているがとりあえず使わない(私が違いを知らない)。
image.png

Project Settings → Graphics → Scriptable Render Pipeline Settings から先程作成したPipeline Assetをセットする。ここでポストプロセスが効かなくなる
image.png

Unity 2021.1.13f1 with Universal RP 11.0.0でブルームを炊く

レンダラーを選択し、Post-processingを有効化する。
image.png

Main Cameraを選択しCamera → Rendering → Post Processingを有効化。
image.png

ヒエラルキーにGlobal Volumeを追加する。
image.png

VolumeのProfileを新規作成する。
image.png

Add Override → Post-processing → Bloom
image.png
image.png

Intensityを有効化し、値を0から変更して完成。下図では5にしている。驚くべきことにBuilt-in Render Pipelineの場合とはThresholdとIntensityの位置が逆であることに注意。
image.png

最後に、Built-in RP用にシーンに配置したPost-process Volumeと、同じくMain CameraにアタッチしたPost-process Layerコンポーネントを削除するとよいだろう。Built-in RP用に作成したPost-process Volume Profileは削除してもいいし、残してもいい。

その他Universal RPの設定

  • Window → Rendering → Lighting → Scene → Lighting Settings からアセット化されたライティングの設定を選択することができる。
  • Project Settings → Quality → Renderingからアセット化されたレンダリングの品質の設定を選択できる。ここから選択しないといくらアセットの設定を変更しても反映されないので注意。
4
3
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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?