The ClickSo, I was watching X-Files, sinking into the recliner chair. All of the sudden, I realized that diffuse light was merely specular light that was equally reflected in all directions within 90 degrees of the surface normal (a total of 180 degrees), because of micro-facets in surfaces. Then, I thought of environment mapping. It was used to simulate specular reflection. So why not use it for diffuse reflection too? Why couldn't you use a cube-rendered view to calculate radiosity? That was the beginning. However, I only had a vague idea of how to do it: render cube view, use it to calculate diffuse light interaction. So, I still had no idea how to use the cube view to calculate the radiosity, I just knew, by some intuition, that you could. The DevelopmentSo, I turned off the TV (yes, in the middle of X-Files), and ran to get some paper. Now, perhaps you think that I used it to write things down on. However, I did nothing of the sort. What I used the paper for was I used it to clearly see real-life radiosity. I put the piece of paper on the table, and I quickly ran to by room to get varios objects of different colors. I first took a red colored marker and put it just above the paper. The red color from the marker casing was slightly visible on the piece of paper. I then moved my head around the paper and marker, making sure to keep them both still. What I saw was that the radiosity did not change as I moved. In other words, diffuse light did not change as the view point changed. The reason I did that was because specular reflections do change as the view point changes: the reflection "deforms" (so to speak) as the viewer moves. Then I moved the marker, and the faint red on the paper moved. So, I now knew that radiosity did not change with viewpoint change, but it did change with object change. I had already known both of those things, but for some reason I just wanted to make sure. Next, I picked up one side of the paper, so that it was tilted. I noticed that although the paper moved, the red spot did not. That is not so say that it didn't move relative to the paper (which it did), but what I mean is that if you looked at the entire setup from above, looking down, the marker would always be obscuring the same part the red-spot. However, there was a change in the red spot, it merely wasn't it's position. The change was it's intensity. The further and further the paper tilted, the fainter and fainter the red spot got, until eventually, it disappeared. And the place that it disappeared at was when the paper was completely vertical. That meant that it had the same attributes as regular diffuse light from light sources! The higher the difference in angle becomes, the lower the amount of light contributed becomes! After that, I set the paper down, and then started sliding it, while keeping the marker still. What happened was that the red spot stayed the same relative to the marker, which confirmed what I had discovered by tilting the paper. I made the following definitions:
And with those definitions, I came up with the following rules:
And to think, I would have gotten no where if I had used the marker and paper to write out algorithms!
|
|