Jump to content
  • Advertisement
Sign in to follow this  
Darkverve

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.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!