How does blender create this orange selection outline?

Hello,

I have 3d modeled a character in blender and was looking to eventually try and create a black outline for different parts of the character. I had this idea in mind, but wasn’t sure how to display it or inquire about it until just now on accident “creating” (after finishing modeling the character I have made) the type of effect I am wanting for the final product of the character model.

I modeled this character with toon shading in mind, and am looking to render this character with unlit shading, but wanted to render a “black outline” for different parts of the character. I just was going to unwrap UVs for the character I made that I selected the character, went to the rendering tab, and saw this!

The “orange outline” of my selected character has pretty much all the areas outlined in orange that I want to outline with a cartoony black outline, and I am wondering now, how does blender generate this “selection” outline, and how can I go about creating a similar “selection outline” like this for creating a final black “toon” outline for the final character model?

Hello!
Have you seen the line art modifier? I think it even reuses some of the underlying code. Only downside is that it only works from the camera (not viewport) perspective.
It uses grease pencil under the hood so you can get almost any look you want.

Older tutorial that works great up to Blender 4.1. (I’ve no advice on working with the newer geonodes-grease pencil. Don’t know how changes impact.)