how to make a better cartoon ink filter?[solved]

hello friends, I have another problem this time:

The default cartoon ink filter seems to not allow things rendered behind it to be seen. I have two display areas, one with a camera which show charaters(rendered with cartoon shader) and another, with other camera, behind the later display, which renders everything else with the default shader.

And the ink line around the charater isn very nice, since it has breaches, places where it should appear but it doesnt, and there are place where it should not appear and it does.

Is there a way to mark in my mesh places to receive the ink effect( exceptions ) and places which shouldn(exception too)?

Also the ink filter line appear on top of planes with png textures on it too, when it should be behind.

How can I make a better cartoon ink filter? Or someone has already made one?

Thanks in advance, results to be posted here as usual.

Iirc, there were two “cartoon shader” options last I checked. One is just a post-processing pass on the render buffer, and likely just puts a heavy edge anywhere it detects a significant color boundary. It’s likely also working on a nontransparent image, since the final render buffer is “supposed” to completely fill the window and be entirely opaque. To make a 2D filter know anything more about your model, you’d have to render your model with a shader that writes specialty data to a secondary input buffer for your filter, and you’ll likely need some additional rearranging of the render pipeline to make sure you’re applying your filter to a buffer that can be composited onto your final render while honoring transparency. Needless to say, nothing will be able to occlude your cartoon in this approach without considerable extra effort.

The second method, iirc, is a shader applied directly in your 3D rendering pipeline, which renders as solid black any geometry that is near-perpendicular to the camera plane and/or perhaps at a boundary where 2 polygons intersect at a steep angle. You could potentially dump that shader and hack it up to look at an additional texture you apply to the model containing override information for critical or ambiguous edges. A 3D shader could of course be applied to only selected models in your scene.

Thanks for the reply!

Do you mean I have to write external files for shader, normals and ink( like panda sample “cartoon shader advanced” ) to achive this? Couldnt I do it inside panda3d? Sorry if this is a dumb question, since Im new to this heh

Since no one answered this post, I just had to look myself. I found a usefull link, here it is:

It seems to achieve a more customized ink shader I have to combine a few commands in Panda3D with external files written in Cg language or GLSL, which arent too big, but a bit complex. For more details about doing this you can check my topics on the forum.