How to create Outline just for the visible silhoutte (not the object bounds)?

Hi all,

Please, I need your help.

After trying during the whole day, I haven’t been able to achieve it. I have tried tons of outlines, making them viewing through objects, or only visible parts but in a solid color, but I can’t achieve a combination of both: make an outline of only visible parts of the mesh, even if all the bounds are occluded. For example:
outline silhoutte

My last used code for the (traditional) outline:

Thank you very much in advance!