Advertisement Jump to content
Sign in to follow this  

Lightmap Generation

This topic is 3964 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
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!