If all goes well, this will be my last support thread of the year, and if a miracle happens, my last thread ever.
I’ve been trying to use a node tree to recreate the effects of freestyle, line art, etc. My original setup used the geometry of a mesh and then rejoined it with the original geometry to create an outline on top of it, however, I noticed that some of the edges (particularly the ones in the back) were partially hidden by the mesh, so I’ve been trying to instead use the mesh as a target object, placing the outlines on a different mesh (the source mesh) so that way I can add the mesh to a view layer to make it appear on top in the compositor.
The results have been promising so far, however, when I moved the outline to a raised view layer, the edges that were previously hidden by the mesh were on top as well, creating a sort of ‘x-ray’ effect. Is there a way to cull the edges that are hidden or obstructed by the mesh?
Rendered Effect

Nodetree
I have, and I’ve tried to implement it into my nodetree, however it doesn’t seem to have the effect wanted, and it simply deletes all of the front-facing faces of the mesh. Any other solutions?
I have, and I’ve tried to implement it into my node tree, however it doesn’t seem to have the effect wanted, and it simply deletes all of the front-facing faces of the mesh. Any other solutions?
To make the effect I’m looking for clear, I’ve subdivided my mesh into incredibly small increments, so I’m able to delete points that the camera cannot see.
Examples of the aforementioned edges:
I aim to do this so the geometry node tree that I’ve made can be added to a separate view layer and appear on top, preventing the mesh from overlapping with the node tree.
In this instance, a percentage of the line is being obstructed by the mesh
When the mesh is absent, you can see that the lines are the same thickness
When moved to a separate view layer in the compositor, some lines are behind the mesh and still appear. Parts of these lines appear in front of the mesh and aren’t obstructed, so I subdivided the mesh and I aim to remove the parts that cannot be seen

@zeroskilz Do you have any more wisdom to impose?
Sure - you’re doing this with compositing? Then mix by depth or mist-pass.
Like so:
Seems to be a hassle doing everything in GN.
Good luck.
1 Like
Thanks for the help. It seems to have the proper effect, but is there a way to restore the original black color and remove the white-ish outline?

Thanks for the help, and happy holidays!
While the multiply and the compositor setup does help, it doesn’t seem to have the ultimate intended effect, that being the lines in the mesh that are at the back, or those partially hidden by the mesh appearing as a whole instead of being partially obstructed by the mesh.
Is there a way to do this with geometry or compositor nodes?
I’m not familiar with the compositor, but in Geometry nodes, would there be a way to make vertices appear in front of other objects?
Or if I were to set specifically the line art to a raised view layer in Compositor, the only thing that I would need to do is remove the lines that the camera can’t see, so only the edges/curves that are visible appear on top, including the ones that are partially obstructed.
Do you have any ideas?
You can try add a “bias”… i.e. an addition/subtraction term to slightly push the one mist pass forward or backwards (depending on your setup) to push the lines toward the camera. It will create some corner artefacts but with some tweaking you should be able to get to something acceptable.
It doesn’t seem to have worked.
I tried adding a bias but it seemed to just…

@zeroskilz Do you have any geometry node solutions?
Remind me again why you don’t want to use established methods like, e.g. inverse hull?
For making inverse hull and freestyle lines on low-poly models, there’s often artefacting on the hard edges and crease lines. While I’ve been trying to remedy this through other means (hence my other posts on trying to remove edge lines from GPLA and Inverted Hull) The only way to do so is through the use of vertex groups, which only allow the removal of vertices, not edges.
So if I want a creased edge to be removed, I’d have to remove the vertices that connect those edges, which affects neighboring edges. I’ve tried a layering approach where I exclude certain edges and then make a new lineset that repairs the neighboring vertices, but it doesn’t seem to work as well, as freestyle marks last on edges no matter what camera angle, and they don’t follow the standard rules of GPLA. With the solidify modifier, I can’t set the thickness too high or the lines overlap and create overlaps in the outline, where the backfaces should be showing but aren’t.
I would use Freestyle however it’s been depreciated since the introduction of GPLA I am running on a relatively low-end PC (i5) and it’s incredibly tedious to continuously render images over and over again in order to iterate on the line art.
AlanWyatt’s Line Art Curve Modifier would work well if I could understand how to use it and implement my own settings such as sharp line edges and vertex inclusion & exclusion groups like I have in my own setup. I’d like to continue trying to recreate the effects of this setup for however long I need to, or until freestyle settings are fully implemented into Grease Pencil line art.
Weird… pretty sure you would be getting those with this method also… 
There is version 3 of GP still being worked on so we can hope…
Anyway… You can try add the following GN to your outline object…
it offsets the a scaled object toward the camera using the value in the final scale node - you should only need very small value and the post-processing should work but I suspect you’ll still get some corner artefacts, sorry.
Good luck.