Trouble with UV mapping when exporting from Blender to UDK

Let me start that I’m new at using Blender. I’m trying to learn how to import a mesh from Blender to UDK. I’m using Mike’s ASE Export script. I tried to import a simple cube but it looks wrong in UDK. The geometry itself is fine but the UV map is not. I’m using Blender 2.6.2, ASE Export script 1.41, and UDK March 2012.

Here are my steps:

  1. Create a new project which gives me a default cube with a material and texture. From Properties window, Scene tab, change unit system to metric.
  2. Select the default cube and change dimensions to be 4m all around in Properties panel. I do this so the cube is not so small in UDK.
    [From here on out, the cube is always selected.]
  3. In Properties window:
    – 3.1. Go to Object data tab and create 2 UV maps by clicking on the + sign twice. This will give me “UVMap” for my texturemap and “UVMap.001” for my lightmap.
  4. Go to the UV Editing screen:
    – 4.1. On the 3D View window, go into Edit mode.
    – 4.2. On the UV/Image Editor window, make sure “UVMap” is the active UV Map by selecting it from the header.
    – 4.3. On the 3D View window, press U for the UV Mapping menu and select “Smart UV Project”. I don’t change any of the options and select Ok.
    – 4.4. On the UV/Image Editor window, make “UVMap.001” the active UV Map and do the same thing as before (Smart UV Project…). I make no changes to the resulting mapping for my test.
  5. Go back to the Default screen. In the Properties window:
    – 5.1. Go to Texture tab and change Type to “Image or Movie”. Select an image file for my texture.
    – 5.2. Under Mapping, change Coordinates to UV and Map to “UVMap”.
  6. Render image to make sure it looks ok, which it does. Save file.
  7. Export cube to ASE file. There are no errors in the system console.

When I import the ASE file through the UDK content browser, and double click on the mesh, the UV mappings are messed up where lines are criss-crossed. I’ve attached pictures for clarity.

I’ve also tried marking seams and using the “Unwrap” method for both texturemap and lightmap. I get a different UV mapping of course but they are still messed up in UDK when I import.

I don’t know where the problem is. I’ve looked at multiple tutorials and searched online but I’ve not found the answer. Any suggestions would be appreciated. Thanks.

Attachments




Ok, so I looked at the ASE cube (with UV unwrap mode) in UDK with some wood texture and it looks like what it should based on how the texturemap is laid out on the texture. So I guess I’m to deduce that Unreal’s static mesh editor is wrong when viewing UV channels? Is anyone else experiencing this?

However, the lighting is wrong. There are these shadow triangles that you can see in the third image. I don’t think those should be there. So maybe I’m creating the lightmap incorrectly? At least for a cube, I thought I could use the same mapping I used for the texturemap.

What I would LOVE is someone to give me, or point to me, step-by-step instructions on getting a cube from Blender to UDK, including the parts about creating the texturemap and lightmap. The tutorials I’ve watched just gloss over that part assuming the viewer already knows how to do it. Help, please.

First of All, don’t use “smart uv project” , it is not the best option. for cubes/hard surfaces, its better to use Unwrap, Project from view etc.
For Lightmaps, “Lightmap UV” is an good option.

If you are using Mcampagnini ASE exporter, then make sure you have material>>texture has atleast 1 image selected.

Before exporting, Convert your quad cube to Triangles, then export.
Hope this helps.

rebellion: Thanks for the tips.

For both texture and light maps, I shrunk them a little so the verts don’t touch the border. This fixed the criss-crossing line problem in UDK. I also tried to set smoothing groups (mark edges sharp, and and apply edge split modifier) but for some reason, Mcampagnini’s exporter is not recognizing them. In the ASE file, I only see “MESH_SMOOTHING 0” which I think means no smoothing groups. But that’s a different problem. I did try recomputing normals in UDK and that worked at least.

By the way, I tried your script with Blender 2.63 but got an error on import. I will post this error in your other thread.

for smoothing group i had the same problem… so this is why i have build my own script :smiley:

however you don’t have to apply the modifier, it’s only to have a preview.