Home Technical Talk

Stitched UVs and Edges

Hello,
Can someone tell me what i need to setup in max to avoid edges on objects when a normal map is projected on them? I set the padding alreday to the max of 64 but it doesn't change a bit on the object.

Same object without stiched UVs works perfect, basically just the stitched areas show the edges in the engine or max...

Replies

  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    This sounds like you have a smoothing group splitting a uv island. Set your smoothing groups by your uv islands with a script, triangulate and then rebake.

    Without pictures I can only guess as to what the problem is.
  • David1983
    Options
    Offline / Send Message
    I'm new to this texture baking and creating thing, but i know some of the basic stuff but what i don't understand is why i need to triangulate the object? the low poly one right? And after triangulate the object, do i need to uvw unwrap it again ?

    i will post later a screenshot, but it is a simple cube, no smoothing groups, i just used the turbo smooth modifier.

    by the way, where i can get a good script for triangulate objects in max ?
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    You triangulate before you bake because in game engines objects are auto triangulated. Max auto-triangulates different then say, UDK, so your triangle topology will change, breaking your normal map bake. Therefore we must force our models to be triangulated, so it is uniform between all programs.

    The best way to triangulate is the non destructive way, in Max, add a "Turn to poly" modifier on your low poly, and set the "Number of Sides" to 3. This way you you can make changes to your low later if needed, working in triangles sucks.
  • David1983
    Options
    Offline / Send Message
    ok thank you very much i will try it today. So basically i add the turn to poly modifier to my low poly but i still use the same uvw unwrap map i have already created, right?
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
  • David1983
    Options
    Offline / Send Message
    ok, i have done a quick test before work, i have added the turn to poly modifier "Size 3" to my low poly object but i have keept the UVs from the non triangulate low poly object. After baking the normal map in 3ds max, the edges are still there. Jesus this issue drives me crazy!

    i will post some screenshots tomorrow
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Yea, get some screenshots up.

    I would like to see
    1. your uvs
    2. your low poly with no normal map and only smoothing groups
    3. your low poly with only the normal map applied with a dark diffuse and high-ish spec, 80 or so.
  • EarthQuake
    Options
    Offline / Send Message
    In max there is no reason to triangulate while working (as your mesh is always triangulated in max essentially, it stores the direction of the hidden edges). You should, however, triangulate before exporting your model a game engine/different app.
  • David1983
    Options
    Offline / Send Message
    Ok, here are the screenshots of a very simple sample object. The engine i used for testing in the cryengine.
    On the HP Object is a turbosmooth modifier applied. As i wrote if there are not stitched together, it works fine.

    @earthQuake i tried both ways, before and after triangulating the objects.

    olvj63cx.jpg

    stb46gr7.jpg

    tub5ht8r.jpg

    9797hcw8.jpg
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Your smoothing groups affect your normal map bake. So on your low poly, if you have hard edges defined by smoothing groups, as you do here, then you need to have those areas seperated on different uv islands.

    You have two options.

    Break apart your uv islands based on the smoothing groups you have here.

    Or the reverse,

    Set your smoothing groups by your uv islands, which in this case, would be to make the entire cube have 1 smoothing group.

    An image, unknown author: http://i.imgur.com/YgC0V.png

    In an unsynced workflow, for this case you would want to set the smoothing groups at harsh angles ~80°.

    Also to make sure, are you using a cage to do your bake?
  • EarthQuake
    Options
    Offline / Send Message
    Yeah the issue here is using hard edges but not splitting the uvs.
  • David1983
    Options
    Offline / Send Message
    ok sorry but i still don't get it...
    @Quack That means, i have to set for the whole lp object the smooting group 1 and than back it again ? thats all ?
    @EarthQuake when i split the UVs, the object isn't any longer seamless ?

    i mean what is now the right way if you bake something for games? Is there any good tutorial about this? i found some about baking normals etc but i found no tutorial about this whole smoothing groups thing and how to do it right ....
  • David1983
    Options
    Offline / Send Message
    I just selected the low poly object and set the smoothing group one to it but the result looks just bad



    khzsoo8a.jpg
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    David1983 wrote: »
    ok sorry but i still don't get it...
    @Quack That means, i have to set for the whole lp object the smooting group 1 and than back it again ? thats all ?
    @EarthQuake when i split the UVs, the object isn't any longer seamless ?

    i mean what is now the right way if you bake something for games? Is there any good tutorial about this? i found some about baking normals etc but i found no tutorial about this whole smoothing groups thing and how to do it right ....

    You are correct, your object will no longer be seamless. If you want seamless, you will have to chamfer your edges, leave it all as 1 smoothing group and bake that way.

    The result you posted looks correct for an unsynced workflow.

    Some good tuts:

    http://www.handplane3d.com/videos.html

    http://www.polycount.com/forum/showthread.php?t=118043

    You should read this entire thread, don't skim: http://www.polycount.com/forum/showthread.php?t=81154
  • David1983
    Options
    Offline / Send Message
    The problem is after baking the normal with one smothing group the object looks burned and the corners are not smooth, they have edges....
  • David1983
    Options
    Offline / Send Message
    Just forgot to post the screenshot, the cube is not smooth.....
    what you mean by unsynced workflow ?

    7nniujdq.jpg
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    David1983 wrote: »
    The problem is after baking the normal with one smothing group the object looks burned and the corners are not smooth, they have edges....

    Correct, that is expected. You have to fix this. Chamfer the edges of the low poly using 1 smoothing group(matching the high poly as close as possible), or split the uv shells and split the smoothing groups.

    Are you baking with a cage?
  • David1983
    Options
    Offline / Send Message
    Where is the sense to chamfer the edges? I mean the normal map is all about to save the polygones and triangels right?


    for solution number two, when i split the uvs, in know the probleam disapperas but the object isn't any longer seamless in this case

    i think i will watch the tutorials in the links first ti get a better understanding of this here, casue i'm a little bit lost right now. many thanx for the links!
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    normalmaps always just resemble the highpoly, as close as possible, the closer the lowpoly is to the highpoly the better the result will be. Now if you split uvs and smoothinggroups you add new render vertices, the same happens when you chamfer your edges and use one smoothinggroup. however a chamfered box will need uv splits as well and therefore use more vertices than the simple uvsplit sgsplit box, however if the shape is closer to the highpoly it might give you better results.

    in the endit is always an "it depends" and no "do it this way" whats the bst solution is very much case dependent, polygons ad vertices will not block you that much these days, but texturecompression might hit you bad with one SG on one object, as sogt gradients are much harder to compress than one value over a majority of the uv shell.
  • David1983
    Options
    Offline / Send Message
    Ok, maybe let me ask it this way, what would be the best solution for a cube with smooth / chamfered edges... ? :)

    In the case of concrete i just leaved the stitching and i think it looks still good, or not ?
    But i also noticed that the edges in shadow areas are not really smmoth...

    c4o7ypb6.jpg

    etodo6li.jpg
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    I bet those sharp edges have more to do with the texture mis-match than bad normals.

    The 'best' would be to match the highpoly as close as possible. So the best would be to chamfer the cube and use 1 smoothing group AND bake with an averaged cage.
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    you mean that vertical line? that looks just like a texture seam to me?
  • David1983
    Options
    Offline / Send Message
    Yeah it looks like a texture seam but why is this corner edged? It should be smoothed like the other ones.

    This time i was using different smoothing groups and the uvs are not stitched together. the texture is the same size like the rendered map in max.

    i will try today also the other way with one smoothing group but what you mean with averaged cage?
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    what does it look like with no diffuse texture applied?
    to me it looks correct besides the diffuse texture having a seam
  • David1983
    Options
    Offline / Send Message
    Without diffuse it looks this way...

    3eicj6i4.jpg
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    thats not no texture ^^
    this looks like lack of padding to me, but really it is hard to say, could you post your textures as well?
  • David1983
    Options
    Offline / Send Message
    I just noticed, that when i rotate the object, the corner with the issue becomes OK "in lighted area" but the next corner which turns into the shadow becomes the same issue...

    3n9hh7uu.jpg
  • David1983
    Options
    Offline / Send Message
    This time i tried to bake the texture with one smoothing group, no chamfer edges on the low poly for now, the result looks ok expect of the "burned" areas...

    9cix24ge.jpg

    eb4w6vwf.jpg
  • EarthQuake
    Options
    Offline / Send Message
    There is no magic fix here. You have to either split your uvs by smoothing group, or chamfer/bevel the edges.

    Even with a synced pipeline you will still have problems getting a 6 quad cube to render correctly, it’s simply beyond the technical ability of a tangent space normal map. This may seem like a simple task, but its actually one of the most stressing things you can do with a normal map.

    A synced pipeline means that the normal map baker and the renderer/game engine all use the exact same math (bi-normals and tangents). There is quite a bit of variance between different pieces of software. If you’re using a common game engine like Unity or UDK you can bake an object space map and use handplane to convert it to a tangent space map with the correct tangent basis.

    All that aside, I think generally you've got the wrong approach here. It looks like you’re trying to bake soft edges onto very large pieces of concrete. In a game environment, you wouldn't do it like this. You would use a tiling concrete texture and add bevels to give the model smooth edges. Otherwise you will need way too many textures which uses too much memory. Modern hardware can render very, very many triangles, but we never really have as much texture memory as we would like.
  • David1983
    Options
    Offline / Send Message
    ok thank! i got it.....) but i have a last question for the normal map baking, i just read that this probem apperas only on hard edges like on 90 degree, so where is the range where a normal map starts to fail... on how many degrees ? is there any value ?
  • Neox
    Options
    Online / Send Message
    Neox godlike master sticky
    it depends

    :)

    no really if the shading looks bad in the lowpoly, gets super black around the corners you should consider changing that, it can work and will work in many cases, but considering that your maps will be compressed you should think about lowering the amount of soft gradients inside your normalmap.
    A synced workflow can only take you as far as compression lets you ;)
  • David1983
    Options
    Offline / Send Message
    ok thanx..)
    Now i'm trying to bake a normal for a cylinder but there are again some problems, it seems like the normal didn't work at all on the corners...

    xafasivi.jpg

    j9wc46uc.jpg
  • Neox
Sign In or Register to comment.