Proving the projection shadow matrix
Hi,
I''m sure everyone is familiar with the shadow-projection matrix. It can be found in OpenGL game programming or at the following website: http://www.sgi.com/software/opengl/advanced96/node46.html
However, I''m having difficulties in arriving this matrix equation. Can someone show me the mathematical proof to get the exact matrix formula?
Thanks.
p=l-(d+n.l)/(n.(v-l))*(v-l) where p is the projected point, d is d for the plane you are projecting upon, n is the normal for that plane and v is the vertex being projected. It isn''t quite the same matrix in that I don''t see d in the matrix you referred to. This is for basically the same matrix except d is added to each entry on the diagonal. Don''t ask me to explaing it since I just copied it out of Real-Time Rendering.
Keys to success: Ability, ambition and opportunity.
Yes I''d also like to know a scheme with which I can transform a formula like the shadow projection into a matrix.
Gero
Gero
There isn't any magic to it. If you expand it out for one component, for example x, then you get ((d+ny*ly+nz*lz)*vx-lx*ny*vy-lx*nz*vz-lx*d as the numerator. That is pretty straight forward to factor into a dot product with (vx,vy,vz,1). To normalize a homogeneous coordinate you divide through by w so the w component has to be the denominator after the matrix multiplication. The denominator is -nx*vx-ny*vy-nz*vz+n.l. That is similarly easy to factor into a dot product with (vx,vy,vz,1).
[edited by - LilBudyWizer on June 14, 2002 12:59:47 PM]
[edited by - LilBudyWizer on June 14, 2002 12:59:47 PM]
Keys to success: Ability, ambition and opportunity.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement