Home Technical Talk

Curvature maps and gradient maps for hard edge bakes

polycounter lvl 8
Offline / Send Message
warxsnake polycounter lvl 8
Hey

Typically when I bake my guns, I just rely on the basics, AO and Normal and a cavity map converted from the normal.

A while ago I did the swap from single smoothing group baking (no cage, only ray distances in xnormal) to cage + smoothing groups + SG UV splits.

Of course, when you bake this method, the hard edge is technically still there, hidden by the normal.

I've noticed that now as I'm trying to experiment by adding curvature maps and the green channel from my normal map as overlays to create cool effects, this kind of reveals all the hard edges that a normal and AO alone would typically hide.

Are there any steps to do for using curvature maps and gradients and so on that don't reveal the hard edges? What I'm doing now is selecting my UV alpha and deleting any gradient effects from the edges of UV shells, but I don't know, that seems retarded and defeats the purpose?

Or if you guys have any suggestions on what type of maps you bake besides AO and Normal for hard edge objects, I'm all ears

Sorry I have a hard time explaining this, here are pics:

Normal + AO + Cavity, baked with cage, UV split with SG, object has multiple SG splits
Pretty decent result, edges barely visible
MS01.jpg

Normal + AO + Cavity + Normal green channel gradient:
It's not the best example of its use here, but yeah N green channel, curvature maps, and even light maps can produce better results than just a flat AO and Cavity, but yeah, the hard edges show up.
MS02.jpg

Edit for another example:

MS03.jpg

MS04.jpg

MS05.jpg

MS06.jpg

Replies

  • EarthQuake
    Options
    Offline / Send Message
    First off the green channel isn't really useable data, normal map data is uv direction dependant so you can't just slap it on. This is most likely what is causing you to have seams, nothing to do with using hard edges or not.
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    EarthQuake wrote: »
    First off the green channel isn't really useable data, normal map data is uv direction dependant so you can't just slap it on. This is most likely what is causing you to have seams, nothing to do with using hard edges or not.

    Do you suggest I just stick to AO and Cavity as my base then?

    I tried curvature maps which help in weathering effects although it reveals hard edges as well, unless I mask out the areas close to uv shell seams.
  • EarthQuake
    Options
    Offline / Send Message
    Do you have some examples of how hard edges are visible with hard edges vs soft? There shouldn't be any difference in how a curvature map is baked either way. What are you using to bake the curvature map?
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    Hm no I don't have any here, the bakes were done at work. I could set up a new one here but will probably take a while.

    I use xnormal for baking
  • EarthQuake
    Options
    Offline / Send Message
    I might give it a try myself sometime if I can find the time.

    Really, because the projection normals of your mesh will be exactly the same when using an "averaged projection mesh" or "cage" the bake will pick up the same curvature data regardless, because curvature isn't relative to your mesh normals like a tangent space normal map is.

    So if you're getting seams it makes me think its another problem, or a problem has nothing to do with using hard edges or not. For instance, if you have hard edges or all smooth edges, you will still get seams on your model if you zoom in too far or if your texture resolution is low along any uv border. This is the same for 1SG vs hard edges. When you add on other effects and maps this might simply be more obvious(again, regardless of your mesh normals, as long as you've baked with an averaged projection mesh).

    But getting rid of that green channel thing has to be the first thing you do, thats going to mess with your results - the seams might be from that and nothing else.
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    Yeah definitely, I won't use green channel normals, was just testing it's use.
  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    How are you generating your curvature map? If you're generating it from the normal map post-bake it's normal that you get poor results. Why not bake out the curvature information directly from your hipoly in xNormal for example? That will give you a perfect result normally.
  • choco
    Options
    Offline / Send Message
    choco polycounter lvl 10
    I second what Bal said, baking your curvature map directly from your highpoly mesh gives you better results and removes the seams issue.
    Make sure to change the curvature map settings in xnormal to monochrome.
    I'd also suggest using 256+ rays and 2x or 4x super-sampling for optimal results.
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    As i posted above, I use xnormal for bake, i.e. in this case im testing its curvature map feature.

    The fact that it depends on raycasting like AO, I did a test and at full quality it takes as long as an AO bake which is not what I want (40mins+ for 4x 1024, 300 rays, etc)

    I'm running max 2013 and there doesn't seem to be a material or script available to get curvature information into the vertex colour of the high poly, which would be preferable, as it would be faster to bake VC in the end. Everything available is for either Maya, LW, or older max (http://www.tomcowland.com/mentalray/tc_curvature/)

    No I have not tried curvature from normal (i imagine from crazybump or equivalent?).
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    Results are meh (just looks like stronger AO for now), need to tinker with the values and the process is slow as obviously there is no way to preview the curvature flow with the xnormal settings, but yeah I would prefer if I could have this in the VC of the high poly in max and bake that.

    Left: Norm, Cav, AO
    Right: Norm, Cav, AO, Curv
    Curvature.jpg
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    i found a good method for curveture was using this in max http://www.rpmanager.com/plugins/TensionMod.htm

    or a pyhton add-on for maya called r7 vert curevature that i cant find the link for, to calculate convex and concave areas, and store it in the highpoly meshes vertex colours, than bake the vert colours off to hte low poly
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    passerby wrote: »
    i found a good method for curveture was using this in max http://www.rpmanager.com/plugins/TensionMod.htm

    or a pyhton add-on for maya called r7 vert curevature that i cant find the link for, to calculate convex and concave areas, and store it in the highpoly meshes vertex colours, than bake the vert colours off to hte low poly

    Yeah thats what I tried. Works in max2012, but not 2013 :(
    Best bet for max2013 HP right now is ConvertEdgetoVertex from here http://www.neilblevins.com/cg_tools/soulburnscripts/soulburnscripts.htm

    test with that script

    Curvature2.jpg
    Curvature3.jpg
  • Computron
    Options
    Offline / Send Message
    Computron polycounter lvl 7
    Seems like you would benefit from adding more uniformly dense edge loops with that script.
  • warxsnake
    Options
    Offline / Send Message
    warxsnake polycounter lvl 8
    After a bunch of test bakes for xnormal curvature, I finally got some very interesting results (where it wasnt just baking just another occlusion looking thing). Need a super low spread angle, at least for mechanical.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    here is the maya script i mentioned http://www.trisoup.net/shtuff/scripts/r7_vertCurvature.zip took a while to find again.
Sign In or Register to comment.