Toon Line on Edge - PfxToon Query

Hi All,

I just want to query how PfxToons place the lines at the edge of the geo, does anyone knows how this thing happen in maya toon pfx?

Cheers.

Its been years since I looked at the pfxToon stuff, but roughly I think this is what is happening.

Generally speaking you do some kind of edge detection, as a post process usually some kind of Sobel Filter/Operator is used.

I believe the PfxToon nodes create some kind of geometry? Probably by doing some curve fitting operations from the edge detection, and then weighting those curves based on parameters from the node.

You can also use extra information from the surface itself, like if the face is forwards or backwards facing, tangent/normal information to further adjust the final output. No clue if pfxToon does anything like that though.

Hi Bob,

Thanks for the reply, I am wondering how it detects the edge in relation to camera, the only thing that I can find is the “.cameraPoint” attribute in the camera and executing the attachPerspCameraToPfxObj proc.

Do you know the procedure in maya how it detects the edges? Is it through screen space?

Cheers.

It is definitely a screenspace / camera space effect.
Probably some kind of sobel filter using depth information, mixed with whatever data it needs to pull from the objects themselves.