Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Calculating LightMaps....

This topic is 6929 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

Hej Justin,

Smooth gouraud shading for example:
- Calc a normal for every vertex
- Transform pos of lightsource from worldpos to objectpos (this is the tricky part...use inverse matrix transformation)
- for every vertex: calculate the angle between two vectors (vertex normal and vertex/line drawn from lightsource and vertex). To calc this angle use the dot product.

There''s also phong mapping:
- Like projecting x&y screen coords: project the x&y of the vertex normal to the lightsource (not the screen).
- interpolate like a texture
- Use a phong map (like a texture) to calc the intensity.

This is a verrrry compact explanation,
Hope it helps,

(For more info: baskuenen@hotmail.com or check out my homepage: www.baskuenen.myweb.nl (my 3d engine with some 3d tutorials)

Share this post

Link to post
Share on other sites
Cool! Thanks alot guys! I should be able to calculate it now in my map editor. Thanks again!

Justin Eslinger
"Quell - to kill, to torment, to reduce into submission"

Share this post

Link to post
Share on other sites

  • 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!