Hello
I've been having this problem with this modular floor system and lightmass for a very long time. I've simplified the scene significantly for the sake of this thread.
These floor tiles are perfectly square static meshes, 192x192 UU. They have four subdivisions both horizontally, and vertically.
It has a perfectly square UV, with no seams; it even has a separate lightmap UV with no seams. The lightmap UV resolution is 64. The scene is also rendered with production quality lighting.
In the image I have attached, each tile is scaled to .99 percent, so they are not contacting eachother, in addition it is a screencap with detail lighting enabled, so you aren't seeing the diffuse.
As you can see, there are two problems: Tiles further away from the light are darkened entirely - instead of having a smooth gradient from light to dark, the further away the tile is. the entire tile is shaded darker - almost like each tile is a single pixel, in a rough gradient.
The second, and more pressing problem is the rotation issue... some of these tiles are rotated at 90, 180, and 270 degrees - causing the tiles to have completely different lighting, based on where the camera angle, resulting in the terrible patchwork appearance you see.
The regular material for the tile has diffuse, specular, emissive, and normal maps. At first I thought the problem was being caused by rotating the normal map - but as I peeled away the layers, and simplified the material and mesh, I found this problem to exist, even when there is a simple diffuse alone.
We are using modular tiles, which must be rotated occasionally. (For instance, a floor that has a certain detail across one edge.) Even using a solid bsp doesn't seem to fix the issue.
Replies
http://www.polycount.com/forum/showthread.php?t=94585
I gave it a reasonable read, but I didn't examine every comment. I'll go back and see if I can find anything more useful in it.
The problem seems to be originating from nothing other than the rotation of the tiles... remember, those tiles have nothing but a material with a diffuse applied, no normal, emissive, or specular.
The UE3 can't do simple flat tiles without breaking the lighting? I realize that Epic has special workarounds for this problem (Namely bsp with static meshes covering problem areas) but surely I'm not the only one who is trying to do a material other than roughly hewn stone!
This problem essentially ruins the ability to make modular, clean tilesets (Or basically anything that isn't the grungy/industrial look that is in most of Epic's video games.)
But I do agree that lightmass isn't that stellar when you know its limitations
I suppose there is just no way to have a clean sci-fi floor in the UDK, beyond a flexible, simple, tile-able texture?
The issue with static meshes is the orientation of the UV's. If you want to rotate them they all need to be set in the same direction with multiple copies for each 90 degree rotation.
Then you can just use a rotater in UDK to rotate the texture for each 90 degree version of your mesh.
Likewise, is vertex lighting defualt? How do you enable or disable it? As far as I can tell, I haven't changed anything, so if vertex lighting is enabled by default... then I am using it.
As there any chance I could use a combination of append, rotate and power to disassemble rotate and reassemble the normal map -inside- of the material to make rotated versions? Would that even be more effective than just having separate normal maps?
If you want to simply turn it off you can do that in the 'misc rollout > allow lightmap specular', you don't need to unplug the specular input.
Ya you don't need to use more then one normal map, as long as the UV's are correctly rotated on each mesh then you can do w/e inside UDK with your normals.
Disabling your specular input will only turn off the real time specular, leaving the lightmass specular on.
Dave how about you upload that file so i can take a closer look what's going on?
As long as you run lightmass and have static light then your are pre-computing lightmass specular. The only way to turn it off is in the misc rollout > allow lightmap specular.
first one i disabled lightmass to see if that effects the specular in anyway, it didn't. the second image shows one i have disabled allow lightmap specular, and the other i have just simply unlinked the specular node. they are both the same results.
I don't know how you have it setup or if you simply viewing it from the wrong angle. Sections 1 & 4 have lightmap spec disabled 2 & 3 have it on, none of them have any thing plugged into spec.
Does anyone know if this is true, or are we simply doing something wrong?
For example here is my floor, with lightmass specular giving an obvious seam:
And here it is after moving the floor a bit (to cancel it's lightmass effect). The specular is so much nicer, and accurate to the scene's lighting instead of being over to the left like before:
I'm going to try disabling lightmass specular on my entire scene, and try using dynamic lights (specular only) to get the proper specular in my scene while still having the lightmass shadows/ao. If not, then I'm stuck... cubemaps maybe?
**Edit** - Same thing with normal map off, just in case anyone was going to ask: pic here
Static meshes need to have a fixed orientation on the UV's.
There are only 3 real fixes to this.
A. Have proper UV orientation with rotated meshes / normal map for BSPs.
B. Use completely dynamic lights
C. Turn it off
Pre-planning your orientation is really the easiest
In udk do you just never rotate a static mesh that will be baked?
Each static mesh will need to have it's UV's rotated in 90 degree increments, so you will have a max of 4 static meshes per modular piece(or less depending how much it needs to be rotated).
It's ok to rotate static meshes you just need to be aware that this will crop up on modular pieces that are going to be adjoining and have high specular values.
That's fine if you have nice square tiles, but look at my model and UVs...
Obviously it's going to be extremely difficult to position them correctly so that when I rotate in the UVs in UDK they move into the correct places. Is that basically what I've got to accept and live with, or am I missing something?
Would probably be quicker to set up the entire scene in cryengine than the entire day or 2 I've spent wrestling with these (poorly documented... hello Epic?) issues.
@Phrexeus
Basically yes but you can't rotate the UV's inside UDK it has to be done in w/e software you use. UDK for what ever reason won't respect to rotation so it has to be imported in with the UV's rotated.
In max it's easy to do with the UVW xform, make sure rotate center is on. Then you can just use a rotator parameter in UDK on a master mat since it's all the same texture.
Ya really need to be aware of this ahead of time so you can compensate with your textures, it's hard to fix down the road. You could break off all the pieces that have matching orientation into different groups, it would be really hacky but it would work.
edit:
Thinking about it more you could use a whole different uv set to define the texture. So have UV channel 3 for the texture and make the proper correction on UV channel 1 to define the lightmap specular(since it always defaults to channel 1). Obviously not ideal since it's upping your vert count but more elegant then hacking things apart.
Anyway it won't work in this case where the desire is to have the normal map rotated with the model... If I can free up some time tonight or tomorrow I'll look into it if nobody finds a solution.