4.5.1 Select/Assign UV channel

I’ve been trying to overcome the ‘UV overlapping’ errors when building the lighting, and found some good information here and on the forums. They tell you to generate a second uv channel (which ue4 will do within the mesh editor) then assign that as the channel to use (see in the screenshot from one of the forum posts outlining this). In 4.5.1 the ‘generate uv’ box has moved into the details pane, but I can’t find the option ‘UV channel to save results to’.
As some background I’m bringing an fbx from revit>3ds(don’t really know how to use)>ue4. When I import the whole fbx I think I have it set to auto generate a second uv(ue4 just isn’t utilizing it.)

Thanks for any help you’re able to send my way!

https://forums.unrealengine.com/attachment.php?attachmentid=2690&d=1400080054

Hello ArchVizVR,

So I have simple static mesh that I converted from a BSP so I had to generate Lightmap UV’s. I took a screen shot of my static mesh within the static mesh editor with all of the options you need to get the correct results. Be sure to preview your UV’s with the proper channel selected. Set the your desired resolution, and then assign the generated UV’s to the appropriate light map coordinate index. See if you can use my image as a reference and match my settings to get the correct results.

Let me know if this resolves your issue, and if you are still having some problems I will be glad to assist you further.

Thank you,

EDIT*** After rebuilding the lighting and ‘fixing’ a bunch of the meshes with the proper settings (by changing to channel 1) an error log popped up with all of the meshes that I had already fixed. Any ideas?

(I spoke too soon see above comment)
I think that did it for me, it turned my ‘lightmap density view’ from red to greenish grey.
However, I did notice something odd, because your suggestion didn’t work for me the first time I applied all changes. In fact, all of my options were already as shown in your screen shot. I saved the mesh and exited and everything was still ‘red’. I ended up having to go back into the mesh editor, and reset ‘lightmap coordinate index’ back to 0. Then set it back to 1. Upon saving I went green.

Since I have a lot of these objects that have this issue, is there a way to set these parameters for all meshes that I import? (Nearly everything I will be importing is straight from Autodesk’s Revit)

Thanks for the help!

See above edit, thanks!

Could you show me the error message?

Here you go

So be sure for each mesh you have generated UV’s that your Source Index is 0 and the Destination Index is 1. Also whenever you press “Apply Changes” with “Generate Lightmap UV’s” it is creating a new UV Lightmap. Check to make sure you only have two “UV Channels” for your static meshes!

This error message is saying you are using the same Lightmap UV’s as your Unwrap UV’s.

Thanks again.

Also are you working in 4.4.3?

I’m working in 4.5.1, the bleeding edge haha.

When I go into the mesh editor, ‘UV channel 1’ has already been created for all of my meshes (from me checking ‘generate uv’ in the import process). So the only thing I have been doing is changing the ‘lightmap coordinate index’ to 1, and clicking save>exit.

Also, you’ll have to forgive me as I’m super new to all of this and the whole ‘UV’ terminology is still sinking into my brain. I’m unsure as to what "unwrap uv’ and ‘lightmap uv’ are. I want to say unwrap is for textures, and lightmap is for the level lighting? How do I separate the two types of UV’s so I don’t get the same errors?

Thanks Andrew!

Here are some screen grabs to show how messed up the uv channels come in.

Ok so here is your problem, and I was having trouble understanding it myself not long ago as well so no worries!

See within the “Static Mesh Settings” where it says “Light Map Coordinate Index”?

Set that value to 1 with all the Static Meshes you are having the error message for. This is assigning the Lightmap to the newly generated UV’s you are viewing in your image.

Cheers,

I still don’t think its working. I was setting ‘light map coordinate index’ to ‘1’.
I think my screenshot was from showing someone in the office what i was battling to figure out.

I tried going back to 4.4.3 and doing a test in that. Still had issues. Is it possible that the ‘unwrap’ uvs are preventing this from happening. I’m just shooting in the wind at this point. Here is a sample of one of the models that I’m working with, if you feel like taking a look at it…

So I took a look at the model you provided and was indeed able to see what you were talking about. The problem seems to be that you do not have any Unwrapped UV’s on your table model. This is probably the reason you cannot get rid of the error message of overlapping UV’s.

