オクルージョンカリングを適用するためには Occlusion Area を作成しオブジェクトが移動できるようにサイズを修正する必要があります(当然、移動するオブジェクトを Static とすることはできません)。オクルージョンを作成するためには、空のゲームオブジェクトに Occlusion Area コンポーネントを追加します。(メニューで Component -> Rendering -> Occlusion Area を選択)
オクルージョンエリア を作成した後 Is View Volume チェックボックスをオンにして動くオブジェクトをオクルージョンします。
プロパティ | 機能 |
---|---|
Size | オクルージョンエリアのサイズを定義 |
Center | オクルージョンエリアの中心を設定します。デフォルトでは、( 0, 0, 0 )であり、ボックスの中央に位置しています。 |
Is View Volume | カメラを配置できる場所を定義します オクルージョンエリア 内にある Static オブジェクトをオクルージョンするときオンにします。 |
オクルージョンエリアを作成した後、箱をセルに分割する方法を確認しなければなりません。オクルージョンエリア がどのように算出されたか確認するためには Edit を選択し、オクルージョンカリングプレビューパネル( Occlusion Culling Preview Panel )でビュー( View )をトグルして選択してください。 オクルージョンカリングプレビューパネル
オクルージョンをセットアップした後、Occlusion Culling をオンにして( Visualize mode の Occlusion Culling Preview Panel 上で)、メインカメラ をシーンビューの中で移動することでテストを行うことができます。
メインカメラを移動するのに合わせて( Play モードでない場合も)、オブジェクトが無効( disable )となることを確認できます。オクルージョンデータでエラーが出ないことを確かめる必要があります。移動するのに合わせてオブジェクトがビューに割り込んできたらエラーであると認識できます。この場合、エラーを修正するためにオプションとしては画面解像度を変更する( Target Volumes を変更していた場合)か、オブジェクトを移動してエラーが出ないようにする方法があります。オクルージョンでデバッグをするためにはメインカメラを問題が発生している位置に移動してスポットでチェックを行うことができます。
処理が完了するとビューエリアでカラフルなキューブを確認することができます。青いキューブは Target Volumes ( Target Volume )のセル分割を意味しています。白いキューブは View Volumes ( View Volume )のセル分割を意味しています。もしパラメーターが正しく設定されていればいくつかのオブジェクトはレンダリングされません。その理由はカメラのビュー範囲(円錐状)の外にあるか、他のオブジェクトの配置によりオクルージョンされているか、のいずれかになります。
オクルージョンを設定した後、シーン上で何もオクルージョンされない場合、オブジェクトをより小さなパーツに分解しそのオブジェクトがセルの中に納まるサイズに小分けします。
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.