Download

UV Wrapping

Hey Everyone,

So I have a quick question about the UV Wrapping error. I’ve been making some modular meshes in Blender and ran into the UV Wrapping error today. I was trying to make a basic stair case and when I built the lighting in engine I got the error and the Stairs had a weird black effect. Here’s a few screens.

Screen 1.png
Screen2.png

So I researched UV wrapping and it said that it is because I am scaling out of the 0,1 UV space. The thing is tho that I’ve made several meshes before this that were scaled out of the 0,1 UV space and I’ve had zero problems. I’m just wondering why I’ve run into this problem with this mesh. Any help would be great.

Thanks

are you using that UV for your lightmap? while you can go outside the 0-1 space for your texture UV’s you cant for lightmap UV’s. also that UV is not layed out very well, you might want to think about rearranging it.

To add to Smokey’s response.

You’ll definitely want to make sure that you’re using a second UV for your lightmap. In this specific UV you cannot scale outside the 0,1 space because anything that is scaled out of this area will be rendered black or cause some overlapping on other mesh faces like you’re seeing here. However, it is perfectly OK to have your texture UV scaled outside of the 0,1 space.

I’m not sure about your previous meshes that you appear to have had no issue with, but with this specific case this is the issue.

If you have any questions please feel free to ask! :slight_smile:

Tim

Hey guys,

I’m not using that uv as my lightmap, at least not intentionaly. I made a second uv channel for the mesh just like I did for the others. I must be doing something weird. I’ll play around with it when I get home. I know it’s a terrible layout :slight_smile: I was just using it for the screen. I didn’t want to set the whole thing up (again) just to have to redo it to fix the problem.

Thanks for the replies, I really appreciate it.

To double check that you’re using the correct UV for the lightmap. Open the mesh in the Mesh Viewer and in the details panel to the right find the option that says “Lightmap Coordinate Index” and make sure that it is set to 1 instead of 0. This will be your Lightmap channel.

Tim

Hey Tim,

I didn’t know that they could be set like that. Thanks I’ll try it when I get home.

Hey Tim,

Sorry for the late reply. I just wanted to let you know that it was set to UV 0 as the lightmap. So as you said i set it to UV 1 and that fixed it. Thanks so much for the help.

@Tayber415, your uv’s are also wrong, before unwrapping, be sure you have rotation and scale apply in Blender, then try Smart UV Project, and should give you betters UV sets. You can do the same for lightmap, second uv set, and maybe you can put island margin to 0.1 and and angle limit to 1.

Hi there,

I have been having no luck getting my blender fbx ( fbx v 7.x is ok ?) model imported into ue4, to show more than 2 channels, as when I double click on object to bring into object browser (name ?),it says it only has 1 channel,does it really though ? Is it really so simple as you outlined to alter the setting on right side to 1 not 0 for uv channel 2 , or have I setup my blender object incorrectly that its showing 1 channel only ?

thx anyone/tim ;()

nl

If you’re just looking to add a UV channel you can do this in the engine much more easily now with the new Generate Lightmap tool.

Open your mesh > Build settings > Select LM resolution > Apply changes > Locate Lightmap Coordinate Index and change this value to 1 and you’ve now got your generated Lightmaps.

As for the stuff with Blender I’m not sure since I’ve not really used it. There could be something up there I’m just not sure. The method above will get you the Lightmap if that’s all you need. :slight_smile:

Let me know if that helps or not.

Tim

Right now Im afraid I don’t have current subsciption, and I’ve heard that this ‘new’ feature is in 445…Im pretty sure I have 441, unless you think it also works in the prior v I have, I’ll check later on just in case.

ty
nl

Okay I just tried the ‘generate UV’ for 4.4.3 thinking that might help, but while it showed a ‘uv channel’ to apply them to, my object only has 1 channel showing as ‘0’. How do I add a new channel ?