I’m looking into how to do uvw unwraps in 3ds right now. Where is it that you see there is no unwraps? Is that what uv channel 0 is for? All I want to do is a very simple architectural walk through were I can apply a simply ‘clay’ material to a scene. I don’t suppose there is a magic button in ue4 or 3ds that will negate the need for unwraps and uv channels? haha…

Yes the UV Channel 0 is your model’s unwrap. Notice the difference between that one and the UV Channel 1.

All of your model’s polygons and triangles need to be in that square zero to one UV space that you are viewing. Keep in mind the larger pieces of geometry of your model that you want to have better detail, those need to be represented a bit larger than other pieces you do not even see.

When you have your model successfully unwrapped and it looks how you would like, re-import your mesh into the engine and continue with the steps we went over about applying the Lightmap to the coordinate index and you should be free of the error message.

Good luck!

Well I tried using this (maxscript) that I found for 3dsMax to create my unwraps all at once. Upon doing that and trying to import a new FBX, the UE4 4.5.1 importer locks up about halfway through the process. However, If I uncheck ‘Generate UV maps’ in the import dialouge everything imports. This means that I would need to go into every mesh and generate one individually.

Another thing that may/may not be related, is when I go to save the project after loading the fbx, ue4 has trouble saving all meshes and promptly crashes.

Hey again ArchVizVR,

You need to go into 3ds Max for each individual mesh that you are trying to re-import into the engine and create a custom UV Map. Click on your modifier dropdown list and select UV Unwrap. When you have done that, import your meshes one at a time.into the editor.

Look at some documentation as to how to best unwrap your models. Running a script on them will probably not work as you would like. This will also let your learn about how to do so.

Thanks,

Hey Guys,

I’m having the same exact issue as ArchVizVR. My channels look identical. channel 0 is mushed and channel 1 is neat and organized. Now when we import an fbx and we say to generate UV mapping, it’s creating that channel 1 for the purpose of not having to do it in 3ds Max right ? I also know that the lightmap coordinate index needs to be on 1 so it can point to the correct UV channel ? When I save and exit the mesh editor and rebuild lighting, it does nothing and gives me the same error.

Now Andrew, you said that channel 0 is the models unwrap? Isn’t that the channel we don’t want to use for the lightmapping? The lightmap that UE creates in that channel 1 looks great. I just don’t understand how to get the mesh to apply the one UE created instead of having to go through and create them all manually in 3ds Max.

I’m missing this piece of the pie and it’s driving me crazy…Thanks for your help guys.

Cheers

Darren Fish

Hey Darren,

I would be happy to clarify :slight_smile:

So essentially you have one UV Unwrap for your model which can be rendered out to an image to create your textures, and for the UV unwrap to allow Lightmass to calculate/bake the lighting information into your model.

Based on how cleanly your UV space is organized and its overall resolution compared to its relative size, will have an affect on the quality of your model when baked with Lightmass.

Would you mind showing me the Static Mesh settings of the mesh you are referring to so I can get a visual of the issue? A screenshot of your mesh within the level as well as the Static Mesh editor of the model with the UVs showing would be preferred.

Aside from that, take a look at the documentation we have about UV Unwrapping and Lightmass. You might find some clarification within these documents that will trigger a ‘light bulb’ in your head so you can gain a better understanding of how Lightmaps are implemented cleanly.

Unwrapping UVs for Lightmaps

Computing Lightmap UV Coordinates

Let me know if you have further questions or need any more assistance.

Cheers,

Hey Andrew,
Here is a screenshot of my UV channel 0 and static mesh settings

Here is a screenshot of my channel 1

UE4 creates a well organized UV map when I impot the fbx, but I can’t get the meshes to use that 2nd channel it created to bake the lighting. This is an example of the walls in the house that I am trying to create. All of my objects I imported have this same UV channel look to them. Channel o is all over the place, and channel 1 is organized, neat and not overlapping.

On the link regarding the UV unwrapping of light maps. where do you apply those 3 different techniques? Is this done in another software before you import or can UE4 do these? It explains them in the documentation but doesn’t say where to apply these techniques or what tools to use to achieve this.

Thanks Andrew