xNormal and Curvature Map - Doesn't work.

7 replies [Last post]
User offline. Last seen 8 weeks 2 days ago.
Posts: 11

Hello again. One more time, thank you for this software, it has been doing cool stuff for me.

Currently, I'm struggling with Curvature Map: I am trying to generate a Grayscale Curvatures Map like Blender's Dirty Vertex Paint, or Lightwave's Dpont Curvatures node (top row, second from left) so that:

Black=Concave  |  50%Gray=Flat  |  White=Convex
 
I know that there is a 'Monochrome' option in the settings, but the problem is; even when I bake with Two Colors and default settings, the map doesn't even look like this (which doesn't seem to be done in xNormal)
 
If I replace the colors channels to get a Grayscale, or bake in Monochrome, I get something like something like the 1st Attachment, a DifuseShading/AO Map. While I should be getting something like the 2nd Attachment \/.
 
I'm using the same High-Low Definition Mesh setup I used to bake good Normal and AO maps, so I don't think it's a mesh problem. AO is unchecked in my Baking Options list.
 
From my understanding a Curvatures Map would be generated in the High Definition Mesh as a vertex color map, where each vertex would have input from their neighbours, and then baked out to the Low Definition Mesh UV.
I tryed to bake again with "ignore-per-vertex-color" option UNchecked, and it still sme result.
 
 
Anyone had go through these hoops before? Ty for any light
Cheers

(wow i didn't know the forum would show attachements like this :S)
 

User offline. Last seen 14 hours 44 min ago.
Posts: 603

You might want to play a bit with the search distance or you could try with a convexity map instead.

 

However, to be honest, I've never understood how curvature works. I tried to develop the algorithm but I'm really lost.

 

Hopefully, for xn4 I'll let you to write your own render shaders  ( with LUA ) so you could write your own one or to modify the existing ones.

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 8 weeks 2 days ago.
Posts: 11

jogshy, thank you for your work. 

I understand how curvatures work in concept, but I am a non-coder =S

To me curvatures seems to be a vertex color map that is generated at each vertex, based on the angle with the neighbor vertices. Once that is done, it would be like baking any other vertex color map to the Low Poly.

Anyway here's a source, from where Dpont made his Curvatures Node: http://gfx.cs.princeton.edu/pubs/_2004_ECA/index.php and the paper http://gfx.cs.princeton.edu/pubs/_2004_ECA/curvpaper.pdf

 

When you say yo play with the search distance, you mean to give up of the cage and dial min and max numbers?

Thank you for your time.

Cheers

User offline. Last seen 14 hours 44 min ago.
Posts: 603

Thanks for the interesting link, I'll take a look.

 

>When you say yo play with the search distance, you mean to give up of the cage and dial min and max numbers?

Nope, not related to cages.

Press over the "..." green button near the "Maps to render->Curvature map" to show the curvature map's render options.

curvature map's options

 

Play with the "search distance" and also with the "Bias".

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 8 weeks 2 days ago.
Posts: 11

Thanks I got much more expected results (attached)

 
Used a Curvatures search distance around the same figure as the one I would use for Ray Distance, if I weren't using a cage to bake.
 
It seems that "Bias" should be as default to get good 50% gray flat areas.
 
These settings look like baking occlusion somehow.
 
Cheers
11.jpg
User offline. Last seen 14 hours 44 min ago.
Posts: 603

Btw, sure your object is centered near the (0,0,0) world origin. The Bias is relative to the object's radius so if your object is not near the world origin it won't be accurate.

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 8 weeks 2 days ago.
Posts: 11

Ah so the Bias value should the distance between the farther away point from the origin and the origin? Like the blue length in the image?
So the best would be to have the object centered at the origin?

Is this Bias concept the same for the Ambient Occlusion?

Thank you for the heads-up and for making it crystal clear.

 

Cheers

origin.png
User offline. Last seen 14 hours 44 min ago.
Posts: 603

Yep, always try to export your model centered at (0,0,0).

Yep, bias is more or less the same concept than AO.

ps: That cube is not centered at (0,0,0) really Sticking out tongue

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

This Post needs Your Comment!

The content of this field is kept private and will not be shown publicly.
CAPTCHA
Are you human?