Sign in to follow this  

help on shadows and basic math

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Hi!

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

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 ;)

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this