PDA

View Full Version : projected shadows problem



Ray14324
01-01-2011, 11:36 AM
hello, my situation if the following. i have a model stored in an .obj file and I have to draw shadows on it using the projected shadows method . My problem is the following: I don't know the 3 coordinates in my scene (where the object appears) in order to create the plane and then using the light position to create the projection matrix for the shadow. Simply using 3 vertexes(I have a function that gives me the plane from the 3 vertexes) from the object does not work. Translation , rotation and scaling occurs in the scene in order to correctly position the object. Must I take these coordinates and apply these transformations on the manually in order to find the correct 3 vertexes, or is there some other way for me to get the correct coordinates ?. I am using the modified glm for importing the object into the scene. (my IDE is visual studio 2008)
I apologize if I have not written in the correct section and for any other mistakes that I have made.
Thank-you.