• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

3d angles

Status
Not open for further replies.
Greetings everyone

I decided to continue with this project. I know that there is libraries out there to help me but I want to create my own one mostly for the fun of it and to get a better understanding of how it works. :p

I'm currently stuck on applying light to a surface. I want to create a light source at a target location and make nearby surfaces brighter according to the angle between the light source, surface and camera. Can anyone please help me out with the math to do it?

Anyway here is a new version of the program :D - needs MS visual studio '10+ to compile.
 

Attachments

  • 3D_Engine.zip
    118.6 KB · Views: 55
Oh.. that XD... the ToScreen function in the camera class is responsible for that. It is logicly accurate imo. I believe it's because the screen is narrower than your actual eyesight, therefore everything is "compressed" in the center so you can see a wider area on a not-so-wide screen. I'm not sure how some programmers fixed that though. This can be countered by tweaking the Z-factor.
 
Status
Not open for further replies.
Top