Jump to content


Basic Terrain Engine Lighting Problem


1 reply to this topic

#1 dirk102

    New Member

  • Members
  • Pip
  • 1 posts

Posted 15 August 2007 - 12:49 PM

Hello there.
I'm working on a terrain rendering engine but my lighting isn't working right.

I've posted two screen shots, one with texture, one without, and one without any specular lighting.
My Light position is set to -50, -30, -50 which is around where the camera is positioned.
The light effects sort of look like they're coming from the correct position but they're all over the place.
Does this look like a problem with my calculation of normals or what?


http://img236.images...121/img1jr1.jpg
http://img90.imagesh...324/img2iy9.jpg

Thanks!

\0

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 15 August 2007 - 04:22 PM

Looks like the normals aren't smoothed. You should set the normal at each vertex to the normalized sum of the normals of the faces it touches.
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users