Jump to content
  • Advertisement
Sign in to follow this  
Heodox

Lightmap Generation

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

Hi, I'm trying to implement light map generation into my game editor, what you can do with editor is basically position a bunch of objects around. As I'm currently seeing it the light map function would take parameters for light map size (width,height), and put all the scene geometry's texture coordinates on that map (or actually add a second texture component for the light map texture coordinates for geometry), and make a 2D array witch holds texel(lexel) real transformed position in the world, than that would be used to calculate light, etc. (also, all geometry are triangles) I have two questions: 1. How would I fit all those model texture coordinates on the map? (The could just be put on the map as they go along, but I don't think that way would be to efficient) 2. How to calculate real position of lexel? (I devised a formula, that used known 2d texture coordinates and a point in texture with 3d points of polygon, it worked for some cases, but fails for the rest)

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!