Home Quixel Megascans

SOLVED: Cavity or curvature input map?

Hi,

I read the instructions on the Quixel Wiki page and it says that the curvature/cavity map is the most important input. I understand but to my understanding cavity and curvature are different things.
Cavity is a grayscale map but curvature can be a red and green map showing the convex and concave surface.

None of the sample projects contain cavity / curvature so I couldn't check it out by mayself.

Which one do I have to use?

Thanks for your help.
Peter

Replies

  • teddybergsman
    Hi Peter,

    Sorry for the confusion! First off, DDO creates this map automatically, for instance from the Normal map. Unless you don't have a normal map, you will actually rarely need to plug in a cavity/curvature map. Here's how the cavity/curvature map expected by DDO can look:

    cavity_tuto_03.jpg

    There's a lot of confusion related to both these terms. Curvature can be (as you've noted) both an RGB map encoding convexity/concavity in separate channels, or a grayscale map encoding convex edges as white and concave edges as black like in the image above. This map is often (erroneously) called Cavity, but more accurately a Cavity map can also be a white map with concave edges encoded as black. Feeling more confused? You're welcome! ;)

    - Teddy
  • bfg900
    Thanks for the clarification.

    My problem was that I use a high poly model and the baked normal show almost no useful information. In this case DDO needs a proper curvature map because it can't convert the tangent space noral map to a proper cavity, right?
    It's also not appropriate for tweaking it in Photoshop.

    So I can bake the required map in xnormal but I wasn't sure which one should I bake.

    Thanks anyway.
  • Martin7
    I hope i'm wrong here but from past experience the best you can do with high poly models is bake an AO and use a highpass filter on it as explained in the wiki. Unfortunatly with that solution you will lose most of your convex edges.

    Now if DDO could make use of a curvature map as input it would be an amazing tool to work with high poly models.
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    I never had good results with the AO trick since I don't see how it will it net you proper curvature highlights on exposed edges. I always bake curvature in xNormal (using gray background/monochrome mode, which are not default xNormal settings for that map), and I'm pretty satisfied with results that way.
  • tach
    The whole curvature thing is still a huge mystery to me. There have been like 10+ topics about it and yet it's still such a grey area (no pun intended).

    I looked into it a while ago for a low poly mesh, went as far as replicating the exact same curvature map that DDO generates just to see what DDO uses exactly. It wouldn't give the same results no matter what. Not even when the imported Curvature map was the exact same as the one generated. I'm not sure what's going on with curvature maps and DDO.

    As for high polys, this is what Quixel put together a while ago: http://quixel.se/dev/issue01
  • Martin7
    bac9-flcl wrote: »
    I never had good results with the AO trick since I don't see how it will it net you proper curvature highlights on exposed edges. I always bake curvature in xNormal (using gray background/monochrome mode, which are not default xNormal settings for that map), and I'm pretty satisfied with results that way.

    @bac9-flcl
    Do you use a curvature map as curvature input? or you use it as a custom mask?
  • tach
    Input map. Also tested it with the quality curvature options on and off. Never got it to replicate what the smart material was giving me with no input curvature.
  • bfg900
    tach: exactly! I baked a curvature using xNormal and the result was pretty awesome, I would say. Clean and thin white areas on the edges and constant middle gray on the plain surfaces. But in DDO it was terribly wrong. There was no transition between the black and white areas in the alpha and the tear and wear effect didn't follow the edges. It was random. Completely.
    The curvature generated in Substance designer seemed to be all right.

    So it's very disappointing because if I have to use a high poly mesh it's very difficult to make a proper curvature.
  • akaChris
    Offline / Send Message
    akaChris polycounter lvl 6
    First off, DDO creates this map automatically,


    so that does mean that creating ao and cavity maps from ndo and then using them as input for ddo is completely unnecessary since ddo basically does the same internally?

    looks like I did a lot of unnecessary steps with creating cavity and ao maps so far...

    although it looks like ao maps created from ndo seem cleaner than those created from ddo. (rich as well as standard occlusion generate shadows on flat surfaces). any idea where that is coming from? if ndo can do it, surely ddo should be able to as well
  • bfg900
    In case of a highpoly model the conversion DDO makes is not accaptable. Since the normal map doen't contain enough color information you have to create the curvature in aouther way.
    But I didn't experience any problem with low poly models.
  • Gordon Robb
    Offline / Send Message
    Gordon Robb polycounter lvl 2
    There is an thread that covers using hipoly models quite extensively. Right now, I can't remember the recommendation, but think it was to create an object space normal map in xnormal, and then convert that. Have a search about.
  • Gordon Robb
    Offline / Send Message
    Gordon Robb polycounter lvl 2
    Or creating teh curvature in xnormal paying a lot of attention to the settings.
  • Martin7
    Or creating the curvature in xnormal paying a lot of attention to the settings.

    I've tried a lot of setting for baking curvature map in xNormal and none work with DDO. Really ATM, DDO is realy fine tuned to work with baked tangent normals only to create its curvature mask. I don't know why they added a curvature input in the first place as nothing input in there, will work as intended. You'll need to use a lot of workaround to get decent result.

    So from now on , for high poly models, i'll just wait for the curvature map baker that is supposed to be featured in (hopefully) 1.9
  • bac9-flcl
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    Martin7 wrote: »
    I've tried a lot of setting for baking curvature map in xNormal and none work with DDO. Really ATM, DDO is realy fine tuned to work with baked tangent normals only to create its curvature mask. I don't know why they added a curvature input in the first place as nothing input in there, will work as intended. You'll need to use a lot of workaround to get decent result.

    So from now on , for high poly models, i'll just wait for the curvature map baker that is supposed to be featured in (hopefully) 1.9

    I don't know, grayscale background monochrome mode curvature bakes from xNormal seemed to work as intended for me. Default xNormal curvature settings are completely unfit, yes, but it's easy to get the look recommended by the DDO wiki and once it's there, the map works alright in the dynamask editor. Combining concavity/convexity bake from Knald also seems like a solution.

    What I'd like Teddy/Eric to clarify though is why they insist on recommending NOT to use baked curvature map input on lowpoly objects. If I remember correctly, several threads pointed time and again that DDO won't pick true geometric edges into curvature by itself (and it's not reasonable to expect it to when it's not performing any raytracing like xNormal does), only picking it where normal map contains the curvature. For objects with bezels baked into normal maps auto-curvature from normal might cover most edges, but for any object with no baked bezels on edges, no curvature will be picked and you'll have subpar results. Seems strange to recommend ignoring curvature input, especially when it's so easy to bake in xNormal or Knald.

    I don't buy the argument of curvature interpretation in DDO being "fine tuned" for auto-generated input. Curvature is a middle gray layer with darkening on concave and brightening on convex edges, there is no hidden complexity in that, no place for hidden intricacies like in tangent space normal maps. Okay, you can bias it to get white/black extremes faster or slower, and you can configure the bake to get different influence radius from edges, that's it. And even if those two factors aren't perfect in your bake, you can compensate them with slight adjustments of dynamask parameters. I don't see how baked curvature would manage to ruin anything, in other words.
  • Martin7
    I don't know, grayscale background monochrome mode curvature bakes from xNormal seemed to work as intended for me. Default xNormal curvature settings are completely unfit, yes, but it's easy to get the look recommended by the DDO wiki and once it's there, the map works alright in the dynamask editor. Combining concavity/convexity bake from Knald also seems like a solution.

    Again, i was never able to get a curvature map baked in xnormal to work properly in DDO

    Here's a typical result i get when i look at what DDO creates as curvature mask from a curvature map. I've put each mask from dynamask in vertical slice. Sharp, fine and soft works well but medium, big large and huge are useless IMO. DDO adds way too much contrast for the more blurry mask.

    9Bi257j.jpg

    Now curvature mask made from baked normals will be perfectly shaded every time.

    @bac9-flcl I'd be curiuous to look at one of your DDO file to see how the curvature mask looks like in dynamask.
  • tach
    Martin7 wrote: »
    Again, i was never able to get a curvature map baked in xnormal to work properly in DDO

    Here's a typical result i get when i look at what DDO creates as curvature mask from a curvature map. I've put each mask from dynamask in vertical slice. Sharp, fine and soft works well but medium, big large and huge are useless IMO. DDO adds way too much contrast for the more blurry mask.


    Now curvature mask made from baked normals will be perfectly shaded every time.

    @bac9-flcl I'd be curiuous to look at one of your DDO file to see how the curvature mask looks like in dynamask.

    This issue you're having with the big black and white blobs is what I keep getting even when importing a curvature map that is the exact same as the one DDO generates which makes no sense at all. That's why I think the issue with this might be lying somewhere else.

    If anyone else could confirm that they are getting the same results as me then that'd be massively appreciated. This is the original thread where it's discussed how to generate a curvature map from the normal map in the exact same way as DDO: http://www.polycount.com/forum/showthread.php?t=148357
  • Martin7
    Hi Peter,

    Sorry for the confusion! First off, DDO creates this map automatically, for instance from the Normal map. Unless you don't have a normal map, you will actually rarely need to plug in a cavity/curvature map. Here's how the cavity/curvature map expected by DDO can look:

    cavity_tuto_03.jpg

    There's a lot of confusion related to both these terms. Curvature can be (as you've noted) both an RGB map encoding convexity/concavity in separate channels, or a grayscale map encoding convex edges as white and concave edges as black like in the image above. This map is often (erroneously) called Cavity, but more accurately a Cavity map can also be a white map with concave edges encoded as black. Feeling more confused? You're welcome! ;)

    - Teddy

    I just had this idea to use Teddy's example of a curvature map and use it as a curvature input with a random mesh and created a project. Now when i open dynamask and check what DDO did as curvature mask, i see this

    Q5SLuiE.jpg

    So even with a perfect curvature map, you still get too high contrasted mask (huge,large,big and medium). To me the problem lies in the script DDO use to create curvature mask from the curvature input.
  • teddybergsman
    Thank you guys for these breakdowns. I am now updating the contrasting algorithm so that it should no longer blow out. I will keep you posted on the progress.

    - Teddy
  • Martin7
    Amazing news!!! Thanks Teddy!
  • WiZiX
    Hi everyone,

    I currently working with DDO for VFX and HighPoly stuff.

    Really interesting post and tips here, thank you guys.

    When you work with HighPoly model you don't have Normal bake or any of this stuff.
    Everything you need for generate nice mask it's the famous Curvature map.

    Thanks to Martin7, I finnaly understood how DDO works with curvature and found solutions.

    First, yes it's seem that the algorithm to interpret external curvature maps in DDO is a little bit too strong.

    Knowing that, we can made ajustment on setting when creating Curvature map and also adjust the map on Photoshop before importing on DDO.


    Well, anyway. I will make some test etc and share with you my stuff and reschearch. Like I aways do on other workflow for my Project Wayne.

    Dr.Wayne_-570x325.jpg
  • Eric Ramberg
    Extremely cool project WIZIX! And very nice of you to share all your progress like that :)
    Please let us know when you do something with ddo and post it in the gallery thread!
  • Martin7
    Thank you guys for these breakdowns. I am now updating the contrasting algorithm so that it should no longer blow out. I will keep you posted on the progress.

    - Teddy


    Are you planning to release this update with 1.9 or that you'll make it available as a small patch before? Would be great not to have to wait till 1.9 for this.
  • Eric Ramberg
    Martin7 - The algorithm is so baked in the new version that it is not possible to release as a stand alone, but it will be part of the next release!
  • Martin7
    Ok maybe one last comparaison image that show curvature mask made from a normal map as input (on the left) against a curvature map as input (on the right).

    I dont know if it can be usefull, i thought it might help the developpers to refine the script for the curvature map input. As you can see the masks look similar and very workable on both side up to medium. But then the large and huge mask from a curvature map input, are getting way too contrasted to be of any use.

    Hope this help.

    rmc5oN4.jpg
  • Eric Ramberg
    Thanks a lot martin for putting in all the effort! The next DDO will feature an automatic GPU baker. From the base creator you just select what maps you want to bake, and its recommended that ddo bakes curvature. This ensures that issues like this should go away and make highpoly workflows much easier :)
  • Martin7
    Thanks Eric! I'm so looking forward to that next update.
  • Eric Ramberg
    Martin7 - Gotta be honest, I´ve played around with it today and it was awesome! We did some time comparison tests, the new version was a lot faster on most all operations.
  • tach
    Very excited about this. The issues when using baked curvature was the one thing that kept DDO from being ideal for me.

    Would you be able to post any examples of the baked curvature maps from the GPU baker any time soon? Particulary interested in seeing how curvature from organic models looks compared to other software.
  • Eric Ramberg
    tach let me ask around and see if that´s a possibility!
  • Bubba91873
    Offline / Send Message
    Bubba91873 polygon
    Thanks a lot martin for putting in all the effort! The next DDO will feature an automatic GPU baker. From the base creator you just select what maps you want to bake, and its recommended that ddo bakes curvature. This ensures that issues like this should go away and make highpoly workflows much easier :)

    Will the GPU baker work similar to Xnormal in the sence that it does not display the high poly, allowing you to bring in from zbrush meshs/objects with millions of polies and baking f.e. 50-100 objects?

    My gripe with Xnormal is that we have to explode the meshs and this creates issues with shading for ao, bent normals, prtp maps.

    I like how I can bake in 3ds max and keeping the model together and seperate each element of each object by material ID and in RTT check hit only matching mat id's and go. But theres no way to bake such hp obj's in max unless it is done one at a time and even then it is painful on a high end comp.

    Also I would like to know if the gpu baker uses Anti-aliasing such as 1x-4x as xnormal does or even higher....

    So.. I was curious about the GPU baker that is coming.Thank you.
Sign In or Register to comment.