Confused about UVs, static mesh is completely black

Hey guys! This is my first post on these forums. I’m working on my first Unreal project but I’m having an issue with a static mesh I created. I made a blueprint for a lift that has three meshes: one small square platform and two larger platforms with a square hole cut in the middle. Basically the small platform rises up and acts as a lift, while the two larger ones act as floors. The lift goes through the hole in the floor and stops, letting the player get on or off.

The thing is, I’m not used to making uniquely shaped static meshes. For the lift, I simply took a cube mesh and flattened it so all the UVs were already properly added. The floors though I created in UE4 using two paintbrushes and when I converted them into a single static mesh, it started to act strangely. Besides the fact that the collision was gone (which I already fixed) I noticed that no light was hitting it and the mesh was completely black.

Here is a picture of the UVs for this static mesh:

I’m pretty sure it’s an issue with the UVs, seeing as I didn’t really set anything up. I don’t understand modelling yet, and when I see these UV templates I have no idea what I’m looking at. I thought that I wouldn’t have issues with my meshes as long as I kept them as simple shapes, but I read somewhere that meshes with holes in them require extra work.

Channel 1 is the result of clicking “Generate Unique UVs” in the Window tab. I’m guessing that Channel 0 isn’t supposed to be red? But I’m not really sure what the correct thing is. Am I supposed to draw my own UV map or could I somehow fix it automatically through the program? Am I supposed to use another software to do this? It just seems like too simple of a shape to be bothered with another software, but again I don’t quite know what I’m dealing with.

UV Channel 1 is fine for Lightmaps, but Channel 0 is all over the place and overlapping. Which is to be expected if you didn’t unwrap it at all.

You’re best of using a 3D modelling program for this sort of thing. You could auto-generate UVs for channel 0 in Unreal for now (I think) though.

UV maps are essentially taking a 3D mesh and visualizing it in 2D.

I’m sure you made cubes from “nets” in school. The net is essentially the UV map. Another way to see it is taking an animal and skinning it to make a rug.

Net example HERE

Welcome!! :slight_smile:

You will have to create a 2nd uv channel + proper lightmap for your mesh

in blender:
in the UE4: click onto your 2nd uv channel in your static mesh editor under generate unique uv and then generate new uvs onto the 2nd channel (wont work in all cases)

@ Kenomica

I used the auto-generate for Channel 0, but now it’s an exact copy of channel 1. It did remove the issue of turning pitch black, but the shadowing is not quite right:

It’s not terrible except for the weird shadow pattern on the bottom right. The same mesh at a different location has a similar problem. I suppose if there is no way to fix this in UE4 I could go to Blender, although it seems odd considering I made this shape using two cube brushes in UE4. Would I be better off remaking the entire mesh in Blender?

Go into the static mesh properties and change the lightmap resolution to e.g 128 + add a lightmass importance volume + rebuild the light

Just remake the mesh with two brushes again, and before converting them to a static mesh, set up the UVs–as opposed to, obviously, converting it to a static mesh and then UVing it. You shouldn’t get that error in the corner (which is probably a case of overlapping faces in the uvs uee4 made), and then afterward it’s still going to wind uo being a static mesh.

@

Thanks for the tutorial! I’ll definitely check it out. But for the shape I’m working with, do I need to use blender?

I tried this and it seemed to work well for the second channel, but I think the first channel is still messing it up. What can I do with the first channel in UE4 to make it work properly?

Nothing :stuck_out_tongue: because the first channel is for the textures (uv maps -> so not the lightmap) so you will have to fix it in blender. Normally the problem on the picture can be solved with a higher lightmap resolution + light build + lightmass importance volume

I remade the shape with two brushes, but how do I correctly set up the UVs from there? I see the options under Surface Properties that relate to UVs but none of the settings seem to be causing any problems. At the moment if I build and run the game, the lighting on the mesh is perfect, exactly the way I want it. Why when I convert it to a static mesh does the lighting get messed up?

For anyone wondering, this is the type of lighting I’m looking for:

This picture isn’t showing a static mesh. It’s two box brushes creating that shape, and when I build the lighting everything looks great. The reason I want to make it a static mesh is so I can use it in a blueprint, but as soon as I convert it, all of the nice lighting disappears and the entire mesh turns black. I feel like I shouldn’t need to use Blender to fix this, since it already had the desired effect before it was converted.

  1. do you get any warnings when you build the light?
  2. have you already tried the steps that I have posted above? :slight_smile:

Alright so I got it working, I think:

I remade the mesh, but I set up the UV channels a bit differently. I clicked “generate unique UVs” like last time and made a lightmap for channel 1, and then did the same for channel 0 except I clicked the “layout using 0 channel” option. This created a slightly different uv map and now it looks like it’s working. The one thing I noticed is that the texture pattern is a bit off, if you look closely at the picture you will notice. But for a basic platform that’s fine, if I decide later on that I want to update it I will probably make a new one from scratch using Blender.

I do have one more question though. Creating this mesh using box brushes didn’t seem to be the best idea…so what types of meshes would I want to create in UE4? Should I just create all of my meshes in Blender or are there certain shapes that would be much easier to do using UE4’s brushes?

BSP brushes are mainly used to block the player from areas (so for simple geometry)

https://answers.unrealengine/questions/47834/in-which-case-a-bsp-geometry-is-expensive.html

“BSP geometry is essentially for blocking out your level and then replacing it with static meshes later on.”

Ahh ok, that makes a lot of sense. So eventually I should change all of my geometry brushes into static meshes?

When it is just a simple level with few static meshes, I wouldn’t replace them. Otherwise ,when you want to use them in blueprints or when you need a good performance, you should use static meshes

Alright, you! I think my main problem is that I need to get over my fear of 3d modeling software haha. I was hoping I could get away with making everything in UE4, but I guess it’s finally time to dive into Blender.

I think I hit the same problem, solving this by change “Light map coordinate index” to “1” in static mesh editor.

@Sibe07 's tip still works as of UE 4.26. It indeed prevents static meshes created from brushes to turn black after light building.