Hey, all. I recently finished an environmental asset - a silo structure. It's little more than a cylinder. The uv's for the textures are mirrored left/right. The uv's for the lightmap, obviously, are not. When I put it into unreal it looked fine.
Until I baked lighting, when I got a gigantic lighting seam right down the line of symmetry.
Now I wasn't sure what was causing it, but I figured it was either the model itself or the textures. So to check the model I hit "Lighting Only", and sure enough it looks fine.
EDIT: ACTUALLY THERE IS STILL A SEAM, IT's JUST VERY SUBTLE - LOOK ON THE SIDE OF THE SILO.
But then, to be sure, I applied a neutral material to the model (.2 diffuse & specular, no normal map), and went back to "Lit" mode, and this is what I got:
So now I don't know whether the problem is with the model, the texture, or even the uv's. The uv's should be fine. As I said, they are mirrored for the textures, but the lightmap UV's don't even have a seam there.
Other things I've checked: Explicit Normals import option is checked, Object Normals are correct (checked in maya & UDK), Lightmap IS using uv set 1, Normal Map green channel is correct, and the baked lighting map even looks correct.
Does anyone know what's causing this seam, and how to get rid of it? It seems pretty ridiculous that simply mirroring a texture would cause such an enormous lighting error, I feel like I have to be doing something wrong.
Replies
Also, what version of the UDK do you use ?
I'm currently using the October 2011 and I have noticed some normal seams artifacts event with smooth normal on FBX models.
http://udn.epicgames.com/Three/LightMapUnwrapping.html
I've run into the same thing. I think it comes from the specular, its generated using the first UV coordinates instead of the second lightmap set? Or if there is a difference between the two you get a spec seam. Or it could be that any overlap (even offset UVs) will generate a seam.
In the end I think the best thing I've found is to go with a unique unwrap with as few seams as possible across that area. Mirroring helps but it always seems to bite you in some way or another.
I'm using November '11. I checked, and this is happening on every model that has a visible line of symmetry. Luckily most of them are more subtle, but this one is pretty visible.
Mark Dygert,
Thanks for the info, it's good to know that this isn't just me being retarded at udk. I don't know if Epic rewrote the page you linked to, but it no longer mentions anything about specular.
It sounds like from now on I need to either cover my seams or hide them, no matter what type of seams they are. I'd be interested in hearing if anyone has an in-depth explanation, or even a workaround.
I think I had it wrong, it uses the lightmap UV set to generate specular, so you want the lightmap UV channel to be as contiguous as possible. I thought I tested for that on my globe but I think I just arranged all of the separate pieces uniquely and never merged them together.
So yea hide your seams well, especially for the lightmap UV. I think you can still mirror/tile normal and diffuse maps like crazy which could be good news, but watch out for the lightmap UV channel, I'll have to test it when I get a chance.
Well that's the strange thing. My lightmap uv's don't even have a seam there - check the screenshot with the uv layouts, the lightmap layout is on the right. They ARE as contiguous as I can get them. What you said the first time seems right, I just don't understand why udk would work that way.
Your UV1 and your UV2 tangents are different. Broken/rotated 90 degrees... Try rotating your lightmap uvws for the top of the canister 90 degrees and baking it again... if that doesn't fix it, try making your UV1 and your UV2 more similar.
This is a common problem, and one that many people have a hard time solving.
Did a mini tut a while back about this same kinda thing (but on the ground of someone's level... Your lightmaps are going to be bit wacky if you rotate/flip uvws around. This kind of thing works well for characters because they're dynamically lit 100% of the time. Not so much on static env props.
If i'm wrong, someone will surely point it out ...
Cheers and good luck mang,
D
They both show a lighting seam, even with only a neutral material (no normal map) applied.
To be explicit, the silo on the left has the uv seams rotated 90 degrees, so that the seams are vertical, not horizontal. The silo on the right has the lightmap uv's at the same angle as the texture uv's. The material applied is a neutral grey material (.2 diffuse, .5 specular, 10.0 specular power).
I poked around for a way to force specular to use the lightmap UV channel but couldn't find an option for it, but there might be some trick I don't know about. It seems pretty limiting to not be able to mirror normal maps like that thanks to the specular going fubar =/
In uv1 (lightmap uvs) you need to break apart and space out any bits that are mirrored in uv0.
I'm not sure baked lighting specularity is attached to the normal map uv's, I think it might just be attached to uv set 0, no matter what you do. To test, I changed the material and gave it a neutral (127,127,255) normal map, assigned to the lightmap uvs. If baked lighting specularity uses the normal map uv's then that should make it use the lightmap uv's. But there is still a seam.
So then I thought "well maybe baked lighting specularity uses whatever uvs the spec map is attached to", so I hooked up a flat grey texture to uv set 1. If anything, that made the seam look even worse.
The workaround, as far as I can tell, is to
1. Only use mirrored uv's on non-contiguous geo (ie mirror a car's tires, but not it's hood)
2. If you can't do 1, then at least hide the mirroring seams
3. If you can't do 2, then cover the mirroring seams with geo.
Still, it'd be cool to know if there's a fix, or at least an explanation.
Tried what you said, problem persists. All the seams are running vertical. All pieces that are mirrored in UV0 are spaced out in UV1.
You are a god among men! That fixed the problem.
It looks like Indirect Normal Influence Boost is a feature intended to improve the way normal maps look under indirect lighting, at the cost of increasing normal map compression seams and (apparently) baked lighting seams.
Thanks very much, Calypso75!
I wound up simply covering the seam, by the way
But at least now I know WHY it happened, and how I can fix it in the future.
Setting Indirect Normal Influence Boost (INIB) to 0 is NOT ENOUGH to fix all the problems!
In this picture are two cylinders, which are completely identical except that the seams in the left one run horizontal, while the seams in the right one run vertical. When INIB > 0, both cylinders display baked lighting errors. But when INIB = 0, only the cylinder with horizontal seams displays baked lighting errors.
Very mysterious.
does setting Indirect Normal Influence Boost to 0 have any bad effects (performance, overall visual quality)?
It looks like there are a bunch of hoops you need to jump through and mirroring a cylinder seems to have the most... Ben Apuna linked me to a few other threads about seams and a few more hoops you might have to jump through.
http://www.polycount.com/forum/showthread.php?p=1498164#post1498164
If that image is true and a seam can't fall on an outer edge of a cylinder, you should rotate your 12 sided cylinders 15 degrees, reset xform, and then run symmetry so the mirrored edge runs along a flat side and one that isn't contributing to the silhouette, like this:
Of course that could be just hiding the seam or minimizing it to an unrecognizable level by flattening out the normals.
The whole indirect influence thing worked since in this case the seam was being caused by the bounced lighting and not the direct lighting since a dominant light was being used. Which means the direct lighting and specular calculations were being done dynamically. However, if you light the scene with just a single point light and the direct lighting is completely baked this whole fix goes right out the window.
Who knows how much of this is a unreal problem or just simply a drawback of using light maps to figure out specular direction.
The answer is "don't mirror normal maps on static meshes unless you plan on covering the seam".
If you plan using a mirrored normal map, either mirror it in such a way that there is no mirror-seam (for instance if all tires on a car use the same uvs) or cover the seam with more geometry (like I did with my model). Or if you're super determined not to do either of those, then make it look like the inevitable lighting seam is intentional (for instance have a groove running down the middle, separating the model into two halfs).
The only way to even mitigate the effect is to add a detail normal map.
i see this is an old thread but it seems mirrored uv problems never get old. last year i stumbled upon a simple solution here at polycount. i wish i could remember the guy's name to give him the credit. anyway, try using the 0 channel for lightmap and channel 1 for your mirrored, tiled or overlapped uvs..the thing is, unreal internally uses the first channel to build the object's normal info ( or something ) and wherever you have a seam, it will be interpreted as a broken edge. the only problem i found is that when using opacity map in channel 1, lightmass doesn't seem to see it : ))