Home Technical Talk

My Cavity Map Notes:

1
interpolator
Offline / Send Message
BradMyers82 interpolator
Hey guys, I was recently talking with a buddy of mine, and he mentioned he never used cavity maps before. He uses AO of course, but just never got around to using Cavity.
I think a lot of people are not aware of Cavity maps so I thought I would share my notes, and personal settings I use for cavity maps. (I make notes of stuff I do so I don't forget).

Now I know, cavity map tutorials have been done to death, but the information is sort of here and there on the internet, and some of it isn't up to date.
If your someone who doesn't use Cavity maps... Please give this a try. They are subtle, but they do make a big difference. If you're not using them, you're missing out!

Any ways, enough talk, here are my notes:


My Cavity Map Notes: Make this with Xnormal and Photoshop Filter, with your normals flattened. (if you install xnormal, it should also install this "Xnormal" Filter in your version of photoshop. That's what I use here).

I: Create Cavity Maps
1. Standard EDT: Create 1 EDT Cavity Map with these settings:
(in photoshop, flatten your normals, then go to filter>xnormal>Normals 2 cavity)

x+ y+ z+
EDT
Bright: 0
Contrast: 1
Radius: 8

2. Special EDT: Create 1 "Special" EDT Cavity Map with these settings:

x+ y- z+
EDT
Bright: 0
Contrast: 0
Radius: 8

3. Special EMB: Create 1 EMB Cavity Map with these settings:

x+ y- z+
EMB
Bright: .1
Contrast: .8
Radius: 8

4. Create one more map with the "Find Edges" Trick.
Take your Flattened Normals and go to: Filter>Stylize>Find Edges
De-saturate your layer.
Invert your layer. (Cntrl + I)
Name that layer "Find Edges"



II: Applying your Cavity Maps

(First Backup your cavity maps)

BASE, ambient shadows:
1. Take your AO map and set it to "Multiply" Blending layer above diffuse

SOFTEN SHADOWS:
2. Take your "Special EDT" and apply a level adjustment: Move "Output Levels:" White side to, 128. Move the center (Input Slider) to .7.
Set the Blending Layer to "Softlight", and above the AO map. Play with the opacity of this layer. Try 50 percent for starters.

DETAIL CAVITY:
3. Take your EMB, and place it above your AO and Special EDT Map. Set its blending mode to "Overlay".
Again, play with the opacity. Try 40 percent for starters.

RANDOMIZE CAVITY:
4. Take your "Normal EDT". Place it above all your maps. Set its blending mode to "Multiply". Do a level adjust and clamp the values at the beginning and end of the spikes. (far left arrow to beginning of black spike).
Again, play with the opacity. Try 15 percent for starters. Also, mask out any smoothing error areas, (if your doing hardsurface work).

EDGING, FIND EDGES:
5. Take your "Find Edges layer". Place it above all your maps. Set its blending mode to "Screen".
Now just set you opacity to something really low. When you use this again on your specular, you can make it much stronger. You can even try applying a mask and do a render clouds, or noise filter (or both) to get the edges broken up and random. The purpose here tho is to make your edges pop very slightly. This is not your final edging if you are doing metal work. You will have to paint that yourself. This is just to make the edges pop.
So set the opacity to something like 8 percent.


Tips:
• Place all of these layers in a folder (in photoshop) that is called AO.
• Place the cavity maps in an additional folder inside of the "AO" folder, called "Cavity".
• Copy your AO folder, and turn it off. You will use this later for your specular. When you use this in your specular map, increase the opacity on the various layers in the cavity map and of course the find edges layer.


Alright, this is it. I hope it helps and I hope its clear. Possibly I'll make a proper tutorial for this, and cover some other stuff as well, like painting hair, normal map deeping (via overlay, turn off blue channel, and gaussian blur).

You can also see this tutorial on cavity maps, however, its not up to date with the current version of xnormal: http://donaldphan.com/tutorials/xnormal/xnormal_occ.html

Replies

  • pior
    Offline / Send Message
    pior grand marshal polycounter
    huh what about pictures
  • kdm3d
    well put brad, we have a very similar workflow for these at Bungie. One thing I'd like to add is taking the blue channel of your normal map, and multiplying it over the whole deal. Play with level and opac till it looks good.
  • Eric Chadwick
    If you like, once you have pictures I can help you get this onto the wiki.
  • RAL
    Hey Brad, I tried out that technique and it works great, I also like the subtlety of cavity maps so I always use them. I would usually just do a Normals2Cavity like you did in the beginning then hit "Use luminance" and set it to multiply over my ao. Here's how it turned out with an asset I was making for fun. First one is how I usually do it, and the bottom one is what you posted.

    001xy.jpg


    002sr.jpg
  • PredatorGSR
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    Cavity maps can be great guides for when you are texturing, however after some experimentation I'm not sold on using them in the final baked texture. First of all, you can barely see any difference when they are applied in most cases, and when you can see a difference, I'm not sure why you would want to. I mean, by definition, it is just created from your normal map, so all that detail is already being displayed on the model. Adding what is in essence some grayscale detail calculated from your normal map usually ends of fighting your lighting, or being a half assed attempt at edge detail that should be painted in properly anyway.

    I would very much like to see examples of models with and without cavity maps where it actually makes a positive difference to the final result. I haven't been impressed with my own experiments, but maybe there are techniques that produce good results.

    For example, I overlaid the batarang in PS and don't see anything that wouldn't be achieved by adjusting the levels of the spec map a tiny bit or even rotating the camera a fraction, but I also don't think it is a good example where a cavity map would make any difference anyway.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    kdm3d wrote: »
    well put brad, we have a very similar workflow for these at Bungie. One thing I'd like to add is taking the blue channel of your normal map, and multiplying it over the whole deal. Play with level and opac till it looks good.

    whhhhhyyyyyyyyyyyyyy!?! why do people still do this :(
  • Ruz
    Offline / Send Message
    Ruz insane polycounter
    I use the normal map desaturated as a 'guide only' set to overlay then paint underneath with proper colours. When I am happy with the look of the texture map I tend to remove the overlays or have them on a very low opacity.

    If I am doing say a leather bag or a pair of shoes then I will use x normal cavity maps which are great, but for human faces I am not as sold on the results so i use the first method combined with a photo overlays
  • Bal
    Offline / Send Message
    Bal polycounter lvl 17
    Mm, I still think it's best to bake out cavity maps from the high poly.

    Using the xN or CB converters can give you some ok results, quite similar to a bake, and can often look good on some full organic models, but with hard models it often looks pretty bad, and doesn't really make any sense, as the normal map is going all over the place to compensate for the low poly smoothing, and the converters are still trying to use that info to determine cavity areas.

    And yeah, using the blue channel of the Normal map is also pretty wrong, even though it can look good sometimes. I don't see why this should be necessary if you're baking out some clean Ambient Occlusion and Cavity maps from your high poly, they should suffice.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Aside from ambient occlusion, the only map I'd find most useful (which in essence is what you're trying to fake when using Crazybump or these other apps doing 2d passes over a baked local-space normal map) is a surface curvature map. These are pretty hard to come by at the moment (there used to be a plugin for Maya to get this info but it doesn't work well any more), which would sample the actual change in direction of the high-poly surface and output darker areas in "creases" and lighter areas on "peaks", where mid-grey is totally flat.

    It's actually close to what you get with a Crazybump (or XNormal cavity) pass but far more accurate and without any artifacts.

    Then you can use this for masking out weathering/scratches/dirt etc. in addition to your AO (since AO takes into account the occlusion of large scale surfaces while a curvature map is purely information about the shape of the highpoly surface).

    Edit: Some links for curvature shader info, in case anyone's interested:
    http://www.tomcowland.com/mentalray/tc_curvature/index.html
    http://www.rpmanager.com/plugins/TensionMod.htm
  • Del
    Offline / Send Message
    Del polycounter lvl 9
    MoP wrote: »
    whhhhhyyyyyyyyyyyyyy!?! why do people still do this :(

    ~ Quoted For Truth. It looks so goddamn lame. I'd never dream of using it on my textures.
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 16
    MoP wrote: »
    whhhhhyyyyyyyyyyyyyy!?! why do people still do this :(
    Sure he's not talking about this? AO in NM - Polycount Wiki.
  • Mark Dygert
    perna wrote: »
    Aye, it would be great to have a 1-step baking solution for a curvature map so as not to have to hack it together from other maps. Programmers, get busy!
    no kidding, whip-crack!
    I would love to see this added to RTT or upgrade polyboosts Render > Render Surface Map. Right now it only calculates the cavity of the selected object which means your sculpt and low poly need to be unwrapped exactly the same and then you bake the high and hope that it all lines up.

    Zbrush does a pretty good cavity map, quickly. Provided you take the same steps and unwrapped the sculpt before hand and you use its lowest sub-d as your final mesh. Not that flexible...

    Cavity map in RTT... seems like problem solved.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Lamont wrote: »
    Sure he's not talking about this? AO in NM - Polycount Wiki.

    Yes, I am sure. If you read what he wrote, you'll see he's not talking about that at all.
  • Mark Dygert
    kdm3d wrote: »
    well put brad, we have a very similar workflow for these at Bungie. One thing I'd like to add is taking the blue channel of your normal map, and multiplying it over the whole deal. Play with level and opac till it looks good.
    What happens when you re-normalize?
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Vig wrote: »
    What happens when you re-normalize?

    Vig, unless I'm hideously mis-reading what kdm3d wrote, he's talking about multiplying the blue channel over his diffuse/spec whatever textures, not multiplying it over the normal-map. That'd make even less sense :)

    Unless you're referring to Lamont's post with the other wiki link about putting the AO in the blue channel? In which case, yes, renormalizing will most likely wreck your normals.
  • cryrid
    Offline / Send Message
    cryrid interpolator
    Perhaps it is the "Play with level and opac till it looks good" part that matters. If it is subtle enough, such information could help define or emphasize the shape without entirely fighting the lighting (which itself might play a big role in the final look as it varies from games/engines; some games don't seem to have a dominating sense of directional light to begin with).
  • kdm3d
    HA, didn't mean to hijack the thread:) To clarify, I am talking about multplying the blue chanel over the diffuse/spec with the rest of your AO. It adds a little bit more pop to the textures. You guys know as well as I do its not always about having something perfectly accurate or realistic in games or art in general. Sometimes things have to be exaggerated (like cavity shadows) to read right in a game engine.

    Take it as one of the principles of animation (to use a loose analogy). If you animated a straight "ACCURATE" walk cycle it would look wrong, uninteresting etc. You have to exaggerate the movements to get it to look right.

    That can happen when you have textures as well. just a straight AO bake doesn't give you as much read and definition to recognize something racing by it as you trying to shoot the guy behind it.

    And yes, straight copying it over wouldn't work well, levels and opac have to be adjusted. Since the blue channel ONLY holds the depth data, and no directional data, your not putting shadows any where they wouldn't be, your just exagerating them.
  • Del
    Offline / Send Message
    Del polycounter lvl 9
    kdm3d wrote: »
    HA, didn't mean to hijack the thread:) To clarify, I am talking about multplying the blue chanel over the diffuse/spec with the rest of your AO. It adds a little bit more pop to the textures. You guys know as well as I do its not always about having something perfectly accurate or realistic in games or art in general. Sometimes things have to be exaggerated (like cavity shadows) to read right in a game engine.

    Take it as one of the principles of animation (to use a loose analogy). If you animated a straight "ACCURATE" walk cycle it would look wrong, uninteresting etc. You have to exaggerate the movements to get it to look right.

    That can happen when you have textures as well. just a straight AO bake doesn't give you as much read and definition to recognize something racing by it as you trying to shoot the guy behind it.

    And yes, straight copying it over wouldn't work well, levels and opac have to be adjusted. Since the blue channel ONLY holds the depth data, and no directional data, your not putting shadows any where they wouldn't be, your just exagerating them.

    ~ I can't express how truly against this I am. It makes textures so lame. Just learn to paint.
  • kdm3d
    Why cant we use visual tricks in gaming? Its work in traditional art for centuries. IE reducing value and saturation towards the bottom of a static model to help "ground" it more with the environment. Its a CLASSIC painters trick used for years, but its not 100% accurate.

    Its not a matter of learning how to paint, its unifying an entire environment with its assets and characters and making it read at 200 mph...

    perna. I appreciate the crit. Your right if you are going for absolute realism, you might not want to use that trick. I'll find some examples at some point to better illustrate. Its not that I dont have the proper AO bake, I do, its just this adds to the exaggeration of the texture:)

    I'm unpopular today:)
  • Blaizer
    Offline / Send Message
    Blaizer polycounter
    Err :\, pardon me, but i still use the blue channel as a helper map and i think it's something good, a good resource. it gives some information to play with, and it can be very helpful in some cases, though.

    So why we do this, because we find it useful, simple :D. Don't put the yell on the sky, because it's a common practice as far as i know.

    BTW: http://www.tomcowland.com/mentalray/tc_curvature/index.html

    I have been years doing these kind of things with Zbrush, and it's something very very very helpful for props.
    curvatura02.jpg

    Example: from this simple subdiv object, we can obtain a very cool map that gives a bit of volume, it's basically a displacement map. You just need to subdivide your subdiv model in Zbrush and generate a displacement map.
  • BradMyers82
    Offline / Send Message
    BradMyers82 interpolator
    Didn't know my notes would cause such a stir. heh.

    I do find it extremely helpful to hear everyone's view on cavity maps though. The method I outlined above was really an adoption of that tutorial link I mentioned on the xnormal site. I suppose I considered it "the correct" way to do things, since it was on the xnormal site, without truly knowing.

    Anyways, I have been back and forth a lot with my own rules in cavity maps, and perhaps them not being a 100 percent accurate is the reason. Basically, if something isn't working, I simply make it really subtle, or mask it out all together. Problem solved.
    I do want to learn more about the curvature map, as that sounds like a better option. So I'll be def. looking into that soon.

    Now I am likely wrong, but I thought baking a cavity map, and converting it from the normals is pretty much the same thing. Which is why I didn't mention baking cavity maps. Because the normals show changes in surface angles, and that is what makes a cavity map different from an AO map (the changes in surface). I thought converting normals to cavity maps was more flexible and easier to do. Is this not true?

    Dreamer: I don't know why your hating on kdm3d's trick so much. I don't get that worked up about anything in 3d, lol. You could also paint your AO btw, but personally I'll stick to rendering that out as well. I'm afraid I don't understand your logic. If the blue channel trick works, then do it. If it doesn't work, then don't. That's how I see it anyways.
  • Del
    Offline / Send Message
    Del polycounter lvl 9
    ~ Forgive me. I'm just a kid student with more passion than sense. I just don't really like how the blue channel looks on organic things.
  • kdm3d
    Us Myers have to stick together :)

    I think with any technique there is a formula in a professional game development environment. The factors include speed, aesthetics, economy, and end result. All have to be factored in in a pro environment, and balanced precariously.

    Why take the time to paint an AO or a cavity map, when its MUCH faster to render it (or convert it) With not much (if any) hit to aesthetics, no hit to economy, and very little (if any) hit to end result. An instructor once told me, "dont reinvent the wheel" if its there, dont go through the time and wasted effort to recreate it. (that could be taken wrong so I want to clarify that I am STRICTLY referring to painting vs baking:) )
  • Ruz
    Offline / Send Message
    Ruz insane polycounter
    I know of at least one top studio who combine elements of a tangent space map overlayed with elements of an object space map. produces quite a nice looking diffuse texture.
    Whether its technically accurate or not (I doubt) but it looks ok.
  • PredatorGSR
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    I think the point he is trying to make when referring to painting (and if not, its my point :), is that if a texture is lacking depth and contrast, a cavity map isn't a very good way of correcting it. A much better way is to paint in grunge and dirt into recesses and crevices and paint wear on exposed edges to multiply the effect that the AO map provides a good base for. The cavity map isn't a quicker way of achieving the same effect, it barely has anything in common. Plus texture painting is probably the closest thing to actual art there is in the creation process, I don't know why you'd want to outsource it to a halfassed computer calculation when it doesn't even come close to achieving the proper effect and this is where the artist really gets to shine.

    Btw, I'm primarily thinking of scifi/unreal style assets when I'm referring to the results. I don't have as much experience with organic/characters, so I won't comment on its effectiveness there.

    I'm not saying that generated maps aren't useful, because that is half of the 'next gen' pipeline, but I want to recommend against the line of thought that a cavity map is a quick way to achieve depth in a texture and doesn't require the artist to do it manually, because the results just aren't the same.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    perna wrote: »
    kd, the main reason why your technique is a poor one is that the blue channel is based on the relative difference betwen your low and high meshes, which makes it completely unpredictable and inaccurate. You need to get lucky for it to look good, and you may consider the reason for using a cheap hack to emulate AO when you actually have proper AO bakes in the first place.

    Yes, it may look "cool" "sometimes". Which is completely random and does not exactly sound like a technique a professional should employ.

    This is exactly my take on it, too.

    The vast majority of the time with a normal-map bake, the blue channel is not doing anything you want to represent in your diffuse texture - in fact it will often be something you don't want in your diffuse at all, since as Per said all it represents is one vector component in the relative difference between an arbitrary high and low poly mesh.

    So yes, while it might work at 16% opacity on the occasional texture, most of the time you're probably not doing anything all that good, or anything you couldn't have achieved much more accurately with a good AO bake or Crazybump/XNormal pass (although as pointed out, those are just cheap quick tricks for getting a rough approximation of surface curvature, which you'd be better off getting from your highpoly if possible).

    A lot of the time if you're using a Crazybump pass from a normal-map baked from highpoly, you will have to paint out artifacts from the high/low difference represented in the normals.


    Blaizer: That's a nice trick to get a simple difference map in ZBrush, it does look useful.


    PredatorGSR: I completely disagree, I think a curvature map (which is what most people I believe are trying to discuss here when they say "cavity map") is very useful when texturing, it can save you huge amounts of time since it represents valuable information from your highpoly mesh that you can use for texturing (I mainly use them as masks for dirt/weathering/scratches etc).

    Using a curvature/cavity map as an overlay is a perfectly valid way to "pop out" key shapes, in fact you will probably find that many top studios do this as a routine when texturing highpoly models, for detail, consistency and efficiency. Trying to do that by hand (as you seem to be suggesting) is ludicrous, sure you can do a little bit of painting here and there to get some focal points worked out, but to try and highlight every little edge and darken every little crease and crack by hand is just insane when you have the option of a cavity/curvature map. I don't understand why you would be against this method?

    Because it is different to an AO map, it represents different information, be aware of that. These things are not interchangeable. I wouldn't dream of starting to texture a normal-mapped asset without a good AO map baked from my highpoly source, and a good curvature map from the same source (falling back on a Crazybump/XNormal pass if I don't have access to a curvature map bake).

    Armed with an AO bake and a curvature map bake, you can do pretty much anything you need to with a normal-mapped asset texture.
  • PredatorGSR
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    I started writing a long post in response, but it really just comes down to real world examples. In my experience, the results haven't seemed worth it or effective at all. My first post in this thread basically said that, they haven't seemed to do much but I'd be open to using them if people could demonstrate positive results.

    The thing is, I haven't seen a cavity map be effective in "popping out key shapes", I've always had to paint in highlights into the spec map in order to do that. I don't want to get entrenched into a position here, I'm all for any technique that generates good results, I just haven't seen them in this case, and I would love for someone to convince me otherwise by providing real examples.
  • Mark Dygert
    MoP wrote: »
    Vig, unless I'm hideously mis-reading what kdm3d wrote, he's talking about multiplying the blue channel over his diffuse/spec whatever textures, not multiplying it over the normal-map. That'd make even less sense :)

    Unless you're referring to Lamont's post with the other wiki link about putting the AO in the blue channel? In which case, yes, renormalizing will most likely wreck your normals.
    Yea I was confused by "multiply it over the whole deal". Had it said diffuse I wouldn't of bothered...
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Predator, thats very confusing. How could you not see a cavity/curvature map popping out shapes ? It's exactly what they do! Darkening the craks, brightening the peak. This is just as useful as AO, and very different too.

    You can use it for weathering, change of surface roughness, it can even help faking translucency ... super useful stuff. Multiply is evil tho.

    I remember hearing that XSI bakes them very well and accurately.
    I myself use a nice little psd action at work doing an okay job at them, generating them from the normals (not as good as Crazybump, but very close) ; at home I use Crazybump because I have more time to experiment and play with stuff. I think this thread needs more pics, might try to post some later.
  • PredatorGSR
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    Ok, let me give an example then. Maybe we are talking about 2 different things. I've never heard of curvature maps until right now.

    This is a cavity map using xNormal using EMB following the guidelines in the original post. This is generated from a normal map that was baked from a HP mesh.

    I don't see how a map like this is beneficial for a final texture, as it will conflict with the lighting, and doesn't seem to do much that the AO and normal map doesn't do already.

    cavitytest.jpg
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    PredatorGSR: OK, you're right, that greyscale texture you've got from the XNormal plugins really doesn't look all that useful. I dunno if there's some settings you haven't got right (maybe invert green channel and see if it comes out better?) but here's the results I'd expect generated from CrazyBump:

    Hope you don't mind me cropping your normal-map texture here, it's a great example actually, perfect for use with Crazybump since it appears to be generated for a completely flat lowpoly mesh.

    You would see "low poly triangle" artifacts appearing if it was baked to a custom lowpoly mesh, especially for smoothed hard surface models, which is why I would recommend a highpoly curvature bake over postprocessing a baked texture.

    crazybump_example.jpg

    As you can see, using different "widths" can be very powerful - I use the wider ones (topmost crazybump pass in that image) as a base for weathering masks - inverting that and using Levels on it means you can very quickly pick out all the "deep" parts and throw away the raised edges.
    Similarly you can use Levels to limit the output to just the raised bits, getting a nice initial mask for wear and tear detailing on sharp edges (paint chips, scratches, etc).

    Obviously painting into these once you have them as a base is only going to help, but in many situations you rarely need to edit them. I usually use the 99% pass as a low-opacity Soft Light layer on my diffuse and mid-opacity Overlay layer on my specular, to really make the raised edges shine up in the specular (as appropriate, obviously, don't do this on things that aren't meant to have shiny edges!).
    Similarly the darker bits will darken down and help prevent "sparklies" that you will see in a lot of "next-gen" games where there is a high specular brightness in the deep cracks, which results in a wet and shiny look that should nearly always be avoided.
  • pior
    Offline / Send Message
    pior grand marshal polycounter
    Now we are talking. Indeed, the greyscale map you posted is absolutely useless. I am surprised that some still dont see why ? Check out the proper one at the bottom.

    wrongcav.jpg

    Now, a properly rendered curvature map would be more accurate, and in general would look more deep. Still, the Crazybump pass is often very close, and provides a great help. BTW everybody seems to forget that Crazybump (just like every other normalmap manipulation tool) is sensitive to y-up/down. Its in the preferences menu, better double check that before doing anything.

    To me, not seing why the top map is wrong, is very close to adding a greyscale normalmap or blue channel overlay 'just because'. Some might not notice it, but it looks terrible.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Yes, as Pior says, you should be able to tell at a glance that that map is totally useless (hence of course your question as to why anyone would want this!).

    I'd still be curious to know if inverting the green channel gives you a better result with the XNormal filter, I can't believe that the filter would output maps that broken unless some settings are wrong.

    Edit: BTW, the direction this whole thread has taken has made my mind boggle a little, I mean, game artists working with normal-maps have been using these techniques (or very similar ones) for at least two years now, and still there are people out there (and I mean actual game art professionals, not students halfway through a game art course) who find this completely new to them? I find this mildly scary.

    Like BradMyers said when he started the thread... if people aren't using this stuff when texturing normal-mapped assets, then they're seriously missing a trick and probably wasting a whole lot of time and effort...
  • PredatorGSR
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    Heh, I knew there had to be a serious disconnect to have people claiming they were the greatest thing since sliced bread when the xNormal maps seemed so useless to me.

    Inverting the green channel did indeed fix the lighting issue with the xNormal map, it creating something akin to your 3rd example. The thicker maps in crazybump definitely seem like the most useful though.

    Oh the issues the lack of examples can cause :P In my experience, in production a lot of this stuff is learned by someone trying it and showing it to everyone else, or arguing about it over lunch. If you don't happen to be there for that, it is tricks like this that are easily overlooked. Lots of studios don't use a high poly workflow either, which is another factor.

    Hence the value of polycount :)

    Edit: It seems kinda odd that the green channel needed to be inverted, since the map was baked in xNormal using +x+y+z.
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Are there any options in the XNormal filters, or does it just assume that +R is +X and +G is -Y?
    I think there's a setting you can change in Crazybump to account for that, but since I always work with that format it's fine.

    Did you ever consider trying stuff like that out yourself? Like, if you could clearly see that the output map was useless, did you consider why it might have been like that and try to solve the problem yourself? It sounds like you've tried this before and encountered similar problems and just given up as a result?
  • Yozora
    Offline / Send Message
    Yozora polycounter lvl 11
    I did this using xnormal filter, normals2cavity, x+, y-, z+, method: EMB, contrast 1.5
    Looks practically the same as the one pior made in crazybump, just need to up the contrast a bit more.


    xnfilter.jpg
  • divi
    Offline / Send Message
    divi polycounter lvl 12
    if i'm not entirely mistaken then this should lead to a surface curvature map in max:

    you'll need that - http://www.rpmanager.com/plugins/TensionMod.htm
    apply the modifier to your highpoly as well as a material with a vertex color map in the diffuse channel.
    in the modifier you disable everything but the stuff under convexity/concavity.
    check "do convex", "relative to ref pose" and "mask by edge selection". the mapping channel obviously has to be the same as it is for the vertex color map in the material.
    the rest you'll have to mess with to get results you like. to check how the edges look i just render it. there might be a good real-time way i dont know of though :D. once you're happy you RTT it as a diffuse pass.

    if there's an easier way please share :).
  • PredatorGSR
    Offline / Send Message
    PredatorGSR polycounter lvl 14
    MoP wrote: »
    Did you ever consider trying stuff like that out yourself? Like, if you could clearly see that the output map was useless, did you consider why it might have been like that and try to solve the problem yourself? It sounds like you've tried this before and encountered similar problems and just given up as a result?

    I baked the normal map in xNormal with +x +y +z. In the cavity settings, it was set to +x +y +z. There are 7 different methods that can be used to calculate a cavity map xNormal, each of which produces a different result. It is counterintuitive to have to invert the y channel within the same program.

    There was no real reason for me to expect that the map was incorrect, since cavity maps aren't something that are widely viewed on game art forums. I thought thats just the way they were, and used them as a guide for texturing, but turned them off for the final output.

    This has been a civil discussion, I don't appreciate the insinuation that I'm lazy or an idiot.
  • BradMyers82
    Offline / Send Message
    BradMyers82 interpolator
    Yeah, MOP is right. It seems like you just didn't have the green channel correct.
    And actually that is what the swizzle is for on the xnormal filter. If you look at my settings, I have -y for the "special EDT". The reason I have +y on the "Normal EDT" is because it's my weird randomize, neutralize layer. You probably won't want this, but I normally make this just to see if it helps the textures.
    But like Yozora says, EMB is the most important part of my notes. That's where the detail from the cavity map comes into play. The other cavity maps (EDT ones), are just to manipulate the AO further.

    Anyways, If your normals work correctly with Marmoset, then your settings for cavity should be (+x, -y, +z).
    In my notes I have this in red, but I'm not sure how to do colors on these forums. :)

    Here is an example of me following my own tutorial. I already see a find edges area, that I have to mask out. So these textures are by no means final. Hopefully, they will give you guys an idea of how this all works out for me.


    CavityMapExample01.jpg
  • kdm3d
    He heh.. this is turning into an x-normal vs. crazybump thread... which I agree, crazybump wins hands down.... Or it was when I first wrote this earlier

    just out of curiosity... anyone notice the difference between the two? Or tell me what was done to the two?

    cavity.jpg
  • BradMyers82
    Offline / Send Message
    BradMyers82 interpolator
    on the first one you have stronger highlights (wider), and on the second one you have stronger shadows (wider). Is that right?
  • kdm3d
    kind of, yes. This was an example of using the blue channel to further enhance the cracks. The highlights are still there... but it adds more definition to the creases...
  • JordanW
    Offline / Send Message
    JordanW polycounter lvl 19
    It's weird, I don't think there's one tried and true method I use for cavity maps or AO or whatever, I usually look at the asset type I'm making, find a good technique then exploit that for all of the similar assets I build. I think most people try to boil some of this down into X type of cavity looks best when people should be looking at the material they're making and figuring out why it looks like that and coming up with a technique that matches.

    I think most people should also avoid using any edge technique as a simple overlay, multiply or add. I find that they all work best as masks for other manipulations. Like use the highlights of a cavity map to mask in some scratches, or use the deep parts of AO/cavity to adjust the hue or add some dirt texture rather than just "darker"

    As engines and lighting gets better you should be using less of this, if you contrain your texture too much you dont let the lighting do its job. I think that's why multiplying the blue channel by your diffuse is such a bad idea. Your dark areas of your normal map are the areas where there's nice detail and variance, i mean the areas that are giving us the -reason- for using normal maps and if you're just making them darker you're not letting the lighting in the shader do its job.
  • BradMyers82
    Offline / Send Message
    BradMyers82 interpolator
    Well said Jordan! :)
  • probiner
    Offline / Send Message
    probiner polycounter lvl 12
    Hi i was googling to find differences between cavity shading and curvatures shading.
    From what i read i still don't understand if there is a difference, although it kind of looks that curvature shading can give a somewhat more detailed though wilder (as in somthing usable) results than cavity shading.
    Can someone answer me?

    What drived me to find answers about this was this thread where i try to make a Nodal Tree in Lightwave that gives very good surface shape hints to a viewer, in order to evaluate someone's modeling work ona given object, instead of smoothing everything out in the render like normally happens.
    This as nothing to do with hand painted, game engine, hi-res bake, UV Textures Maps, etc. It's of this gameworld focus of yours here, that i appoligize if i inconveniently invade, but would appreciate any leads or answers. :thumbup:

    Images of the thread to explain what i'm talkin about

    The Breakdown. You guys might not have much about the shaders on the right because they are obtained only when rendered, but i guess the ones in the left fit the discussion.

    th_HulkBreakdown-1.png

    A bigger render trying to demonstrate a modeling work the best i can for now.

    th_HulkBP.png

    Another object with a later version of the Node Tree. Image


    Cheers
  • Bal
    Offline / Send Message
    Bal polycounter lvl 17
    Interesting topic, once again.
    Using the CB occlusion map generated from the normal map as different kinds of masks for the diffuse/spec is really useful.
    Would be nice if you could bake it from the high poly though (would be more exact of course), is there any way to do it in xNormal? Can't really seem to get anything from the cavity map there...


    By the way, I love you guys, Polycount rocks.
  • divi
    Offline / Send Message
    divi polycounter lvl 12
    Bal wrote: »
    Interesting topic, once again.
    Using the CB occlusion map generated from the normal map as different kinds of masks for the diffuse/spec is really useful.
    Would be nice if you could bake it from the high poly though (would be more exact of course), is there any way to do it in xNormal? Can't really seem to get anything from the cavity map there...


    By the way, I love you guys, Polycount rocks.


    i'd guess that the cavity map takes care of the conCAVE areas and the convexity map gives you a mask for the exposed areas. i'm not sure though if cavity bakes in xnormal take intersecting geometry into account so a tweaked AO bake might give you better results for a deposit mask.
  • IronHawk
    Offline / Send Message
    IronHawk polycounter lvl 10
    JordanW wrote: »
    It's weird, I don't think there's one tried and true method I use for cavity maps or AO or whatever, I usually look at the asset type I'm making, find a good technique then exploit that for all of the similar assets I build. I think most people try to boil some of this down into X type of cavity looks best when people should be looking at the material they're making and figuring out why it looks like that and coming up with a technique that matches.

    I think most people should also avoid using any edge technique as a simple overlay, multiply or add. I find that they all work best as masks for other manipulations. Like use the highlights of a cavity map to mask in some scratches, or use the deep parts of AO/cavity to adjust the hue or add some dirt texture rather than just "darker"

    As engines and lighting gets better you should be using less of this, if you contrain your texture too much you dont let the lighting do its job. I think that's why multiplying the blue channel by your diffuse is such a bad idea. Your dark areas of your normal map are the areas where there's nice detail and variance, i mean the areas that are giving us the -reason- for using normal maps and if you're just making them darker you're not letting the lighting in the shader do its job.

    Totally agree with you Jordan. The material should be the measuring stick when using any technique. I also prefer to use most my maps as masks. Still it really depends on the material because there are situations where just the maps will get you 90%. As tech gets better and we can see through the mud of compression and low res textures it will definitely expose bad techniques though.

    k back to work for me.
  • Eric Chadwick
    probiner, that's a pretty cool shader, I like the look. Is the Dupont Curvature a realtime component, or does it only update for offline rendering? I think it could be really cool to have a "live" curvature map in a realtime modeling shader.
  • probiner
    Offline / Send Message
    probiner polycounter lvl 12
    probiner, that's a pretty cool shader, I like the look. Is the Dupont Curvature a realtime component, or does it only update for offline rendering? I think it could be really cool to have a "live" curvature map in a realtime modeling shader.

    No no... again my post is about the discussion, but not focus in this forum main themes. Dpont's Node works in Lightwave render. For this particular character is takes like 45 seconds to cache it, but after this it will use that cache every frame unless you ask him to calculate every time after deformations. So it's not soemthing fast. but if you use the cache the render is very fast, since it's just like render a texture map.
    -> "Turntables"

    My post is more on a wide technical question. What is the difference between cavity maps and corvatures shading. And GENERALLY, for what are they used best?

    But anyway, yes, thats what i point in my post in NewTek's forum: CORE will have SSAO. If they could have Curvatures, it would be nice to evaluate the meshes's creases, bumps, etc in modeling process.

    Doesn't Zbrush has soemthing similar?


    Cheers
1
Sign In or Register to comment.