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.
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).
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.
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.
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.