A few questions involving texturing

Alright, so while I feel I have a pretty good understanding of 3D modeling, I’m really new to working in game engines, but I figure what better place to start than UE4?

So, I’m working on making some modular street pieces to create a fairly large city, and ran into trouble with the first piece I tried to make, haha. A cul-de-sac.

1.jpg 2.jpg

As you can see here, the material I made with photoshop looks pretty okay on the straight sidewalk bit, but once we get to the curve, there’s a very easily spotted issue.

3.jpg

The lines are, of course, all running in the same direction! So is there any way to set the material so – for example, the X+ side of the texture is always facing the center of the mesh? I initially was apply the texture to it in my 3D app, but I found that the different sizes of UVs stretched the texture in an undesirable way on some faces. So I went with plugging the texture and normal map into a UDK material.

4.jpg

^That’s my current material.

So is there any way to fix this? I can only assume there is, I must just not be seeing it, or using the correct method. Any help is greatly appreciated!

Edit: Sorry the pictures are so compressed, here’s an imgur gallery of the photos: http://imgur.com/a/WDp6M

I’m not sure if i got what you mean…
Create the street or street parts in 3ds max or any 3d modeling software, uvw unwrap everything with textures and import it into UE4 ". To make everything a bit nicer “details” and less polygon intensiv you can also bake some normals for your objects…

You should also build your street parts in a moduar way, so you can combine all your street parts later in UE4 easily. I would recomend to watch some tutorials how to build modular objects for game engines or however they are called.

Hmmm, maybe I wasn’t clear enough. What’s pictured is a mesh of a cul-de-sac . It’s already been created in Maya, UV’d and all. It’s already low poly, the detail seen (maybe not too visible in the screenshots) is all thanks to a normal map created in Photoshop, and I’m planning for this piece to be modular.

The main issue is I don’t know how to make the UE4 material go with the curves on the cul-de-sac.

Can you unwrap your road in Maya so that the UVs all go in a straight line? Like so:

Then the texture should wrap fine.

gregdumb showed you a good sample how to unwrap your “not straight” road, the rest is simple, create a texture in photoshop for your uv’s and import everything to UE4.
By the way, i’m not 100% sure cause i can’t really see your object in detail but it looks that you have also some probems with your smoothing groups… “the dark areas” on your mesh…

Either use photoshop to adjust your texture on the curved area of the uvs to make the line go out in a radial

or

cut your uvs and adjust them to align with your texture

hope this helps

Thanks everyone, putting your suggestions to work as we speak.

About the shading groups, I notices some odd shading as well. But my lightmaps appear to be in order. Do you know what might be wrong with it, @Adik?

EDIT: Hmmm, I straightened it as you said, but I’m still getting distortion. Example: http://i.imgur.com/m1vR8oy.png

It’s a long and painful theme… :slight_smile: It’s also hard to tell cause i have no idea how your mesh looks…
Basically to get away from this issues you can “autosmooth” your object in your 3d application. The question is have you set for example just one smoothing group to your object, to bake some normals? Some people do this to avoid edges in they’re own baked normal maps…

Maybe it is also a lightmap issue but for me it looks more like a smoothing group problem…

I didn’t bake the normal maps, I made the texture in Photoshop, then used the Nvidia normal map plugin to create the normal map. I tried softening the edges in Maya, but upon exporting it and bringing it into UE4 it doesn’t look any different, perhaps it’s just the material, or the scene?

Anyways, that’s not my primary concern at the moment. I’d really like for this material to look right, but nothing seems to be doing it. Here’s the mesh’s wireframe if that helps: http://i.imgur.com/WwrFnFd.png

ok i was just asking, than just autosmooth your object and the dark areas should be gone…
Your road should look more like this, just ignore the triangulation of polys… there is no need to do this cause UE4 will do this for you automaticly.

Alrighty, I’ll give making a higher-poly mesh a shot.

Okay, so I made the higher-poly mesh, but am still running into trouble.

Imgur

As you can see here, in the straight places, the lines look straight.

http://imgur.com/B2AqrvQ http://imgur.com/4TNMPDK

(Here’s the mesh and its wireframe if that helps)

http://imgur.com/im0vJeP http://imgur.com/txfLCZS

But further down as you can see here, where it curves, the line in the texture gets all squiggly.

Imgur

Here’s the UV map in Maya (sorry the image is cut-off, but nothing important should be covered)

Imgur

And here’s the full wireframe in Maya.

So, is there any easy way to fix the issue? It’s really driving me crazy. Any help would be greatly appreciated.

If there’s no way to fix it, is there a way to avoid it in the future?

The squigllyness is because your polygons are a trapezoid shape and the UV’s are square shaped. If you draw a triangulated line across and of the trapezoids,you will notice that there is a “big side” and a “small side”. this leads to a see-saw artifact because there is no mathematical way to perfectly distribute that surface area using vertex-indexed UVs only.
. You need to have more tessellation in the lowpoly geometry to allow for more accurate UV distortion in this case.

Your wireframe actually looks like the tessellation you currently have is not evenly distributed. So some polys probably stretch badly and others not much. if you smooth that all out (or just recreate it by lofting a straight shape based on a perfect curved line), I doubt you really need much more tessellation to make the problem go away entirely.

Thanks for the reply, after a quick google of the lofting tool I found out what it did, and how to use it. So I recreated it, and while the distortion is less dramatic, it still exists. Just to be sure it didn’t have to do with my having drawn the lines that were lofted myself, I did a perfect circle and UV mapped it how I did in my last post. and there was still that little bit of distortion. Is there any easy way to make it so all polygons are perfect, equal squares or anything? How would you approach fixing this problem.

(Sorry if I’m not following your instructions correctly, I can model pretty well in Maya by simply adjusting verts and things, but I’m unfamiliar with a pretty good amount of its other tools. Really appreciate as much detail as possible.)

I should clarify that the distortion will always exist. As you increase the tessellation it will be lessened because each quad will become more square shaped.

You Could measure the distortion by dividing the outer edge length by the inner edge length. As you increase tessellation that ratio will approach 1 and the distortion will lessen.