Home Technical Talk

Hacky Normal Map Correction

interpolator
Offline / Send Message
Gannon interpolator
I was baking out some normal maps for some stones I made for a scene and discovered a nifty little trick. I'm sure it doesn't fix everything but hopefully it helps some people in a pinch.

hackynormalmapcleanup.jpg

Sometimes I just can't get a good bake on objects so I'm glad I stumbled upon this. I'd love to see how this can be used on other models and situations.

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    I don't understand, you're killing the gradient, which with a proper smooth-group setup should give the same results?

    Unless I missed something, because it looks like your Normals are one group as opposed to split by UV cuts.
  • Gannon
    Options
    Offline / Send Message
    Gannon interpolator
    Maya doesn't use Smoothing groups per say, It's just defining hard and soft edges. The closest way to mimic them would be going through and hardening the outside edges of the shell/UV island and softening the interior ones.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    @Gannon the same thing still applies to getting a clean normal map bake, if you would like i can post a mel script i use that automatcally hardens the edges of UV islands for you?
  • Gannon
    Options
    Offline / Send Message
    Gannon interpolator
    I know, this just a hacky trick is all.

    A script would be fantastic. I've been doing it manually for a while and sometimes that's pretty tedious.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    just toss this on a shelf, and run it on a object, after you do your UV's

    string $objList[] = `ls -sl -o`;
    string $uvBorder[];
    string $edgeUVs[];
    string $finalBorder[];
    
    for ($subObj in $objList) {
    select -r $subObj;
    polyNormalPerVertex -ufn true;
    polySoftEdge -a 180 -ch 1 $subObj;
    select -r $subObj.map["*"];
    
    polySelectBorderShell 1;
    
    $uvBorder = `polyListComponentConversion -te -in`;
    $uvBorder = `ls -fl $uvBorder`;
    
    clear( $finalBorder );
    
    for( $curEdge in $uvBorder ) {
    $edgeUVs = `polyListComponentConversion -tuv $curEdge`;
    $edgeUVs = `ls -fl $edgeUVs`;
    
    if( size( $edgeUVs ) > 2 ) {
    $finalBorder[ size( $finalBorder ) ] = $curEdge;
    }
    }
    
    polySoftEdge -a 0 -ch 1 $finalBorder;
    }
    
    select -r $objList;
    
  • Gannon
    Options
    Offline / Send Message
    Gannon interpolator
    sweet, Thanks!
  • unstoppablex
    Options
    Offline / Send Message
    pretty nice trick for removing unwanted normal map shading!

    thanks for sharing this :)
  • Sandro
    Options
    Offline / Send Message
    Okay, nice hack but you might as well cut out whole baking process and generate your normal from diffuse. Because resulting map doesn't have any big or medium surface definition left, just surface dents and noise.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    why not just fix your models smoothing? like sandro says, your totally loosing the advantage of baking a high to low normal map.
  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    This process doesn't make any sense at all.
    If the gradients are there after your bake, it's that they are supposed to be there to compensate for the lowpoly shading, or you did something wrong. You shouldn't have to hack around in Photoshop like this.

    And your final image still looks wrong, there are some weird inner bevel type effects on all the edges.
  • WarrenM
    Options
    Offline / Send Message
    This has come up in other normal map threads but yeah, what they said above me. If you have to hand tweak the normal map afterwards, that means you're going to have to do that every time you update the normal map. That will add up to a lot of busy work over the course of a project. A LOT of busy work.

    Better to fix your model and get a clean bake.
  • Gannon
    Options
    Offline / Send Message
    Gannon interpolator
    @ sandro - Baking a diffuse to normal isn't going to give you the right results at all. The information is usually not what you want most of the time. You usually want a height map but then you lose out on edge quality so you compensate through extra geo on edges.

    Yeah, just changing the smoothing groups can help but it doesn't always. Sometimes it come down to the geo, so without retopoing the entire thing this is just a quick hacky fix.
  • EarthQuake
    Options
    Offline / Send Message
    oh god, terrible terrible idea, just fix your model!
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    EarthQuake wrote: »
    oh god, terrible terrible idea, just fix your model!

    This!

    You can't polish a turd.
  • Gannon
    Options
    Offline / Send Message
    Gannon interpolator
    rofl, fiiiiiiiiine.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Btw Gannon, we (I guess I can speak for us all here) are not dissing on you, or the fact that you created this thread.

    You went ahead and created a thread, even wrote a guide, and show people this. That's more than 95% of us ever do for this community, so we all learned here, not only you!

    Don't feel reluctant next time you wanna share possible new discoveries of workflows, etc.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    [HP] wrote: »
    Btw Gannon, we (I guess I can speak for us all here) are not dissing on you, or the fact that you created this thread.

    You went ahead and created a thread, even wrote a guide, and show people this. That's more than 95% of us ever do for this community, so we all learned here, not only you!

    Don't feel reluctant next time you wanna share possible new discoveries of workflows, etc.

    ^ This.
    Hopefully we werent over zealous. There just so much of this stuff going about that it gets frustrating.
  • EarthQuake
    Options
    Offline / Send Message
    Right, the biggest problem with this sort of things is they have this horrible tendency to snowball. You post some seemingly harmless bit info about something you've done, and all of a sudden we'll see countless people who don't really understand what or why you've done it repeating it because they think "gradients in normal maps are bad". Even worse, these people start popping in to other threads in tech talk and telling them to follow the advice in this thread, instead of taking the time to learn and understand WHY smoothing errors occur in the first place.

    Its a constant battle of miss-information.
  • unstoppablex
    Options
    Offline / Send Message
    I don't know why everyone is making a huge issue. It's a good trick if you do have unwanted normal map shading. Of course you should always make sure you have the best possible bake but we all know normal maps are not always perfect, and this could be useful at some point.

    i think the only problem with this thread is the title and it's approach. like many of your mention, this is the intention of normals from the bake and this isn't a general problem.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    I don't know why everyone is making a huge issue. It's a good trick if you do have unwanted normal map shading. Of course you should always make sure you have the best possible bake but we all know normal maps are not always perfect, and this could be useful at some point.

    Its not a good trick, its a hack that tries to make up for incorrect execution.
    If you model the base correctly you wont get this issue. No one should ever recommend visually editing normal map gradients.

    take a little look at Earthquakes work and you will see what can be achieved with correct normal map workflow.
  • lluc
    Options
    Offline / Send Message
    lluc polycounter lvl 14
    Here my technique, may be it isn't perfect !!

    normal_baking_tecnique.jpg
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    facepalm.jpg

    Poor gradients, so misunderstood : /
  • lluc
    Options
    Offline / Send Message
    lluc polycounter lvl 14
    is it so bad? How can I improve? I'm very interested ! pls!
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    cryrid wrote: »
    facepalm.jpg

    Poor gradients, so misunderstood : /

    Gradient are the tool of the Witch! Burn the unclean edges! Melt the abomination of the baker!
  • zakhar2
    Options
    Offline / Send Message
    zakhar2 polycounter lvl 6
    Mods please rename this thread "Bad Normal Map Tips ITT", thx
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    zakhar2 wrote: »
    Mods please rename this thread "Bad Normal Map Tips ITT", thx
    Or parse the thread title for "Normal Map", and have a confirmation box verifying that the poster has read EQ's normal map thread.
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    m4dcow wrote: »
    Or parse the thread title for "Normal Map", and have a confirmation box verifying that the poster has read EQ's normal map thread.

    Lol.

    Good ol' Earthquake & 3-point Folk.

    ibgyVGxfuxCCxm.jpg


    EQ, you really should think about putting some that Polycount Teaching money toward a gold chain. (They are paying you, right?) :poly124: :thumbup:
    ibhYgC0gk3iGiU.png
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    Hahahaha !
    Computron, this is awesome ! x]
  • joebount
    Options
    Offline / Send Message
    joebount polycounter lvl 12
    A normal map is meant to describe the difference between a highpoly and a lowpoly, it's NOT a bumpmap.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    does anyone have a good link that describes why this is wrong. I think we've told the OP they are wrong enough times now :)
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    It was already posted, the stickied normal map waviness thread.
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    cryrid wrote: »
    facepalm.jpg

    Poor gradients, so misunderstood : /


    i lol'd!
Sign In or Register to comment.