Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

Confusion with Normal baking issues around edges/borders

polycounter lvl 5
Offline / Send Message
Pinned
DustyShinigami polycounter lvl 5
Hi

This issue has been a reoccuring problem that I've not been able to figure out and was wondering if someone could help me? For a clothing asset I've made, I've followed this workflow on getting clean topology and UVs from Marvelous Designer to Maya/ZBrush - https://www.artstation.com/blogs/emilie_boisvert/RDKR/marvelous-designer-to-maya-part-1-retopology-domo-arigato-auto-retopo

Everything has worked nicely and I used the same method for adding thickness, unitizing the thin outer edges/borders and they've all baked nicely in Substance Painter. Can't say I've noticed any glaring issues; they all look pretty clean. :)





But with another piece - a gorget - I don't seem to be getting the same results. There are thin strips that I've used Unitize on and then unfolded along either U or V and then straightened. It has the same resolution. For test bakes 1K and for the final bakes it'll be 4K. However for the gorget, I'm not getting clean results.



What could the reason be for this? Is it because edges like this need to be thicker...? They certainly are for the clothing anyway. The low and high are matching pretty well, though I know there's a few areas where the silhouette isn't quite right. I can sort this out another time. I've deleted the inside faces and part of the back, which won't be seen, and I've also included some additional edge loops to better match the curvature. And yes, I've played around with the Frontal Distance slider. I get that these long thin strips aren't very big, and therefore won't get much resolution, which is what I chalked it up to before, but then, they're not for the clothing either. And those baked out fine.



Any ideas? Or any advice on how to get them to bake nicely? Thanks.

