Strange Shadows?

Hi,
i’ve been doing some tests to create a tiled carpet however when I build the lighting I get a really bad shadow effect. Im using a second UV set for the light map so I cant see why this might be happening.

Any advice would be much appreciated,
thanks.

Does your second UV overlap at any location? If it does, then that will cause shadow artifacts like this.

The UVs do overlap on channel 0 however on channel 1 (light map) they are not. I cant understand why this might be happening.

You can check if it’s lightmass by switching the light in your scene to dynamic. If it fixes the problem then you know it’s an issue with the shadow map. (possibly resolution)

If dynamic has the same issue, it’s a problem with the mesh itself.

Thanks for your comments. I was able to fix the issue. What your seeing in the images is a really small shadow map and also the mesh being cut up every time it tiles, which UE4 had issues with calculating the placement of shadows. To fix it I connected the mesh better together inside the second UV channel and turned up the resolution of the shadow map. Thanks again.

ahh I didn’t know it was a tiled static mesh. If it’s actually tiny pieces all put together you might want to look into instanced static meshes as it will help performance in a huge way.

Glad you fixed your problem too :wink:

Dam, I spoke way too soon haha. Okay so the problem of the shadows looking like blobs is fixed, however I still have the issue of the shadows repeating themselves on the mesh. But this should not happen? UV set 1 (shadow map) has no overlapping UVs (seen in images). I hope you can see what ive tried to do? note that the mesh is really dense as these objects were very quick tests for the whole scene and will be remade.

How do you make instanced mesh? would be really useful to know. Note that the mesh is not instanced and is mesh tiling on the y-axis, I intend to connect the mesh together and use a tiling texture across them.

Try a little more padding in the lightmap UV.

Thanks for your comment however image “untitled 3” showing the light map i feel has a enough padding for this quick test. However this would not explain the duplicating shadows.

its a box or a plane?

Maybe there is some geometry overlapping. if its a box, try to make it a little more thick. and see what happens.

nope, it should not matter.

maybe you can upload you object and i can try to reproduce the issue.

Its a plane. There is overlapping uvs on the 0 channel (not shadow). Should that matter? i was just making use of textures being reused.

Just to come back to this, It looks like you have your lightmass texture 3 times. Should there not be 1 (maybe 2 if it’s a box) large planes of geometry in UVChannel1? It looks like each on is 18x22 so 396tris. One for top one for bottom. not sure what the third one is for.

For instanced static meshes you would create a blueprint and add instanced static mesh components for each mesh that would be spawned. Then in the construction script set it up to spawn multiple meshes and position them. I thing the twitch stream on level generation from this January covered them I suggest you look at the past broadcasts on that. http://www.twitch.tv/unrealengine/b/607904954

Thanks for your help but I think the problem fixed itself when I remade some of the mesh and re-imported it. I wish i could explain how this was fixed but I really dont know.

Thanks for your help Justin but the problem fixed itself when I remade some of the mesh. Ill definitely spend some time looking into instances, thanks for the link. Just to explain the mesh is a plane that has three layers to it. To try and make the carpet have some depth ive done this three layer mesh with an alpha. Then the mesh and texture tile. All of this is done when the mesh is straight and then i use the soft select in max to make it look like it has been pushed about.