# help on shadows and basic math

This topic is 4106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i dont know if i'm posting at the right place , so if not i am sorry . The PROBLEM : I want to create a basic shadow effect in the engine that i have created . so i looked everywhere and every place i looked said the same thing : that i need to create a "projection shadow matrix". in order to create a projection shadow matrix i need to find an equation of the ground which is : AX + BY + CZ + D = 0 . and i have no idea how to find the equation . I Have Set up a light source named lightpos which is a GLFloat array of 4 . GLFloat LightPos[4]. and i have a ground that i have builded which a square with the position : (-3,3,0) (3,3,0) ( 3,-3,0) (-3,-3,) . know i have no idea how to find the equation because on all the book and sites that i have read about it it says that after finding the equation i neeed to do a set of basic calculation , and after that i will receive the projection shadow matrix . Any help will be usefull !!!

##### Share on other sites
Hi!

There are many way to render shadow, each have their own pro and cons...
First have look there :

I think what you want to do is called planar shadow, basically it's just a projection of the mesh on a plane.
Here(Vertex projection) you can find how to compute a projected mesh (without a projection matrix, but it seems to me pretty straigh foward, just a few linear algebra formula).

I hope this helps ;)

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 11
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633721
• Total Posts
3013532
×