Unity의 광원은 오브젝트의 Shadows를 오브젝트 자체의 다른 부분이나 가까이 있는 다른 오브젝트에 캐스트할 수 있습니다. 그림자는 “평면”적으로 보일 수 있는 오브젝트에 부피감과 포지션을 더하여 씬에서 뎁스와 사실감을 살려냅니다.
광원이 하나인 가장 단순한 씬을 생각해 보십시오. 광원에서 광선이 직선으로 나와 결국 씬의 오브젝트에 부딪힐 수 있습니다. 광선이 오브젝트에 부딪힌 후에는 더 멀리 이동하여 다른 것을 비출 수 없습니다. 즉, 광선은 첫 오브젝트에서 “바운스”되어 오브젝트를 통과하지 않습니다. 오브젝트가 캐스트하는 그림자는 간단히 말해 빛이 닿지 않기 때문에 조명이 비춰지지 않는 영역입니다.
광원과 같은 포지션에 있는 카메라를 상상하여 다른 관점에서 생각해 볼 수 있습니다. 씬에서 그림자 안에 있는 영역은 카메라로 볼 수 없는 영역과 일치합니다.
실제로 Unity에서는 이 방법으로 광원에서 캐스트된 그림자의 포지션을 결정합니다. 광원에서는 카메라와 동일한 원칙에 따라 카메라의 관점에서 씬을 내부적으로 “렌더링”합니다. 씬 카메라에 사용되는 뎁스 버퍼 시스템은 광원에 가장 가까운 표면을 추적합니다. 광원의 정면에 있는 표면에는 조명이 비춰지지만 나머지 표면은 그림자 안에 있습니다. 이 경우 뎁스 맵을 새도우 맵 이라고 합니다. 섀도우 매핑에 대해서는 위키피디아 페이지에서 자세한 내용을 참고할 수 있습니다.
아래 섹션에서는 Unity의 광원 오브젝트에서 캐스트하는 그림자에 대해 자세하게 설명합니다.
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.