Static Meshes from BSPs won't light

Hi guys,

Can anyone help me with a problem I’m having lighting some static meshes made from BSPs?

I don’t have access to Maya or 3DS and so I created some simple objects by combining Additive and Subtractive brushes using the ‘Create StaticMesh’ button.

I’m now finding that whenever I build the lighting on these objects they don’t take any light and turn black. They appear fine in the Editor until the lighting is built. But, the end result isn’t right and the objects remain black until I move the light again in the Editor. Every time I rebuild the lighting, the return to being unlit.

(For the purpose of showing the simplest possible example of the problem I’m replicating my steps here, but using blocks.)

Preview lighting…

After lighting build…

Both the staticmesh and the lighting are set to static. However, I am noticing that the combined block object has 2 materials elements.

75986-lighting+test+block+settings.jpg

Could that be the problem?

Any help would be much appreciated, as this is driving me mad!

Thanks,

Mike.

Hi ellismonster,

When converting BSPs to static meshes, if you have multiple materials being used it will create a material element for each material being used. This is not going to be an issue when baking the lighting.

However, when the BSP is converted to static mesh it will setup the Lightmap UV, but it will not assign it automatically. This is left solely to the user to setup and use properly.

If you open the Static Mesh you will see the Panel on the right. Under the Static Mesh Settings you will need to set a Lightmap Resolution value (default I think is 4, which is too low for most objects) to something like 32, 64, or 128. You can try higher values if you need if the shadow quality is not good enough.

The last thing you’ll need to do is assign the UV Channel 1 (lightmap UV) to be used for the light bake. In the advanced rollout you’ll see Lightmap Coordinate Index. This is set to 0 by default, so it’s using the texture UV as the lightmap UV, which will produce overlapping shadow artifacts. Set this to 1 and it’ll use UV Channel 1 for the lightmap, which should not have any overlapping UV layouts so that you get a proper light bake.

You can also see this visually in a troubleshooting guide I wrote a while back here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

I hope this helps.

Tim