Archived

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

edwinnie

lightmapping of spherical objects

Recommended Posts

ok! i did have planar lightmapping working well for cuboid objects somehow it looks rather weird for spherical ones. i am wondering how u do it? i am lightmapping one whole group of polygons that share connectivity and same planar axis...currently. need some helps! thx! edwinz

Share this post


Link to post
Share on other sites
screenshots of the problem has been added:
problemshot

ignore the 1st & 2nd shot,
the 3rd screenshot shows the sphere when lightmapping is set on
individual polygons.
while the 4th screenshot shows what happen when i group the polygons based on connectivity and normals of <5 degrees.

one other thing: i did a clamp at stage 1.

any ideas??
thx!
edwinz

Share this post


Link to post
Share on other sites
thx fer replying!

u mean when i am grouping the polygons, i should group the polygons with similar vertex normals?

currently, i am grouping them using face(polygon) normals.

edwinz

Share this post


Link to post
Share on other sites
quote:
Original post by edwinnie
thx fer replying!

u mean when i am grouping the polygons, i should group the polygons with similar vertex normals?

currently, i am grouping them using face(polygon) normals.

edwinz



Keep it how you have it. It doesn''t make sense to group triangles by vertex normal.

What you must do is make sure the vertex normals are calculated *before* splitting into planar regions, and they''re not touched afterwards. ie, the vertices along the edges between planar regions have identical vertex normals. Also, for this to have an affect, the lighting calculations must use the interpolated vertex normal (the face normal shouldn''t be used in the lighting calculations).

btw, you will always get seems along region edges due to different uv mapping on either sides, unless you post-combine the edge texels in each region. ie, force the texels to be equal. This will still give you different artifacts though (thick coloured band).

HTH

Matt Halpin

Share this post


Link to post
Share on other sites
thx fer replying!

hmm..the vertex normals are correct and i used cross product to calculate the face normal... i think there is a newwell''s method but vertex lighting works fine so far...

hmm... how to acutalli force the texels at the edges to be equal??

edwinz

Share this post


Link to post
Share on other sites