움직이는 오브젝트에 오클루전 컬링을 적용하려면 Occlusion Area 를 만든 다음 움직이는 오브젝트가 포지션할 공간에 맞게 영역의 크기를 수정해야 합니다. 물론 움직이는 오브젝트를 정적이라고 표시할 수 없습니다. 빈 게임 오브젝트에 Occlusion Area 컴포넌트를 추가하여 오클루전 영역을 만들 수 있습니다(메뉴의 Component -> Rendering -> Occlusion Area).
Occlusion Area 를 만든 후 Is View Volume 체크박스를 선택하여 움직이는 오브젝트를 가려야 합니다.
프로퍼티: | 기능: |
---|---|
Size | 오클루전 영역의 크기를 정의합니다. |
Center | 오클루전 영역의 중심을 설정합니다. 디폴트는 0,0,0이며 박스의 중앙에 위치합니다. |
Is View Volume | 카메라가 있을 수 있는 포지션을 정의합니다. 이 Occlusion Area 안에 있는 정적 오브젝트를 가리려면 이 항목을 선택해야 합니다. |
오클루전 영역을 추가한 후 이 영역이 어떻게 상자를 셀로 분할하는지 확인해야 합니다. 오클루전 영역이 어떻게 산출되는지 확인하려면 Edit__을 선택하고 Occlusion Culling Preview Panel__에서 View 버튼을 토글해야 합니다.
오클루전이 설정된 후 Visualize 모드일 때 Occlusion Culling Preview Panel 에서 Occlusion Culling 을 활성화하고 Main Camera 를 씬 뷰 안에서 여기저기 움직이면서 테스트할 수 있습니다.
메인 카메라를 여기저기 움직이면 (재생 모드인지 여부와 관계없이) 여러 오브젝트가 자동으로 비활성화되는 것이 보입니다. 이때 오클루전 데이터에 오류가 있는지 확인해야 합니다. 카메라를 움직일 때 오브젝트가 뷰에 갑자기 나타나면 오류가 있음을 알 수 있습니다. 이 경우 해상도를 변경하거나(타겟 영역을 사용하는 경우) 오브젝트를 움직여서 오류를 가려 오류를 수정할 수 있습니다. 오클루전 관련 문제를 디버깅하려면 메인 카메라를 문제가 있는 포지션으로 이동하여 무작위로 점검할 수 있습니다.
처리가 완료되면 뷰 영역에 다채로운 큐브가 몇 개 보일 것입니다. 파란색 큐브는 Target Volumes 의 셀 분할을 나타냅니다. 흰색 큐브는 View Volumes 의 셀 분할을 나타냅니다. 파라미터가 올바르게 설정된 경우 렌더링되지 않는 오브젝트가 몇 개 보일 것입니다. 그 이유는 오브젝트가 카메라의 뷰 절두체 밖에 있거나 다른 오브젝트에서 오클루드 처리되지 않기 때문일 것입니다.
오클루전이 완료된 후 씬에 오클루드 처리되는 것이 보이지 않으면 오브젝트가 셀 안에 완전히 들어갈 수 있도록 오브젝트를 더 작은 조각으로 나눠 보아야 합니다.
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.