Replies

  • Fabi_G
    Offline / Send Message
    Fabi_G veteran polycounter
    Hi! can you share the part that gives you the issue?
  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 5
    Fabi_G said:
    Hi! can you share the part that gives you the issue?
    Sure. To be fair, since doing the maps at 4K, the issue doesn't look to be much of a problem, and some areas are hidden anyway. But I've taken a mid poly (sub-div level 3 in ZBrush, I think) and some parts don't appear to be matching up very well. The collar area also needs a bit of a bevel to avoid this baking issue at the top:



    But it's mainly these thin strips/borders here:



    The quality always looks quite low or there's some bleed.
  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 5
    Yeah, did another test bake. This time things are matching up better and I bevelled that neck region and kept the insides as well, but these thin strips are still a bit iffy.




  • pior
    Offline / Send Message
    pior grand marshal polycounter
    In this context, "sharing the parts" means actually uploading the necessary and sufficient files for people to reproduce the issue.
  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 5
    pior said:
    In this context, "sharing the parts" means actually uploading the necessary and sufficient files for people to reproduce the issue.
    Ohhh. Sorry. Totally misunderstood. ^^; I'm away from my desktop at the moment, so I'm not able to set things up so the file size is smaller. At the moment it's over 170MB.
  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 5
    Fabi_G said:
    Hi! can you share the part that gives you the issue?
    Okay, I've reduced the file size to about 60MB by making the accessories maps 1K. Although I imagine I'll need to include the high poly file...? The rivets on it are wrong. I swear I'd corrected those in ZBrush and saved, but not according to Perforce. :-\ I'll have to rectify those another time. Hope the links work...
    https://www.dropbox.com/scl/fi/kfnzhduj1mleakc8ve11w/gorget_high.fbx?rlkey=wyh6tu60stir1cgndqf9y710n&st=retamg50&dl=0

    https://www.dropbox.com/scl/fi/r2g4vs4pdd85xy2qo6noo/SP_PretaGarb.spp?rlkey=qz2wiel8lnlj7bxk50wh7qelz&st=bzun9s5h&dl=0

    Ironically enough, when I did another experiment with just the object on its own, and did a test bake at 1K, everything was perfectly fine. o_O

    EDIT: The links don't work for me :-\
  • Fabi_G
    Offline / Send Message
    Fabi_G veteran polycounter
    Hi! Took a look at the files and at the lowpoly exported from Painter and wrote down some thoughts (some not on issue):

    I think big part of the issue your describing is that the difference of the curvatures between high and low of the gorget is too great - but the highpoly would be best improved as well (see below).

    Low Poly

    Comparing the density of the different lowpoly meshes, it looks inconsistent, the gorget element being the lightest. I would reduce polycount on some smaller elements (purse strings quite dense) and increase resolution of the gorget, particularly it's curvature. Occluded areas, such as the insides of the gorget can be reduced, or even capped off, depending how you want to use it. Currently, the head opening of the gorget has the same amount of edges as the chest one - in such cases you can split edges as a shape is expanding, with the goal to keep a more even density.



    It looks like there are some hard edges without UV splits. When baking the normal map, I expect some visible seams here.


    In areas where you have a UV seam along edges with steep angles, like on the seams on the knotted cloth, I would add hard edges. That way the normal map has to compensate less.


    Aligning UV borders with the pixel grid will minimize aliasing artifacts. Doing so will likely introduce some stretching. Personally, I would trade stretching for cleaner bakes. For example:

    I attached an edited lowpoly with all those points implemented, named 'Accessoirs_low'.

    Highpoly

    Looking at the highpoly, I see it has hard edges. Recommend to make those smooth, unless you want faceting in your bakes, which become more obvious at higher texture resolutions. With the extrusions/details some edges are so close to each other that the shading will remain fairly sharp. Note that super sharp, un-beveled edges means very tight shading, no shading gradients and therefore the information to be captured by the normal map is very narrow. I would try slightly exaggerated bevels. I think you'd basically want your highpoly to read nicely a various distances, edges having enough width to catch light.


    Using a Mid-Poly?

    Likely depends much on the specific workflow and subject, but I'd argue in certain cases you might get a better result baking from a more mid-poly with cautiously authored shading. At the same time lowpoly and 'high'poly match more closely. Here is a quick test (at 2k res):
    A - baked highpoly (edited some, removed hard edges), textures showing waviness, attached file 'gorget_high_modified'

    B - baked a modfied lowpoly (beveled edges/ shading), attached file 'Gorget_high_midLowpoly'


    Skewing

    I would keep skewing, as a result of baking with averaged vertex normals, in mind. I think the shading of the lower rows of rivets in the screenshots you shared earlier shows this. Based on the cage preview in Painter, you can tell where it's going to happen.

    There are several options to address this (and probably more I can't think of currently):
    •  Just take it as it is. If it's barely noticeable and you're okay with it.
    •  bake an isolated, un-skewed version of that strip and map the game meshes strip UVs to that. (Will also address waviness due to difference between high and low poly mesh curvature)
    • modify vertex normals of game mesh or use a cage
    • don't bake such details but add them during texturing
    • increase geometry (affecting vertex normal) or add such details as geometry

    Random notes

    With the exported mesh imported, it appears the gorget element is symmetrical, but the mesh is not centered. I would make sure that symmetrical elements are centered so they are easily mirrored or edited symmetrically.


    Since the bake settings in the Painter file were quite high (4k with 64x Supersampling :sunglasses:) : When iterating on meshes and bakes, I would do so at a lower texture resolution to increase speed. If you can make it look good, it should look good/better at a higher res.

    Well, that took longer than I expected :D hope it's somewhat understandable. Keep in mind, those notes are based on my experience and others might do things differently. In the end, the result matters. I would certainly recommend the good old 'who put the waviness in my normal map' thread.

    Much success with the project!
  • DustyShinigami
    Offline / Send Message
    DustyShinigami polycounter lvl 5
    Fabi_G said:
    Hi! Took a look at the files and at the lowpoly exported from Painter and wrote down some thoughts (some not on issue):

    I think big part of the issue your describing is that the difference of the curvatures between high and low of the gorget is too great - but the highpoly would be best improved as well (see below).

    Low Poly

    Comparing the density of the different lowpoly meshes, it looks inconsistent, the gorget element being the lightest. I would reduce polycount on some smaller elements (purse strings quite dense) and increase resolution of the gorget, particularly it's curvature. Occluded areas, such as the insides of the gorget can be reduced, or even capped off, depending how you want to use it. Currently, the head opening of the gorget has the same amount of edges as the chest one - in such cases you can split edges as a shape is expanding, with the goal to keep a more even density.



    It looks like there are some hard edges without UV splits. When baking the normal map, I expect some visible seams here.


    In areas where you have a UV seam along edges with steep angles, like on the seams on the knotted cloth, I would add hard edges. That way the normal map has to compensate less.


    Aligning UV borders with the pixel grid will minimize aliasing artifacts. Doing so will likely introduce some stretching. Personally, I would trade stretching for cleaner bakes. For example:

    I attached an edited lowpoly with all those points implemented, named 'Accessoirs_low'.

    Highpoly

    Looking at the highpoly, I see it has hard edges. Recommend to make those smooth, unless you want faceting in your bakes, which become more obvious at higher texture resolutions. With the extrusions/details some edges are so close to each other that the shading will remain fairly sharp. Note that super sharp, un-beveled edges means very tight shading, no shading gradients and therefore the information to be captured by the normal map is very narrow. I would try slightly exaggerated bevels. I think you'd basically want your highpoly to read nicely a various distances, edges having enough width to catch light.


    Using a Mid-Poly?

    Likely depends much on the specific workflow and subject, but I'd argue in certain cases you might get a better result baking from a more mid-poly with cautiously authored shading. At the same time lowpoly and 'high'poly match more closely. Here is a quick test (at 2k res):
    A - baked highpoly (edited some, removed hard edges), textures showing waviness, attached file 'gorget_high_modified'

    B - baked a modfied lowpoly (beveled edges/ shading), attached file 'Gorget_high_midLowpoly'


    Skewing

    I would keep skewing, as a result of baking with averaged vertex normals, in mind. I think the shading of the lower rows of rivets in the screenshots you shared earlier shows this. Based on the cage preview in Painter, you can tell where it's going to happen.

    There are several options to address this (and probably more I can't think of currently):
    •  Just take it as it is. If it's barely noticeable and you're okay with it.
    •  bake an isolated, un-skewed version of that strip and map the game meshes strip UVs to that. (Will also address waviness due to difference between high and low poly mesh curvature)
    • modify vertex normals of game mesh or use a cage
    • don't bake such details but add them during texturing
    • increase geometry (affecting vertex normal) or add such details as geometry

    Random notes

    With the exported mesh imported, it appears the gorget element is symmetrical, but the mesh is not centered. I would make sure that symmetrical elements are centered so they are easily mirrored or edited symmetrically.


    Since the bake settings in the Painter file were quite high (4k with 64x Supersampling :sunglasses:) : When iterating on meshes and bakes, I would do so at a lower texture resolution to increase speed. If you can make it look good, it should look good/better at a higher res.

    Well, that took longer than I expected :D hope it's somewhat understandable. Keep in mind, those notes are based on my experience and others might do things differently. In the end, the result matters. I would certainly recommend the good old 'who put the waviness in my normal map' thread.

    Much success with the project!
    Wow. Thank you so much for the lengthy and informative feedback. Good to know those links did work in the end. :D It might take me a while to fully process and understand some of it. ^^; I'll try and go over everything I'm a bit unsure about.

    I was a bit unsure whether or not to modify the purse strings. I didn't want to reduce them too much in case there wasn't enough curvature and the bakes came out bad. I don't think they're that dense personally. If anything, I think the cloth knot is a bit much for what it could be. The tri budget is around 25-35K. Everything together, including the clothing, sits at around 36K. So I could get that cloth knot reduced a bit. Maybe even the coin purse. I'm a bit confused why you've written 4K for the cords. Unless the file I sent is using a slightly higher subdiv than I intended. In my Maya scene, they're about 1120K. ^^
    To be honest, I didn't even think about capping off the hole of the gorget; good call. The inside faces/thickness I was going to remove after the bakes, but capping would be better. Will probably do that for the high as well. I'm a little bit unsure about this part:

    Currently, the head opening of the gorget has the same amount of edges as the chest one - in such cases you can split edges as a shape is expanding, with the goal to keep a more even density.

    How do you mean exactly? Do you mean for me to add additional edge loops through the main body of the gorget and then terminate them with tris towards the neck?

    Regarding the edges of the knotted cloth - wouldn't a bevelled edge be any good then? I figured for things like cloth, edges would be better bevelled to make them a bit rounder to avoid baking issues...?

    Regarding the aliasing - is that one of the reasons why so many UV shells are Unitised...? And so they're cleaner looking by all being rectangular? I've always used that for UV islands that are tube-like and straight, but I've never used it for more organic and awkward shapes.

    I didn't realise that having harder edges would produce faceting, especially if they're at a high subdiv level. I tend to use Polygroup/edge creasing in ZBrush. Rather than that, would you recommend I just give edges more supporting edge loops to make it a bit softer? Also what/where do you mean by 'waviness'? Is that caused primarily by hardened edges?

    Regarding the skewing - I'm actually okay with how those rivets turn out, so that's not an issue. :) However, I'm trying to get my head around suggestion 2 in case I ever, hypothetically, do that in future. So... how would I do that exactly? How would I go about getting an un-skewed version? And would I separate that part of the mesh and its UV on its own, bake it, and then combine that with a baked texture map where it's skewed?

    Regarding the mesh's symmetry - I'm guessing the enemy character I modelled over as a reference isn't quite centred to the world...? Or is asymmetrical.

    But yes, usually when I'm doing test bakes, I tend to bake at a lower resolution. :) Usually around 1K.

    Again, thanks for the suggestions. ^_^
Sign In or Register to comment.