fenris
03-24-2000, 02:53 AM
Ok. Here's the situation. I have a surface and a point. The point represents a light. The light has a radius, color and intensity value. The intensity value of the light is anywhere from 1 to 0, 1 being full intensity, 0 beign totaly dimmed. The color is just an RGB val used to multiply color components of the light map. My question is, how can I determine the light's point of impact on the surface's plane, and generate a radial lightmap based on the distance of the light from the surface, the radius and the intensity values? I beleive the point of impact is (in pseudo-code):
impactx=light.origin.x - plane.normal.x*dist
impacty=light.origin.y - plane.normal.y*dist
impactz=light.origin.z - plane.normal.z*dist
where dist is:
dist=dotproduct(light.origin,plane.normal)-
planedistance(light.orign)
But I think this may be TOTALY wrong, but it seems right. Anyone have any ideas? Any online docs explaining the same, or near the same situation? Any help on this would be great! http://www.opengl.org/discussion_boards/ubb/smile.gif
impactx=light.origin.x - plane.normal.x*dist
impacty=light.origin.y - plane.normal.y*dist
impactz=light.origin.z - plane.normal.z*dist
where dist is:
dist=dotproduct(light.origin,plane.normal)-
planedistance(light.orign)
But I think this may be TOTALY wrong, but it seems right. Anyone have any ideas? Any online docs explaining the same, or near the same situation? Any help on this would be great! http://www.opengl.org/discussion_boards/ubb/smile.gif