Home Technical Talk

Making sense of hard edges, uvs, normal maps and vertex counts

Replies

  • Charlypop
    Options
    Offline / Send Message
    Charlypop polycounter lvl 2
    Thanks alot for the thread link Yury. I think that this is gonna help me alot.
    Cheers!

  • 3qaureman
    Options
    Offline / Send Message
    3qaureman null
    Trying to use Average normals with Xnormal like the first page says but I get strange results.

    Heres my average normals bake, what is happening?




    and here's my exported normals bake, this looks ok but it has horrible seams.




    For reference here's my low poly, high and UVs. I've made sure to seperate my UV shells on 90 degree angles and created a hard edge on the low poly where this is case.




    Low poly

    High poly


    Any ideas, I'm at a loss.


  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    You have to make sure your viewport and normal map baker are in sync. xNormal uses Mikktspace, and whatever application you are using has the support that same tangent space. 



    Here's that model in UE4, no shading artifacts, basically the same texture, wireframe, and smoothing. 
  • 3qaureman
    Options
    Offline / Send Message
    3qaureman null
    Ahhh, I don't know how you've managed that, I'm currently using Maya and Substance painter to see what my normals look like and they have horrible artifacts on both :o I think I'm doing something else wrong in my pipeline.

    I've set Maya's material to "tangent space normsl" which as far as I know is the correct one? 




  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Try baking and viewing in substance painter.
  • 3qaureman
    Options
    Offline / Send Message
    3qaureman null
    It doesn't look too bad in substance, the only problem is, is that the new job I'm starting soon is quite dated in it's tech and they don't use it, so I'm having to go back an basically learn how to work with older methods. X normals just isn't giving me good bakes!

    Here it is in subatance.

    What are you baking in btw? I'm curious if my problem is mostly X normals fault or I'm doing something wrong.
  • DeathstrokeFTW
    Options
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
  • ActionDawg
    Options
    Offline / Send Message
    ActionDawg greentooth
    It looks like your y direction needs to be flipped in the xnormal version.
  • DeathstrokeFTW
    Options
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
    I just dont understand how to fix the waviness in the cylinder without increasing polycount Ive read all the topics but cant seem to fix this issue.
  • artstream
    Options
    Offline / Send Message
    artstream polycounter lvl 11
  • DeathstrokeFTW
    Options
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
    @artstream Yes I did, it was helpful but in the end I kind of changed my whole model. I suppose I wont reduce the amount of sides of the cylinder to avoid the issue.
  • JHS
    Options
    Offline / Send Message
    JHS polycounter lvl 5
    You can subdivide your unwrapped lowpoly just for the baking of these edges. Easiest should be do add a turbosmooth modifier with restriction on smoothing groups. Also baking in max is a much more handy if you ask me (adjusting cages, objecthandling, direct render results).
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    There's also a tutorial someone made for substance where you can blend between two types of normal map bakes, should get rid of waviness.

    http://polycount.com/discussion/156215/tutorial-perfect-normal-map-baking-in-substance-designer-5-without-using-a-cage
  • ActionDawg
    Options
    Offline / Send Message
    ActionDawg greentooth
    @DeathstrokeFTW

    This will fix it:
    http://polycount.com/discussion/comment/2442912/#Comment_2442912
    http://polycount.com/discussion/comment/2444245/#Comment_2444245

    "Waviness" is simply the difference between a source and bake mesh. Nothing more than the normal map doing work! Just sometimes looks odd for angle changes on a cylinder.


    @ZacD I don't think so. It didn't make sense to me that the cageless blend method would accomplish that so I tried it real quick:

    It prevents skewing on the top faces details, but waviness is gonna always be exactly where this method's masking uses the averaged bake so no change from standard baking.
  • DeathstrokeFTW
    Options
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    I'd assume the point of the art test with those cylinders is to make sure you can get a perfect bake, so it's probably worth the effort.
  • Klo Works
    Options
    Offline / Send Message
    Klo Works polycounter lvl 8
    lots of info,
    each time I  learn new stuff thanks, guys.   :)

    I got a question:
    about the cone object how to deal with it like:
    nail,spike,pin etc...
    hi poly

    low


    after baking


    as you can see there is sort of rainbow effect how to deal with these issues?


  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    I've found cones don't shade well in general. It might be better to unwrap the ends as a cone flattened into a circle. 
  • Klo Works
    Options
    Offline / Send Message
    Klo Works polycounter lvl 8
    I've found cones don't shade well in general. It might be better to unwrap the ends as a cone flattened into a circle. 

    if I flatten it, is it gonna stretch? 


    is this consider ok .

  • Yury
    Options
    Offline / Send Message
    Yury polycounter lvl 8
    I would suggest not to bake the body of the nail at all. I mean it's a simple cylindrical form and should look just fine as it is without a normal map
  • Rekov
    Options
    Offline / Send Message
    Rekov polycounter lvl 5
    Is it bad practice to not use hard edges and split uvs for all sharp edges on a hard surface model? For the most part on this model I used split UVs and hard edges, but for the center part (smoother stone in the picture) I had one smoothing group even though there's a hard edge, and the normal makes it look right. The reason I ask is that in hindsight I'm worried that in different game engines or whatever it will come out looking wrong. Should I have just used hard edges here and split the UV?

    To give another quick example, the faces outlined in green are one smoothing group, with the normal used to create the angular look. Is it bad to do this, or am I good as long as it looks okay? Will it reliably look okay in various engines, or am I setting myself up for a future disaster here?

  • ActionDawg
    Options
    Offline / Send Message
    ActionDawg greentooth
    If the tangent basis is synced between the baker and renderer, and you don't push it too far, it's totally fine to not split every last edge. Practicing, you'll get a feel for how much you can do with synced tangents and where you can push harder.

    The problems you can run into when pushing it too far:
    - Imprecision due to 8-bit normals. This will look the worst on very smooth, reflective objects with strong normals and usually appears as banding.
    - Texture compression. Game engines will tend to compress your textures and this can cause problems when a single normal map does too much work.
    - Shading problems when making LODs, or potentially mipmapping causing you to lose resolution you need.
    - Some engines don't have the highest quality normal encoding (something they do with models behind the scenes), so even with synced tangents you might not get a 1:1 result with your baker. For UE 4, as of 4.12 this is fixed.
    - In rare cases with UE 4 you'll need to turn on "Use Full Precision UVs".

    I'm unsure about how those big gradients will come out, but it really depends on the engine. So my best recommendation is test! Take those things above into account and know it's not a pure science, but a puzzle of optimization and what you can get away with.
  • Rekov
    Options
    Offline / Send Message
    Rekov polycounter lvl 5
    Thanks somedoggy. I modeled in Blender, baked the normals in xNormal, and textured in Quixel, and so far I haven't had any issues, but i have noticed that if I try to render it in blender at a very oblique angle I get some wonkiness. Ultimately I need them to work in Unity though. I think I'll go back and redo it regardless. It'll only add a few more verts, it won't take too long, and more practice never hurts.
  • Klo Works
    Options
    Offline / Send Message
    Klo Works polycounter lvl 8

    how to deal when you have hi poly bevel intersect  like in the image:



    I bake one with no bevel but the result show dark
    the second with a bevel which gives me a better result.

    just wondering is this the way to handle it ? or is there a better way? 
     

  • Klo Works
    Options
    Offline / Send Message
    Klo Works polycounter lvl 8
    solve it thanks to my friend @ZacD
    I just need to seprate it.



     :) 

  • RashedAlmetrami
    Options
    Offline / Send Message
    RashedAlmetrami polycounter lvl 10
    Hey guys,

    I'm currently baking out my normal maps for a project of mine using substance painter. I wanted to keep a texel density of 10.24/cm so that I could have a high resolution across the mesh when rendered close-up. 

    The issue is that to do this I had to separate the main body of my tank to two 4096x4096 textures but I think this is causing an issue in my normal map?

    Seam using two 4096x4096 textures on one 




    I took the same model and arranged it into one texture which fixes the issue but leaves me at 4pixels/cm which doesn't look too good. 
    No Seam:



    UV's


    How do I fix this? I'm kind of at a stump  

    Any help is much appreciated 
  • Nam.Nguyen
    Options
    Offline / Send Message
    Nam.Nguyen polycounter lvl 9
    I don't think that splitting texture sheets can cause seams, and your screenshots with and without problems are not even from same mesh.

    Look like you have some bevel on those hard edges, make sure you split UV islands where you have smoothing split. ( tutorial on page 1 of this thread )

    If you don't use a cage, make sure to check "Average normal" in SP. The default frontal distance usually works, but depend on your unit setup, your mesh could be tiny or huge, so play around with it to see if you get different result.
  • RashedAlmetrami
    Options
    Offline / Send Message
    RashedAlmetrami polycounter lvl 10
    @Nam.Nguyen
    It's the same model, I've just removed the other peices to test if one UV sheet fixes the issue. UV's have been split by hard edges and smoothing groups are set by UV islands
  • ryebot
    Options
    Offline / Send Message
    ryebot polycounter lvl 5
    I'm trying to understand what magic normal maps can and can't do.

    For example, I thought I was being clever doing this, but the bake doesn't come out. Is there just not enough geo to support it, or is there a way to make it work?


  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Normal maps cannot fake actual depth. You need to adjust the high poly to be more shallow and have a shape more similar to the low poly. Or put more geometry into the low poly.
  • ryebot
    Options
    Offline / Send Message
    ryebot polycounter lvl 5
    @ZacD Okay, thanks! This stuff is starting to make sense to me now.
  • ActionDawg
    Options
    Offline / Send Message
    ActionDawg greentooth
    Well how do you want it to look in the end? With the low's geo as is the result will look like a decal. If you want it to look like it's really going inwards you'll need to have the low poly geo reflect that.

    Normal maps are always more successful the less work they have to do.
  • throttlekitty
    Options
    Offline / Send Message
    @ryebot If you're looking to get a feeling of depth as that camera angle shows, look into using a parallax map. This can bake properly, though you may be better off making the inset shallower. Also, your low poly should match the high more closely, and consider trying a tight-ish bevel along the top/front edge loop so the geometry normals have a good transition from the flat front to the rounded side.
  • DeathstrokeFTW
    Options
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
    Is there away to avoid gaps in the UV space after youre done uving in Max? My environment scene has several object with 2k maps but most of them dont occupy all of the uv space, I have tried adjusting the padding setting but it didnt do much. Ill link image when I get back home.
  • ryebot
    Options
    Offline / Send Message
    ryebot polycounter lvl 5
    @DeathstrokeFTW it would be helpful to see what your UVs look like, but padding is actually pretty important to your UVs. If there's not enough padding you can get artifacts around your seams when mip-mapping occurs. There's also no rule saying that you have to use 100% of your space, but it's also possible you're not using all of your space efficiently. Again, this is hard to say without seeing the maps.
  • DeathstrokeFTW
    Options
    Offline / Send Message
    DeathstrokeFTW polycounter lvl 4
    ryebot said:
    @DeathstrokeFTW it would be helpful to see what your UVs look like, but padding is actually pretty important to your UVs. If there's not enough padding you can get artifacts around your seams when mip-mapping occurs. There's also no rule saying that you have to use 100% of your space, but it's also possible you're not using all of your space efficiently. Again, this is hard to say without seeing the maps.
    Sorry wasnt able to upload one earlier :P
    This is one part of the mesh. The question is should I really cut the big one in half? That piece will have more than one texture btw via material ID.


  • Thanez
    Options
    Offline / Send Message
    Thanez interpolator
    @RashedAlmetrami why aren't you using a single 8192x4096 texture to avoid the problem entirely?
    If you bake with a proper cage you shouldn't get a noticable seam on your normal maps. Those seams there look to me like you have cage issues.
  • RashedAlmetrami
    Options
    Offline / Send Message
    RashedAlmetrami polycounter lvl 10
    @Thanez Im using Substance Painter to texture and unfortunately you can't work or preview at 8k I think?
  • Thanez
    Options
    Offline / Send Message
    Thanez interpolator
    @RashedAlmetrami Then I'd look at fixing the cage. I'm impossibly certain that your cage is the problem if you're correct when you say your UVs and smoothing groups aren't the issue.
    Or you can upload the model and I can take a look at it in a few hours when I get off from work.
  • RashedAlmetrami
    Options
    Offline / Send Message
    RashedAlmetrami polycounter lvl 10
    @Thanez  I fixed the issue by applying one smoothing group to the entire model and as I'm working to a synced workflow it shouldn't be that much of a problem. I think I'll just use a cage in future. Thank you for the help! 

    One quick question, my model isn't baking AO information from my instances, any idea why that would be? 
    http://polycount.com/discussion/184563/substance-painter-ao-not-including-instances#latest

  • Thanez
    Options
    Offline / Send Message
    Thanez interpolator
    I've never baked in Painter, so I'll let someone else answer that :) 
  • shogunato
    Options
    Offline / Send Message
    shogunato polycounter lvl 12
    Hi.
    By using mikkTspace synced workflow (1smooth grp) between max and unreal do i need to manage  the face vertex normal before sending for baking ? It can help for better baking ?


  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Using custom weighted normals can reduce compression artifacts and help keep highly reflective surfaces looking super clean. It's not necessary for most assets, but can be worth it for certain situations. 
  • shogunato
    Options
    Offline / Send Message
    shogunato polycounter lvl 12
    Many thanks for the reply
  • shogunato
    Options
    Offline / Send Message
    shogunato polycounter lvl 12
    I spend 2 day to understand what is wrong. This makes me crazy



    Workflow
    1. From Max 2016 : - Export all mesh (low, high, cage) using FBX 2013 with 1 smoothing group mikkTspace (with export smoothing group ON and Tangents & Binormals OFF) for the cage and low res mesh, all transform freeze for all meshes and only the cage and low res mesh are triangulated

    2. Baking  in Xnormal 3.19.2 with Mikktspace "Compute binormal in the pixel shader" checked. Baking at 2048 X 2048 pixel. Normal map Swizzle Coordinates = X+ Y- Z+
    3. Import the same low res mesh into UE4 with the "import normal" option

    4. Baking in Hnadplane with unreal engine 4 preset
    5. Import the same low res mesh into UE4 with the "import normal" option
    Files :  https://www.dropbox.com/sh/1s68spha2l7sfvd/AACbGNl1WExZG1U-rMuF8luEa?dl=0

    I would love to have some advices to explore :):)

    edit: here what i've got by exporting tangent binormal and hard edge workflow






  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    The remaining artifacts in the last image just look compression related. 
  • shogunato
    Options
    Offline / Send Message
    shogunato polycounter lvl 12
    yep, looks not so bad with hard edges workflow but i would really like to use mikktspace
  • Nominous
    Options
    Offline / Send Message
    Nominous polycounter lvl 10
    In that Handplane video on page 1, I understand that the UV layout for the left sphere causes the vertex count to double. The author states that the resulting tri count is 107 while the original was 96. However, I count 15 edges where the UVs lie. Shouldn't the resulting tri count be 111?
  • NoRank
    Options
    Offline / Send Message
    NoRank polycounter lvl 3
    So when you're using a synced workflow you have less vertices since you have less uvshells and less smoothing groups, still it has it's own drawbacks. So my question kinda goes to, is it really a hard positive impact on performance or just a minor thing nowadays? 

     I know it's a good practice to have everything as optimized as you can, was just curious about that.
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    NoRank said:
    So when you're using a synced workflow you have less vertices since you have less uvshells and less smoothing groups, still it has it's own drawbacks. So my question kinda goes to, is it really a hard positive impact on performance or just a minor thing nowadays? 

     I know it's a good practice to have everything as optimized as you can, was just curious about that.
    Optimizing polygon counts is generally a waste of time, especially down to that level. Quad overdraw is the main tricount related performance impact. Sometimes dynamic shadows are effected by the tricount, like Cascaded Shadow Maps in UE4. But you can use a lower polygon mesh as the shadow caster if that's an actual issue. 
Sign In or Register to comment.