CubicUnit is the name of my game development project. This project contains graphic rendering tools and game logic control tools. By using the tools, I can shorten the game develpment cycle. This blog is a information pages about what I will work for the project.

星期四, 七月 20, 2006

「影」

光射向物件,投射在地面上,較黑的部份,我們叫這些做「影」。

要得到「影」,首先我們要從光源的角度看世界,估計物件與光源之間的距離。其後,我們要用一些數學理論,把先前得到的距離轉換成鏡頭世界的距離。再用鏡頭的角度看世界,比較物件在光源世界轉換成鏡頭世界的距離和物件在鏡頭世界的距離。如果,物件在光源世界轉換成鏡頭世界的距離比物件在鏡頭世界的距離長的話,那些就是「影」。相返,那些就是光可到達的地方。

在電腦上,要做到以上的情況,我們可以﹏﹏﹏﹏﹏﹏﹏

唉……﹗