Trying to achieve something like the viewport cavity option

Hey guys!

I am trying to achieve making a material/ texture that is as close as I can get to the viewport display cavity option!

2

Thank you
Thomas

interesting! is this eevee or cycles? are you manipulating the ao node or something?

this is cycles, but just in the view port using this option

is there a way I can replicate this so I can bake it into a texture rather than using the pointness and coloramp

ohhh i thought you had made something, sorry.

i believe the viewport effects are screenspace so there’s no real way to bake. manipulating the pointiness or AO node in cycles is likely the best option right now. i haven’t really explored OSL so i don’t know if anything could be better could be created using that.

1 Like

There is a node setup for edge selection using bevel node(cycles only) and geometry node. Search and you shall find. There is also a cavity map technique using the compositor that I think is based on the normal map. Maybe one of these will get you started.

thanks yea I’ve search for ways and I came to know solution!

If you could shed some light on the methods you have mentioned so I can go about trying that would be great.

like this? or

On mobile today. If no one else chimes in I will try to help tonight

1 Like

Ok thank you!

Looks like you have the dot product thing covered. Here’s link to the compositor approach (I think its the same thing Textool uses)
[https://blender.stackexchange.com/questions/52902/how-to-convert-a-normal-map-into-a-curvature-map-per-pixel-curvature/72602#72602]
and this may help
[https://blender.stackexchange.com/questions/90152/how-to-generate-a-fake-hand-painted-texture-blizzard-like-borderlands-effect/90153#90153]

Hey there!

A bit of a more unreliable, yet artistic approach that you could play with is something I rarely see mentioned; dirty vertex colors! To be fair, with the techniques up here you’re not doing anything wrong, but maybe it’s worth a shot either way.

So, all you need to do is pop into Vertex Paint Mode (V or Mode Selection), go to Paint -> Dirty Vertex Colors. Make sure you do some adjustments in the Settings Panel for the Operation (F6), based on what you are looking for.
This creates a layer of Vertex Colors for you, with darkened edges/cavities based on the angle you selected.

1 Like

thank you sooo much! I will definitely try these out :slight_smile: