Home Technical Talk

Help - Mesh is causing flipped normals across axes in substance (non overlapping UVs), nothing works

Hi, I am following the tutorial for Handgun by Eugene, I am at the texturing step and when I try to paint across the seam, the normal is flipped for some reason on the opposing axis, Like in the images
You can see that the normals are weird on the right side


better visible here, The lighting is not uniform


This is the exported map in blender, notice the blue is kind of upside down on the right.

UVs

Any other mesh works just fine, it is just this particular mesh that is causing the issue, even If I delete the mirrored side and then duplicate + Re Uv it, the issue persists.

I have tried everything within my means, there are no custom properties attached. If I create a new mesh and mirror it then it works, but If I use this one then the normal issue appears.

This is not a UV problem (To my limited knowledge), as I have re-did the UVs for this test mesh.

I am not keen on re-doing the whole process of lowpoly and Uv, and would be grateful if someone could help me as to what is wrong with this one.

Thanks a lot!


Replies

  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Well, you mention following a tutorial (which seems to be a solid ressource https://hatchery1.gumroad.com/l/QZemE ) but then you mention "painting across the seam" and that "the blue is kind of upside down on the right". These do not sound like things from the actual tutorial but rather the outcome of an attempt at fixing an issue caused by *not* following the instructions.

    There is a long list of things that can go wrong with this process : baking setup, color space, and many, many other things. And we cannot guess what the instructor says in a paid tutorial since we can't access it.

    But regardless, before attempting to "paint over" anything your model needs to look the way it should with its normalmap applied ... which clearly isn't the case here. You are probably introducing variables not present in the course, like different software or different settings.

    And yes, the colors of tangent-space normalmaps will nearly *always* shift colors across a UV seam as the color data is relative to the surface and the UV coordinates. Do a test bake on very a simple model,  and then another test bake after rotating a UV island. You'll notice it that all the colors of the part will change. 

    So, ideally you'd simply contact the author of the course and ask him about your issue. But you could also simply upload your low and high for an isolated part and have people here have a look at what is wrong with the setup and how to fix it ... and thankfully It won't involve painting over anything :)
  • okidoki
    Offline / Send Message
    okidoki greentooth
    Maybe if the normal map mirror trick mentioned in the wiki Normal_Map_Technical_Details ( especially this post) was used here but somehow wrongly done (?) so one can not paint across the seem ??




  • Infinitycg
    pior said:
    1) These do not sound like things from the actual tutorial but rather the outcome of an attempt at fixing an issue caused by *not* following the instructions.

    2) But regardless, before attempting to "paint over" anything your model needs to look the way it should with its normalmap applied ... which clearly isn't the case here. You are probably introducing variables not present in the course, like different software or different settings.

    3) And yes, the colors of tangent-space normalmaps will nearly *always* shift colors across a UV seam as the color data is relative to the surface and the UV coordinates. Do a test bake on very a simple model,  and then another test bake after rotating a UV island. You'll notice it that all the colors of the part will change. 

    4) So, ideally you'd simply contact the author of the course and ask him about your issue. But you could also simply upload your low and high for an isolated part and have people here have a look at what is wrong with the setup and how to fix it ... and thankfully It won't involve painting over anything :)

    Hi, Thanks a lot for replying.
    Apologies for not making the post clear, reading it after a break, and it is a bit ambiguous
    I will try to make this reply detailed so as not to cause confusion

    1) The Software, Tutorial and how I followed it
    The tutorial originally is in 3ds Max, it uses uv-layout for Unwrapping and rizom for packing, toolbag for the Highpoly to low and then substance painter in the end.
    On my end, I followed the tutorial in blender, and did the UVs natively. Then on it is the same, Toolbag and Painter

    While I did follow the tutorial, I did not copy it step by step, I watched it and then did my stuff, but none of it deviates much from the tutorial. Sure the lowpoly has different geo, seams and hard edges, but that is normal stuff if you are following a tut

    While I am not an expert, I have prior experience in 3d, I was fairly familiar with all the major steps involved in the tutorial (Modelling, UV, Hp to Lp baking) and wanted to learn the professional workflow. The Overlapped UV workflow is new to me. I did do a model of AK before getting the tutorial

    2) The paint-over: wrong word, sorry for that. What I originally meant is, when I paint on the model, The normals look weird on the -x axis (with the painted side on the +x axis, but that does not matter, essentially the normals for the blue channel are doing a flip flop across the seam), The seam is not the issue, the normals going flip flop is.
    I did import Eugene's project files, they are very similar, Overlapped UVs and similar seams, but this issue is not present in his model, I can paint his model just fine, the normals do not do the Flip-flop there

    3) The Problem


    This model is the Low poly of Eugene, I have just painted height on it, nothing more. Here the highlight is acting naturally, it is not duplicating and upside down on either side, just a falloff.
    The UVs are offset on his part as well

    My Test mesh from the whole model, with offset UVs

    This is what the exported map on my lp looks like
    This is what it should look like (eugene's LP)

    Similar geo model and Extreme case of Sphere also do not display this issue

    this is the google drive link to the LP, HP, Substance file and Normal bake - https://drive.google.com/drive/folders/1rLP4zpXB1sH782jtKVyKvesnq4JbQ52d?usp=sharing

    Also, the normal bake goes smoothly in marmoset, The issue appears in painter

    The normals look fine on both my, and eugene's model. nothing inverted or weird

    I want to know what the issue could be, because if I redo the lowpoly (Using the same set of software) then are there chances of this happening again, if so, what is causing it.

    Thanks again

  • Infinitycg
    okidoki said:
    Maybe if the normal map mirror trick mentioned in the wiki Normal_Map_Technical_Details ( especially this post) was used here but somehow wrongly done (?) so one can not paint across the seem ??





    Thanks a lot, going through the thread, I will update if something helps
  • Noren
    Offline / Send Message
    Noren polycounter lvl 19
    I didn't look at the model or read everything in detail, but I dimly recall having some problem with the normal map mixing mode in Substance in the past (replace vs. combine) and it not being really intuitive or behaving like expected. Might be worth doing a quick test if that changes anything.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Hello !

    Well, Substance Painter will never be the actual target environment for the model to be displayed in - an actual game engine will be. Hence I personally see no point in giving *any* attention to the way things shade in Substance Painter (outside of making sure that the generators behave as intended). In other words, once you have an asset that shades well in-engine, Substance Painter can then simply be used for what it is good at : texturing models.

    (I've personally stopped using it years ago as it doesn't have a place in my own specific pipeline, but of course I understand that many rely on it. Interestingly enough the first release of Substance Painter had incorred normalmap shading. So who knows, perhaps there are still broken things going on with it even after all these years).

    At the end of the day your model loaded in Blender Eevee and with its normalmap applied looks absolutely flawless to me. And an asset looking good in this context can 100% be exported faithfully to UE4/UE5 since the Blender to Unreal FBX-centric pipeline gives full control on all the needed export/import options. I assume that it would also be the case with other engines.



    TLDR : Outside of the UVs not being organized intuitively and perhaps the packing being a tad too tight I don't think there is anything wrong with this model or your workflow, at all.
  • Infinitycg
    @pior Thanks a lot for replying!
    This time the intended purpose is just rendering and learning, but I understand your point. If the issue is not blatantly obvious, and I have to point it out, then it won't be visible to anyone oblivious to it, probably. I proceeded a bit further and added this noise to it, and it is mostly gone.
     


    It is visible in blender without this noise, but I will only add to it, so it doesn't matter I guess.
    Will see how this progresses and if it creates any issue during further texturing.

    @Noren, thanks for your input as well, while the Normal mixing was same in both options (i.e. no visible effect), I did see this "Height to normal method", and set it to sobel, that softened up the seam, further reducing the issue

    Will update if there are any further issues, or when I finalize the project (wish me good renders! <3 )

    Again, thanks a lot for helping out.
  • okidoki
    Offline / Send Message
    okidoki greentooth
    This weird.. does substance somehow read the normals differently  ?? Using the low FBX and normals ( extremely "strengthened" and only blender 3.6) here.. no problems (or i missunderstood something) :


  • Infinitycg
    @okidoki I think the model is the issue and not substance. If you see the normal image png, it is not messed up (Otherwise both sides would look bad as the texture is repeating. At least that's what I think, not very versed with this )

    This is a render of both the models (Eugene's and mine) in the same conditions, Normal set to 1.
    This inverted lighting is the thing that's bugging me

    It is not super obvious from a distance and not when lighting falls uniformly on both sides (If you place the light source perpendicular to the surface, It won't show), but if you are close and the light is falling at an angle, it will look like this

    The wireframes are not that different either (2nd image)

    I have included the zip for comparison, it has both the LP models and normal maps packed




  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Ok now I think I understand what you are talking about.

    First off let's be *very* precise. What you are specifically talking about is the look of the top and bottom edges of the embossed details. In other words, this whole thread is about this and only this (which if I am understanding you correctly comes from a 2D to Normals conversion). Everything else is pretty much irrelevant.



    Here are the two models you provided : 

    So, about the behavior of the edges of this emboss : as often with normalmaps, a counter-intuitive aspect is that unlike other types of textures (diffuse, bumps, displacement, anything really), the data is relative to UV *orientation*. If you bake tangent space normals for the same object but with it's UV islands at different angles, you'll get different colors (that is to say, different data) on everything.

    It just so happens that this horizontal detail appears seamless on the model from the author of the tutorial, because both sides (main and flipped) happen to be consistent because they are oriented horizontally on the UV layout.

    But on yours, since you angled it at roughly 45 degrees, you'd need another RGB value for the other side for to be consistent. So logically, to be fully accurate, a conversion of a 2D detail to a Normal map should take that into account, too - and perhaps some do. And perhaps some realtime rendering engines are able to correct for it (after all, we *can* display models with mirrored UVs just fine). But in general and unless I am mistaken it makes sense to me that any edge detail that is isn't strictly a bevel on a horizontal detail would break across a mirror seam if the color/data isn't perfectly accurate and if the surface directly underneath it isn't perfect neutral.

    I am not exactly sure if there is way to this kind of conversion accurately for any angle of detail and UVs. To test things out, a first check would be to do a test bake with the parts from yours and the ref, with tris from across the mirror edge UVed uniquely. It would give you a good feel for what causes the discontinuity.



    It would also be interesting to do another bake with a geo floater as opposed to a 2D>Normal conversion and see what happens. And yet another test would cousist of doing more extreme 2D to normals conversions with much bigger embosses/bevels, to maximize the visibility of what happens.
  • Infinitycg
    @pior You were spot on, it is the UVs. I also did a test for the same as you suggested, and it did show exact results

    Overlapping/Offset and angled UVs are the worst possible combination that you could deal with, and this is my case. I will redo the UVs
    Thanks a lot for figuring it out!
Sign In or Register to comment.