Hoping this will fix my issue ;)(

ty anyone
nl

Generating UVs prior to 4.5 can be a little iffy sometimes. Even in 4.5 you would have to have a properly setup UV0 for your texture to get a good results with Lightmaps.

So, with that, In 4.4.3 and prior you will need to go to the Menu bar > Window > Generate Unique UVs >

This will open a new tab under the details panel. There will be two options. create new which will unwrap for you but does a fairly poor job that can cause artifacts in your lightmap that is baked and Layout using channel 0. This is the best option because it will reorganize your LMs based on how you unwrapped your UV0 for your texture. It will repack and organize within the 0,1 space.

Select Layout using 0 channel and set the channel to save results to as UV Channel 1. This will then create the lightmap UV based off the UV0.

Let me know if you have any questions. :slight_smile:

Tim

Ah very nice, ty so much Tim ;_

nl

Well crud ;))

I did as you suggested and I’m getting: layoutUV failed: couldn’t convert to DVDXMESH.

I wonder if its because I exported using fbx binary 7.4 instead of version 6 ascii based ??

Thx for helping with this Tim.

cheers
nl

Btw , I just made a ‘rock’, a simple object with just one material. I exported via fbx 6.0 ascii (no idea if 7.4 binary would have worked, I tried 6 first) and I did the generate UV step and it worked without any errors, unlike my complex mesh.

Is it that my mesh is too complex at 148K ? Is there a setting in blender or UE4 I should use to get around this mesh complexity ?

It is complex, as in its a mountain with a lot of detail on one side, and inside there are several cave systems, mostly all done in Sculptris and exported out through sculptris >obJ into blender for FBX Export. I get no errors on export from blender, or import into UE4, just during generation of UV’s. I guess I"ll try removing lightmap from blender and let UE4 do it all, as in the case of the rock. I’ll update thread.

later
nl

No luck, as removing lightmap from blender and exporting again as fbx, I still get the same error when trying to ‘apply’ generation of lightmap UV in static editor > window > generate UV , and in inspector panel on right .

My friend, you talk about a mesh “148k” what? Triangles? Vertices? 148k… sounds a lot (triangles or vertices) and I personally think you do something really wrong.

Can you post a screenshot with the model, wire frame also and UV’s?

As a general advice, with out even looking at you model, if is a high res model, best way is is to decimate the model as low as possible, probable even around 1k triangles and bake normals from high res one, and this will give you almost same effect. If is something complex and this route do not work, assuming is something big, you maybe can split it in different pieces, and this maybe can help at rendering considering culling of geometry. Also, for each individual piece, consider fist step with baking. Yes, probable you should consider a modular route from start.

I don’t think I could EVER get it to 1k triangles, it would become a mutant of its former self. I’ve tried lowering to much higher than that, yet 1/8th or so of 148k,and it still comes out so wrong, that it won’t be playable, I don’t see how.

Its a mountain, not like mount rainier obviously :), but its not small either. It has 3 cave systems inside, but I didn’t go crazy,it’s part of a storyline ,so it’s there for a reason.

You are saying, the mesh is too complex for UE4 to generate UV"s for second channel lightmap from it ?

MOdule approach, split mesh into pieces , I have zero idea how that would even work from a modeling perspective, let alone combining them in UE4.

Yes, btw, the mesh is complex enough, that trying to normal map things ,I think would turn out to be a real mess. Also, its nowhere near as high res as you might think, because I’ve already decimated it from its original export from unity, which was about 676K tris :wink:

Yes, I started in unity from sculptris and went from there but I like UE4 better so here I am.

Open to suggestions or Tutorials to do some of what you mentioned, if such a thing exists ,but yes I’ll give normal thing a shot because the lightmap won’t generate as it is.

TY :slight_smile:
nl

I am NOT saying that, I am saying you do something wrong. If lightmap do not generate, is because there are problems with the geometry/uv not because lightmap do not work.

You talk about cave systems? There are a lot of ways to do them… Did you took a look at Solus examples by Hourences?

If you post some screenshots I am sure someone will help you to improve your work, else we talk “discussions”.