lightmap seams

Started by
3 comments, last by edwinnie 20 years, 8 months ago
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
Advertisement
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?
hmm... i am using face normals...
hmm... how do u actualli make the vertex normal radial?
is there a math forumla to it??

thx fer replying
Edwinz
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]
doesn''t the unreal engine got the same problem?

This topic is closed to new replies.

Advertisement