UE4 Resetting UVs from 3DS Max

I’ve been doing a tutorial from Lynda.com in which the instructor teaches how to model a shipping container then create a texture/normal map for it in Photoshop. One of the techniques used during the modeling process is to instance many of the same objects in order to make the UV unwrapping easier and faster. However, I suspect that this or mirroring is directly leading to issues upon import into UE4. In short, the UVs either reset upon import into UE4, or they rotate strangely, causing my texture to lay vertically instead of horizontally on my model inside the engine. When I texture and apply the material inside 3DS Max, this does not happen.

I’m going to list the major steps I took in modeling this, just in case it may lead to clues that could solve this issue.

This is the container in 3DS Max before unwrapping.
Crate.PNG

The model is quite simple. There are 8 mating couplers (the boxes on the corners). I modeled the first one from a box primitive, then shift-dragged and instanced the remaining 7. From there, I modeled the 12 beams that go between the couplers–3 sets of four. I modeled one of each set from a box primitive, then mirrored the remaining 3 beams in that set along the correct axis as an instance. Finally, I filled in the sides, top/bottom, and front/back with one-sided planes. One of each were mirrored and instanced.

I then added an edit poly modifier to the beams to optimize (removed the unseen faces). At this point I unwrapped one of each of the instance sets of beams, couplers, and sides. I then collapsed one object to an editable poly and attached all other objects to it. Finally, I added an UVW modifier to the combined editable poly object and started arranging the UVs as you see below (wasn’t quite finished arranging when I took this screen grab).

UV.PNG

All the beam UVs are stacked on the right, because I’m not concerned with texturing them with anything but a single, solid color. The sides are on the left bottom of the 0-to-1 space, the tops and bottoms just above them, and the front and back (separated) at the top. The couplers are the small unwrapped boxes between the panels and the beams. As you can see, I’m purposely overlapping the UVs of the sides, the top/bottom, and the couplers. The overlapping is one place where I think my problem might be stemming from.

I render this UV to a Targa and send it to Photoshop, where I then make the following texture based on it and import it to UE4.

Crate.PNG

I also sent that texture to 3DS Max, where I made a material with it and applied it to my model. After flipping around various UVs to get the text to display properly, it finally looks good. (I’ve had the damndest time trying to figure out how to flip/mirror/etc this stuff so the UVs look right while making sure the back side of the one-sided plane isn’t facing outward) I then exported the model to .FBX and imported into UE4.

This is what it looks like in the scene with my texture/material applied.

UV.PNG

As you can see, my text is displaying vertically. That makes no sense to me, seeing as the UV map in the mesh editor still looks how it did in 3DS Max. See below.

Any idea what’s causing this rotation? I’ve spent more time than I care to admit trying to fix it. Also, I did create a second UV channel for the lightmap with the UVs not stacked.

This doesn’t make a whole lot of sense, I mean, it has to be mapped wrong in Max as well to turn out like this in UE4.

When you flipped or mirrored the UV to make the text work, did you do it in the UV Editor, or some other method?.

The problem sometimes is that if you use a feature in Max that is not supported at export, it won’t work. So the best way to work is directly on the mesh and UV editor, no special tools or tricks elsewhere unless you know what you’re doing and can translate the results for proper exporting.

Really odd. You should get into the habbit of checking the textures with a material in 3ds too.

I only flipped and mirrored the UVs in the UV editor. Nothing fancy.

I would agree that something went wrong in Max if the UVs in the mesh editor in UE4 were warped or moved. But as you can see from the last photo, they look just like they did when I arranged them in Max. It’s as if UE4 is interpreting those UVs incorrectly.

I did check the texture with a material in Max. That’s how I knew to flip and mirror the panels correctly. It looked great before going into UE4.

Really the only other thing I can think is that the texture map is setup different in Max, through the material. So the UV is adjusted to make that work but is in fact not correct for the unaltered texture map. That’s about the only other idea I have without looking at it for myself.

To be honest though, I don’t even really have a proper theory of what’s going wrong. I’ve never seen this happen.

If you don’t mind posting the FBX, I can take a look at it, but even better would be the Max file so it’s before export. Other than that, I just don’t know. I don’t know your work flow and what step or steps could cause this.

That makes sense, though I don’t remember ever messing with the tiling or layout.

Here’s the Max file. Thanks for offering to help.

Also, here is the texture.

try resetting xform and re-exporting. See what happens.

I hate to say but when I open your file and export, it seems to work just fine, so I still don’t know why yours doesn’t work. You can try import your FBX back into Max and see if it’s messed up and maybe tell why it’s messed up.

Also as DieByZer0 mentioned, you should Reset XForm. This shouldn’t have impact on the UV problem, but it does need to be reset and then flip your normals afterwards. The UV’s should just stay the same. Don’t know if maybe at export this is causing problems, but it actually shouldn’t so if it does, it’s the exporter.

Welp, you’ll never believe what fixed it. I tried again after resetting the XForm and flipping the normals and… nothing (as you suspected). I then tried converting it to an editable mesh and exporting it. Voila, it worked beautifully. Makes no sense. Just for science, I tried converting it back to an editable poly and then exporting it like I’d been doing before… and it worked. Something about the conversion to editable mesh fixed whatever problem existed.

The resetxform and then merging to editable poly is the process we use to fix these errors. Probably thats what fixed it.

Converting to Editable Mesh can fix some weird bugs for sure. This one of the weirder ones I’ve seen now, having never seen it before and I’ve worked with Max for many years. It’s obviously a bug but I still wonder where things went wrong for you. Very possibly because you did not reset before doing UV’s to start with, which really should be normal procedure, but who knows, bugs are unpredictable like that I guess.

Whatever it was, thank you both for helping!

No need for thanks, Have a nice day and a Happy new year.

~Chris I.