removing black bump map artifacts

When creating cycles Shaders using glossy or refractive in combination with the bump node you sometimes run into strange black areas. These artifacts are cause by “badly” reflected/refracted rays. When using a normalmap (or using smooth shading for that matter) we basically use fake normals instead of the real ones, those fake normals however can possibly direct the ray in directions where it cant go (i.e inside the mesh) at least figuratively. Whilst this is no big problem in most cases it would be useful to have a safe and sound alternative to the Bump Node that does not create those black spots. There are some implementations of this here but they tend to be rough estimations and seem to have cases where they do not work.

So this is the Problem:


and this is what my solution looks like:


there are still some problems I want to fix however it seems to be a promising start. So here is the node group I created:


In this comparison the Bump strength and Distance where booth set to 0.7 and the height was set to be a voronoi texture. Questions and Ideas are appreciated.

Hi looks interesting, curious about the full node setup. (no collapsed) Did you check the other solution as well:
https://blenderartists.org/forum/showthread.php?401501-Usefull-node-setups-that-solves-problems-(-Cycles-)
(The second post - modbump from acedragon )
Maybe you can add your node-setup in that thread. ?

Modbump will no longer be needed if this patch by Lukas Stockner gets into Master
https://developer.blender.org/D2574

The current idea is that they will not make the strength correction an option, but simply become the way that bumpmaps work (since there’s no case where the black areas are desirable).

Yeah I have seen mod bump and other implementations that modify the input height before inserting it into the bump node. I wanted to try a different approach that corrects errors after the bump map creation. It is very similar to the implementation by Lukas Stockner but does not solve the final step of rotating the vector to its largest possible rotation. Instead it uses a simpler linear interpolation between bump and normal vector.

However I hope this will not be the standard solution for the terminator problem (black artifacts in smooth displayed meshes around the borders a very similar effect also depending on the use of fake normals instead of true normals) since this solution is not physically correct and to my mind will lead to a strange flipped back barely visible border around the edges. However since you cant see them as good as black ones you might miss them in smaller test renders and might cringe a bit after a full render that might have took hours.

Are you talking about Lukas’ patch?

When it comes to dealing with bumped normals pointing away from the camera, pretty much anything is better than just rendering them as black (large-scale bumps at least should be replaced by displacement anyway).

I still use modbump which works for me. shouldn’t I anymore? Quite strange that for something that important is nothing done in Blender itself so far. Still have similar issues when making snow. (Edges of snowy hills look grey).

Lukas’ patch is still not in Master, so the workarounds are still needed. I would consider using Cycles’ microdisplacement if you need to generate large details however.