2
\$\begingroup\$

I'm trying to bake lightning in the simple scene with some imported geometry. The result is weird seams near the edges of the meshes even there is no free space between them. How to avoid it and just simply bake that lightning? This is just something that should not be. enter image description here

enter image description here

\$\endgroup\$
3
  • \$\begingroup\$ It looks like your imported geometry is a collection of squashed & stretched cubes - is that right? So you have additional faces inside the walls where two such cubes meet? \$\endgroup\$
    – DMGregory
    Sep 2, 2018 at 15:33
  • 1
    \$\begingroup\$ Generally yes, it is. But i made some copies of the house where i deleted faces that look into each other inside the wall. It didn't help that much. \$\endgroup\$ Sep 2, 2018 at 15:36
  • 3
    \$\begingroup\$ It's not a matter of faces inside of walls, deleting them won't help. You need to join separate faces creating one wall, so they share their vertices. This way your baking code will know which faces are connected in your mesh, so it will make them connected in UV space, to avoid seams. \$\endgroup\$
    – kolenda
    Oct 19, 2018 at 9:27

1 Answer 1

1
\$\begingroup\$

It's hard to tell without more information about your models, but my suspicion is that there is an issue with the normals. Normals are vectors that are used to describe to the lighting system what direction the the edge/vertex is pointed. You can think of it as an arrow that is pointing from the flat surface outwards. If the vertices/edges don't share a normal, even if they share a position, then as far as the lighting is concerned, those 2 adjoining faces are pointed in different directions.

Imagine you have a sphere that you've made out of triangles. Your "sphere" consists of a bunch of flat faces that are joined together. To make it look "round", where 2 of the those flat faces meet, they should share a normal, and that normal should point outwards from the sphere at roughly the average direction that the 2 flat surfaces are pointed (so if they are 90" apart, one at 0", or horizontal, and the other at 90", or vertical, where the faces meet, the normal should be pointed at 45" to generate a smooth looking surface. Clearly, if you're making a sphere, you wouldn't have 2 faces 90" apart, but it's easier to describe this way).

Now, let's say you wanted to make something out of flat faces, but you didn't want it to look like a sphere. Instead, you wanted it to look roughly like 100 sided dice, so it consists of a bunch of flat planes in a roughly circular fashion. In that case, you wouldn't want the edges to share a normal. You would want each vertex to have its own normal, so that you would get a hard edge between the faces.

In the picture you posted of the interior of the house, the vertical lines above the doorways are probably not sharing normals between the 2 flat wall surfaces. Instead, there might be some interior surfaces that the edge is sharing a normal with, but that's not the normal you want, since it won't point directly away from the face, but out at an angle.

On the other hand, your ceiling looks correct where it joins the wall. That's a hard edge. You wouldn't want the edges where the ceiling hits the wall to share a normal, if they did, you wouldn't have a hard edge anymore, but it would look smoothly colored between the ceiling and the floor, disguising the hard edge.

I'm not sure what modeling program you're using, but most modeling tools will have a setting to display the normals. Turn that on, and you'll see a bunch of arrows pointing out of each vertex in your model. Where you want a smooth edge, you'll want to make sure the normals between two joined vertices share a normal. Where you want a hard edge (such as the ceiling and the wall), you'll want them to have separate normals.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .