Driving Toon Outline Offset by Distance to Camera
mmdestiny
Posts: 192
Morning folks,
Anyone who uses Filatoon probably knows how frustrating it can be to set up a scene exactly as you like, go to render from a different angle, and the look is thrown off because the toon outlines become too thin or too thick.
How might one approach tying the Toon Outline Offset property to distance to camera? I'm not very versed in creating drivers, but I would imagine the start would be parenting the camera to the subject of the shot so that TSR is relative, but that would only be directly useful assuming the subject is dead center right? Otherwise "distance" isn't 1:1 on one of the translation axes. Not sure how to compensate for that. (Not really sure how to do ANY of it really, but just spitballing potential stumbling points in the math ahead of time lol).

Comments
I experience the same but I have no other solid idea... I myself fix them in post-work in Krita / Ps, fairly easy ~~ but I'd also like to know other better solutions in DS ~
I'm on to something here. It's not 100% but it's a start.
As I said, first parent the cam to the subject. Open Offset Distance in the Property Hierarchy and drag Camera Z Translate into Controllers>1st Stage with a scalar of about 0.01.
My brain is not in a good space to figure out the math to make it 1:1 (probably some trig involved lol), but it is functional enough to get started!
(EDIT): and it definitely falls apart as is if you rotate behind the subject (since Z becomes negative) or at a 90degree angle to it (since Z delta barely changes as you zoom in/out) but it's something for now until we get the math down. Solving the "behind" issue is probably just a matter of whatever Daz's ABS function is
(EDIT2): Solved the logical issues. Parent the camera to a null that's parented to the center of the subject. Make the Camera Z the Controller as before, but if you need to rotate around the subject, Y rotate via the null, NOT the camera. This keeps Z locked in place and positive. All that leaves now is how to make it work if you go higher or lower directly above the subject.
(EDIT3): Oops lol, brainfart, use X rotate on the Null for going above the subject too. That pretty much solves for all issues!.
Here is a "finalized" step by step that got me pretty good working results (tested on a 1m cube with 2.00 offset)
Okay, will try, thank you !