#### Archived

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

# lightmap seams

This topic is 5479 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

ok! i managed to get lightmap working slightly fine for the sphere and cylinder... now one problem: there were "seams", so how to get rid of them?? the pic where the cylinder and sphere show seams: problempic need some advice... Edwinz

##### Share on other sites
How exactly are you calculating the light maps? If you''re doing it per face using face normals, then you''ll have this kind of result. Maybe use vertex normals instead of face normals when computing cylinder lightmaps, and make those vertex normals radial?

##### Share on other sites
hmm... i am using face normals...
hmm... how do u actualli make the vertex normal radial?
is there a math forumla to it??

Edwinz

##### Share on other sites
quote:
hmm... how do u actualli make the vertex normal radial?
is there a math forumla to it??

Sure there is. You have the points for the vertices (x,y,z) right?

So the normal, call it N is a vector pointing from your vertex V to the center of the sphere C.

                    _   _   _In vector notation, N = V - CWhich translates to...Nx = Vx - CxNy = Vy - CyNz = Vz - CzThen you just need to normalize N (scale it down so its length is equal to 1.0, without changing its direction).  All you do is divide N by its length:N  = N / |N|  which really means...Nx = Nx / sqrt( Nx^2 + Ny^2 + Nz^2 )Ny = Ny / sqrt( Nx^2 + Ny^2 + Nz^2 )Nz = Nz / sqrt( Nx^2 + Ny^2 + Nz^2 )

Realize that I said V - C. It could be the other way around depending on your coordinate system. If your normals are all pointing the wrong direction (inward instead of outward), swap the V and the C in the above equations.

[edited by - bob_the_third on August 19, 2003 2:45:16 AM]

##### Share on other sites
doesn''t the unreal engine got the same problem?

1. 1
2. 2
JoeJ
20
3. 3
frob
16
4. 4
5. 5

• 10
• 10
• 11
• 13
• 9
• ### Forum Statistics

• Total Topics
632196
• Total Posts
3004718

×