Sign in to follow this  
Aghis

Lightmapping principle

Recommended Posts

Aghis    144
Hi everyone. I am currently implementing a lightmapper and find my self in need of advice. I use the planar mapping technique for the transition from world space to plane space coordinates and group each object's faces into 6 categories : 1) Those with normals closest to (1, 0, 0) 2) Those with normals closest to (-1, 0, 0) 3) Those with normals closest to (0, 1, 0) 4) Those with normals closest to (0, -1, 0) 5) Those with normals closest to (0, 0, 1) 6) Those with normals closest to (0, 0, -1) I then build a lightmap for each one of these groups. What I want to know is if this is the correct way of lightmapping. I have read a lot of obscure tutorials / threads on this subject and there is a recurring theme of "building a lightmap for each polygon". Could it be that the face groups I have mentioned above are meant by the word "polygon"? If not, then what is? Thanks in advance.

Share this post


Link to post
Share on other sites
Fingers_    410
You shouldn't have a lightmap per polygon, but instead group as many connected polygons (facing the same way, with the same texture) as possible into each lightmap. This will help eliminate lightmap seams between them. For example consider a flat wall with a hole/window in the middle... The wall is built of several polygons but it'll look best with a single lightmap. IIRC Quake did something like this for co-planar faces (the term "surface" referred to a group of co-planar polygons sharing a texture & lightmap). If you group faces that aren't strictly co-planar you'll get a smooth, rounded appearance which may or may not be what you want.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this