UDK modular seam problem

So I can seem to figure this out, I'm making a scene with tileable textures, I made them so they snap together in udk, but I'm still getting these ugly seams. I've spent hours already trying to figure out why I'm getting this\/
I export the meshes from Maya using axemesh, I've tried a variety of different settings while exporting it (obey hard edges/ auto triangulate/consolidate geometry/etc) So what is the best way of export, maybe I'm messing up here.


lighting02.jpg

I've narrowed it down to being something with the lighting and have been searching through forums with no luck.

Here is the scene with only textures (notice no weird seams)
lighting03.th.jpg


and lighting only (ugly seams)
lighting01.th.jpg

Also, these only have the ugly cgtexture diffuse because I was testing to see if it worked (which is doesn't)
Right now the modular pieces are square, someone said try just a flat plane, which still didn't work :(

Any advice I will definitely try and post right away
Thank you for your help!

Replies

  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 12
    Try going into the 3d mesh and pushing all the vertex 'normals' UP, solid 90 degrees, perpendicular to the flatplane, so they all face the same way. Maya can do some weird things during creation where it pushes the vert normals outward in a radiating pattern. You want them all standing up like table legs on an upside down table.

    That should tell Unreal to calculate lighting across the surface more evenly. I can't remember how to do this in Maya, but there should be a tutorial for straight editing of Vertex normals. That might help. Might not.

    Sadly, UED has trouble with seams across things like this. They seem to like to build modular-with-intent-to-cover-seamy-areas-with-'covermeshes'.
  • cholden
    Offline / Send Message
    cholden polycounter lvl 12
    blanksate is on to something there.

    Also, did you setup 2nd channel UVs for light mapping? Check smoothing groups as well.

    Your problem is very common. Sometimes, modular pieces need to be bigger, and sometimes using Unreal's CSG Brushes is the way to go.
  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 12
    I should mention that I'm pretty pessimistic about there being a way to remove the seams entirely...I seem to recall fighting for hours just like you did and learning that the seams will always exist across any break in UVs. That was many many UDK releases ago though. :)
  • PhilipK
    I'd say this is a problem that can appear in all lightmap-based engines (unless you'd be able to stitch uv shells together by selection). I don't know what resolution you've been baking in, but it looks like it's pretty bad in places.

    Otherwise it's always nice to try and end a modular piece with a natural seam. I know it's not always that nice to use tiles/plates of different kinds, but it's damn convenient. You can make the seams pretty unnoticeable. Even if you are to make a big concrete floor there it'd just look pretty natural to see some seams if it covers a huge area.

    But yeah, it looks like you've got way too much difference in there.
    As some other people suggested it may be a smoothing issue.
  • davidmlally
    Offline / Send Message
    davidmlally polycounter lvl 9
    From what I see, like blankslate said, it appears to be an issue with the normals prior to exporting into the engine. In Maya, if you select your object and go to Display > Polygons > Face normals you will see green lines indicating the direction of the normals for those faces. The normals should be pointing directly up, that is, perpendicular to the surface, as blankslate mentioned. If they're not, under the Polygon's menu set, select your object and go to the "Normals" option in the menu bar. Here, you have options to reverse normals and even edit them manually. More often than not, if your normals aren't correct, they are likely just reverse so you will just need to reverse those that are not facing upward. I would also recommend trying to select the object and turning on "Soften Edge" for the normals if you haven't already. The hardened edge option will give you the hard polygonal creasing for when you need it.

    Good luck with it.

    -Dave
  • ShootandRun
    so I've tried switching the normals around with no luck, I'm not totally pro at the program so I'm not 100% sure I understood u but u meant for something like this right?

    screen01jr.th.jpg

    I've had the normals hard (or i go 'normals' -> harden edges) in maya prior to using axmesh

    I tried making the normals like a table. This ended up with the face facing to the inside of the box so i thought I did it backwards and flipped the UVs the other way, still no luck (C) I tried making the boxes bigger with no luck (B) I thought that it was maybe because when I unwrapped it I made the other sides really small, it was messing with the lighting, so I made all the sides take up the same UV space, still nothing (A)

    I then tried the CSG ADD button, that makes those boxes (I think its called a brush, when I click on it in udk it says 'persistenLevel.Brush_3', sorry I dont know the right term for it) and created the boxes next to each other and place my material on these and no seam!!(D)....so I'm not sure what I'm doing differently when I import the meshes I made but for some reason they are acting differently. I can't use the brushes for this project because they have to be meshes I made :/

    screen03z.jpg

    Cholden how can I check smooth groups?
    There is only 1 UV channel
    I just tried creating unique uvs and it made it look worse. Maybe I went about making a 2nd set wrong, from what I remember from my teacher:
    1) double click on the static mesh
    2) Mesh -> Generate unique UVs..
    3) hit apply
    is that right?

    Philipk -> One of my friends suggested I do this, but I wanted a concrete floor so I was unsure of what a natural seam would look like in a concrete floor :/ I was thinking of like a vent or something but I didnt because that would look ridiculous tiled...concrete, vent, concrete, vent, all over the place. I guess I could make all of the tiles bigger but I feel like I'd still have problems because bigger tiles have to meet somewhere.

    When I was flippin through forums I found some people said to turn off the ambient occlusion in world settings because of this weird black glow. I think I have it off but wanted to make sure to narrow down the possible problems. Its this box right?
    screen04l.th.jpg


    Thank you all for the help, I'm still trying to fix this, so if there are any other thoughts/suggestions feel free to shoot them my way so I can try em out.
  • cholden
    Offline / Send Message
    cholden polycounter lvl 12
    Creating a 2nd UV channel for lightmaps. I work in max. My knowledge of maya is limited. However, I recently was helping an intern with a UDK personal project he'd created in maya and figured out how to setup the 2nd UV channel for lightmaps. If I can just look at a tool and figure it out, I'm sure you can take the time to do so as well. Unfortunately, I can't remember how that was done without maya open in front of me. Lucky for us, UDK can create this 2nd channel for you.

    If you open any static mesh in the content browser of UDK, Click Mesh > Generate Unique UVs... > then click Apply. This will automatically generate a lightmap UV channel. It may not be as good as manually created UVs, but works fine.

    Smoothing groups, google it, look it up, learn it, understand it. These are cripplingly important to game art, normal map rendering, etc. They go beyond Unreal.
  • Mark Dygert
    cholden wrote: »
    Smoothing groups, google it, look it up, learn it, understand it. These are cripplingly important to game art, normal map rendering, etc. They go beyond Unreal.
    This is super important right now. The normals on the edges of your tiles aren't matching. You can fix that by changing the smoothing, unwrap the object so the UV seams are the tile seams.

    NormalSeam.jpg
    Typically you wouldn't have depth in your tiles they would be more or less flat planes, why create depth if you're going to cover it up?

    BUT, you can still run into seam issues even with mostly flat planes as you found out. That is probably because the normals on the seam edge don't exactly line up perfectly.
    NormalSeam01.jpg
    In most cases you copy instances of your tile around the edges, weld it all together, move the extra tiles out of the 0-1 renderable UV space and bake. Then remove the extra tiles and export your single mesh. At least that was the old fix for the seam issue, its possible they could of put some funky voodoo in UDK to counter act this, because its pretty common.

    Also keep in mind that you can design your tiles around the seams, plan your UV's well, your smoothing breaks and if whenever possible cover seams up so they won't be a problem.

    You should read an article Eric Chadwick has on his website, specifically welcome to splitsville.
    http://www.ericchadwick.com/examples/provost/byf2.html

    It will probably be helpful to check out the polycount wiki, link at the top of every page, next to the forum link. There is a metric ton of normal map info there.
  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 12
    Yup, you did the 'move the vertex normals' thing right--well, right enough for the verts that matter for this particular lighting seam at least. (I didn't realize your meshes had depth). But it was like I feared--I seem to remember discovering at one point that UDK did some funky odd stuff on import--like regenerate its OWN vertex normals or ignore the .ase normals or something. It ends up being particularly annoying in this exact situation.

    -For smoothing groups in Maya you don't have to worry beyond hard/soft edges. It's the same thing as Max's smoothing groups--Max's "smoothing groups" just allow for more specific smoothing relationships but are more tedious to set up.

    -The brushes in Unreal are 'BSP' (Binary Space Partitions, I think). That's a whole different kind of actor to Unreal. The boxes you made are static meshes. Yes, they're both boxes, but Unreal sees and treats them as two different types of data. So the difference isn't your fault there.

    -The way you're generating unique UVs for channel 2 sounds like the same method cholden described.

    Either way, I suspect this isn't a lightmap issue, and is a straight up lighting calculation issue instead.
    To help check, go to the static mesh editor (double click on the mesh in the content browser) and change the lightmap resolution to 0 to force Vertex lighting. That'll at least eliminate one more variable for now.

    -and yes, that's how you shut off Screenspace Ambient occlusion for your level. That will help minimize confusion in regards to what's a shadow bake and what was AO. It probably won't help the lighting issue though.



    To be honest, the easiest way to resolve this is probably to remove the depth to the blocks, stitch it together the floor in MAYA, and the reproject the floor UVs and them import it as one big mesh. Either that, or work a groove/cut into the edges of every block so the seam makes sense.
  • ShootandRun
    YES! THANK YOU ALL for all your help!
    I finally got it! It was a combination of all your advice, I made it a flat plane, made sure all the normals looked like an upside down table and then also made a 2nd UV channel in udk. I'm soo happy

    You guys are all awesome!

    Thanks :)

    screen05t.jpg
  • blankslatejoe
    Offline / Send Message
    blankslatejoe polycounter lvl 12
    sweet! Good to know you were able to resolve it!
  • Xendance
    Offline / Send Message
    Xendance polycounter lvl 7
    Whoa, this is the first time I witness this problem being solved :O

    I gotta test tweaking the vertex normals too.
  • teaandcigarettes
    Offline / Send Message
    teaandcigarettes polycounter lvl 7
    Xendance: Don't bother; if you look closely you'll notice that ShootandRun is using vertex lighting.

    The issue that most people are having is related to they way UDK handles lightmapping. Unfortunately, I have yet to see a perfect solution.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    i thought i posted already but i dont see it.i have this seam problem as well only nothing helped...i read the posts in this thread and followed the suggestions the best i could but the problem persists.here is what my meshes look like: 63999570.jpg
    Uploaded with ImageShack.us

    its four modular pieces
  • Mark Dygert
    It's hard to know how it was built, in what app, what the smoothing looks like before you export and what settings you have in UDK. I'm not really sure which 4 pieces you're talking about in the scene? I think you mean the bigger shack, it looks like it has some messed up smoothing but that could be texture issues...
  • SpeCter
    The only problem which i see which is probably smoothing related could be the roof, the other 2 textures don´t match very well and you can clearly see that they are mirrored.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    Im using 3ds max and i did set the smoothing beforehand and also, a guy on another forum told me to apply a smooth modifier and set it to 30.i did so and reexported and it fix the problem....

    maybe somebody willing to do so,could remake these exact wall pieces in max and export to udk and if it works you could share with me your steps on doing so. the point of this is, that the wall pieces i made are very low poly and if that effects the lighting along with the shape,we will have the same model and can track down what the problem is. if somebody would be willing to do so,or have a better idea i would appreciate it so much!
    edit:
    ok this is after i changed the meshes material and added a cement one from udk assets.the shadows appear fine.
    14423846.jpg
    Uploaded with ImageShack.us
    the seams are better but i think thats the tiling of the material on the uv's of my meshes. does this change anything?

    another edit:
    i changed the material back to the stucco material i had like in the previous picture but this time in the material editor i removed the normal map. it lessened the seams and made them overall more hidden,but still persistent. here's a picture:
    63613260.jpg
    Uploaded with ImageShack.us
  • Artifice
    I'm still not completely clear on what the problem is. The seams on the wall? Just a shot in the dark, I'd say your texture isn't tiled. It's doing the same thing with the cement texture, it's just so busy that it minimizes the seams. Could you maybe post a pic of your UVs in Max? That'd give us something to work with.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    this is for the bottom piece:
    doory.jpg
    Uploaded with ImageShack.us

    top piece:
    topuw.jpg
    Uploaded with ImageShack.us
  • Artifice
    I think the problem is the texture and UV seams. If you'll weld together similar parts (like the interior edges of those wall triangles) and line up your texture sheets to tile, you'll be able to minimize the effect. Modularity is all good and well, but you have to be careful about using textures with such large and noticeable patterns on them. The dark to light gradation hitting the UV seams is what's giving your trouble.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    ok so by weld together similar parts you mean,for example, taking one of those triangles like in the uv above and flipping it and welding it directly on top of the other to where it is identical and looks like only one?
  • Artifice
    No, doing what you're talking about is going to invert one of the faces and create that seam down the middle, whether there's a break in the UVs or not. It's like bookending a piece of wood - you end up with a mirror image on the other side...great for antique furniture, not so much for walls.

    What I mean is to make those two pieces one piece. Here's my mockup of what you have right now:
    UV_01.jpg

    I've circled in red the two UV edges you need to weld. Actually, they don't have to be welded, they just need to be congruent. The reason you're seeing a seam is because the texture pixels on one edge stop and start in a different place. You can see this in the top picture on the right - the numbers and grids don't line up. By moving your UV shells next to each other, you make sure that the texture flows from one part to the next. Using a tiling texture is another way to make sure it transitions well.

    Here's an example - UVs split apart, seams apparent:
    concrete_seams.jpg

    UVs next to each other, seams disappear:
    concrete_noseams.jpg

    Notice that the top and bottom are still separate pieces. They just occupy different parts of the same texture sheet. Hope that helps. Let us know what you come up with.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    ok so what you want me to do is attach the two triangle meshes to make a new mesh and then attach the bottom meshes to make a seperate mesh? i have one triangle and one bottom piece and they are just mirrored in the editor.

    the uv's,so you took the two triangle shaped uv's in the image above and just dragged them down to fit on the top seam of the bottom door shaped pieces? since i have seperate meshes,uv's can only be viewed one mesh at a time(correct me if im wrong) so how can i do what you're asking? the reason i didnt make it all one piece to begin with is because those two triangles at the top is going to not only be on top of that door opening but also on another mesh of a solid wall.and i would have to have the extra geometry if i did what you are saying. right?
  • Artifice
    First off, yes, you can have UVs for more than one mesh up at a time. In Max, you just select all the meshes you want and add a Unwrap UVW modifier on all of them. I have no idea how to do it in other programs, but I'm quite sure there's a way. The key point here, and the key to modular texturing, is that multiple meshes can share the same texture sheet. The UVs can even overlap. You could (and probably should) have all the stucco walls using the one texture sheet.

    For your particular example, I wouldn't worry about breaking it apart too much. You'll get a bit more texels out of mirrored geometry, but at the cost of it looking mirrored (like in your first example, where you can see the seam). Were it me, I'd make the lower part with the doorway one piece, and the upper part one piece. Then you can just instance the top piece to your other wall without an issue.

    Even if it takes a bit more geometry, that's ok. It's one of the tradeoffs of modularity. Geometry is cheap and you can have lots of it without a problem. Even UDK can display hundreds of thousands, if not millions of untextured polygons without a problem. What's expensive is textures and lighting. So when UDK loads your lower doorway mesh, it sees it has UVs. Great. Then it goes and gets the stucco texture, and everything looks good. Then it loads your upper triangular part, but wait! It's already loaded the texture it needs, the stucco texture from before. So it's saved a step. Then it loads your next wall, which uses the same texture...and on and on. So reusing those textures, even with more geometry, will run better than loading individual textures for each mesh. That's the beauty of modularity - you can have all these different meshes using the same textures, which increases performance. You just have to make sure that the textures line up, which you do with your UVs. That's what I was doing by moving the triangular part next to the bottom part.

    EDIT - Ok, here's a clearer example with a lot of images. It's all in Max, but it works the same in UDK. I made 4 meshes - the bottom doorway, the top triangular piece, a wall without a doorway and a wooden beam. I selected all four pieces and put an Unwrap UVW modifier on them and edited my UVs. Here they are.
    UV01.jpg

    And here are the UVs for each piece. Notice that the UVs for the wall and the doorway overlap, so they're using the same texture pixels. That's so the top piece lines up with both of them, increasing modularity. All the pieces of the wood beam are stacked on top of each other, so each side is the same. Again, these are 4 separate meshes, that could be imported into UDK individually.

    UV02.jpg

    UV03.jpg

    UV04.jpg

    UV05.jpg

    Now, here's the texture sheet, 1024x1024, that I applied to the pieces.

    textures.jpg

    Notice the brick texture. There's no UVs over it, so it doesn't appear on any of the pieces. If you made a little fireplace mesh, or a windowsill, you could put the UVs on top of that and have brick in your scene. Finally, here's the pieces textured, along with a little house I built from the pieces.
    final.jpg

    You could do the same thing in UDK. Just import your meshes and attach the same texture to each one, then move the pieces around however you want. I hope that somewhat clears things up for you. Let us know if you get stuck.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    ok i think i see now,i just have one question... in the uv's people are always stressing about having 2 pixel padding between different cutoff sections in the uv.so, does that not matter here where you line the pieces up?thats what im confused about.
  • Artifice
    Padding is most important when mip mapping occurs. That's when things get far enough away from the camera/player that the game engine doesn't want to spend a lot of resources rendering a high quality version. It fixes that by scaling your texture sheet down. As the mesh gets farther away, the texture sheet get smaller. Big differences in colors can 'bleed' into each other as there is less and less pixels to separate them. Here's an example from our previous image:
    mip.jpg

    At 128, 64 and lower, there's a chance that the game engine will grab a red brick pixel instead of a brown concrete pixel, because they're too close together. By padding your UV shells, you make sure than when the player is away from your house, there isn't a big red spot on it from the brick texture. If the textures are the same, or really close in color like the top and bottom piece, it won't matter because they're all the same brownish color.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    gotcha. when trying to snap meshes together in the editor and having the same texture,the uv padding is not important as the texture is meant to tile or be close to the same color. if the top mesh was stucco and the bottom mesh was brick,padding would be more important.

    so to fix my problem, i should make the triangle meshes one mesh and the two door meshes another mesh. once this is done i select them all, plus the seperate solid wall piece i mentioned earlier, and put an unwrap UVW modifier on all of the selected meshes and align the top triangle uv shells to where the are touching(but not welded to) the bottom door uv shells and also the bottom solid wall uv shell. and the wall shell and the door shell would be on top of one another and be aligned that way?
  • Artifice
    That sounds like it would work. You'll have to play with it to get it where you want it, but what you described would be a good start. You want to lay out your UVs for everything that will be on your texture sheet. That means anything with the stucco texture (walls, etc) as well as anything else you have room for (like the wood in my example- you can use the space for whatever you can make fit). The process is really a back and forth of what textures you need for the scene and what you can fit on a sheet. It takes a bit of trial and error to find out what will work.

    Two other points. First, Many artists use more pieces to cover up their seams rather than making everything line up all the time. For instance, you might put a wooden board or a row of bricks on the corner of your house. That not only hides the seam but breaks up the model with something visually interesting. That's something to try out.

    Second, you're going to have a hard time with that original stucco texture. The saturated, darker spot is going to be recognizable as tiling, no matter how you lay out your textures. A little bit is ok, but something that big is going to stand out. If you can't find a texture that's less spotty, you might try desaturating that one a bit, or cloning out the darker spots. Good luck with it and show us your progress.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    alright well thanks to all your help its looking better! i didnt attach the two top meshes or the two bottom meshes yet just so i can see how it looks before i did that,but i did unwrap them all together and lined the uv's to make sense and fixed the texture a little bit and this is what it looks like in the editor:
    83131621.jpg
    Uploaded with ImageShack.us
  • mortalhuman
    Actually, mip maps are a visual fidelity improvement before a performance enhancement. The further away you get the more gritty the detail becomes and the more has to be thrown out of the texture. While it has some benefits for performance, it has introduced some memory and bandwidth hits, too. I guess this is why you can disable mipmapping in GTA San Andreas on PC. When it came out, it was a monster to run maxed, had to turn off mipmapping, which resulted in gritty/dancing pixelated mid-clip (the far clip being much lower res textures on lod meshes anyhow).

    If you disable mipmapping at the hardware level, you may be able to reproduce the artifacts with some games as well. It's a screen space thing, if an object uses a 512 texture and only occupies 128 pixels on-screen, that texture is going to look mangled, in different ways, each and every frame. Mipmaps solve this. It's a visual quality thing.

    As far as atlasing a model, be it for modularity or just keeping things lighter on the render process, you could add details over the places where your "geometry tiling" breaks with seams.

    I mean, as opposed to adding "tiling padding" (a waste of texture space imo). In other words, say you have a wall which tiles a painted concrete texture and it uses only 1/8 corner of an atlas, where the seams are, you can add pipes over that area, signs, etc to make it unseen or less noticed. Break up the geometry with more geometry, basically, and then there is no seam to be seen. You'll find in some cases you need to tile extra padding in there and other cases geometry is a better approach.
  • rockbox
    Offline / Send Message
    rockbox polycounter lvl 6
    i read your edit on the previous page, Artifice. it was really clear, thanks for going over that with me. i havnt been playing with the pieces much cause i had a real busy week,i was being processed into the Marine Corps.but i wanted to ask you,did you buy your textures or did you find them on a reference material site?
  • Artifice
    Glad it helped! :) As for the texture, the stucco was from www.cgtextures.com I've got folders full of textures from there and other places, as well as a lot I've shot myself. I've never spent money on textures, though I know there are some nice packs out there. I didn't do any processing on the ones I used in the example because I was working quickly, they were just raw images pasted into Photoshop.
Sign In or Register to comment.