question

Shawn Marshall avatar image
Shawn Marshall asked ·

Toon edge width decrease over distance?

I'm looking to create a simple line art-style animation using the Toon material. The manual says:

"The Width Scale can be used to control the Edge depending on the distance from the camera" but doesn't actually explain how one would do that.

So how can I make the lines get thinner as they get farther from the camera?

I generally do this sort of thing with the basic Sketch and Toon as I have more options regarding line style, animating strokes, etc, but the models I'm dealing with have a ton of parts and edges and take forever to calculate using S&T.

Thank you.

Shawn Marshall

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Nicholas Woolridge avatar image
Nicholas Woolridge answered ·

@Shawn Marshall Here's an R20 C4D file with the nodes set up. You will need to adjust the range output max and the overall line thickness in render settings to suit your scene scale... arnold-toon-line-thickness-scale-with-distancec4d.zip


Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

Use this node diagram.

Ri -> reciprocal -> range -> add -> width.

You can see the tea pot in the distance has thinner Contour lines since the width is biased from the Z-Depth pass the Ri node produces.

Open GID fullscreen, to read node names, you have the exact same nodes in C4D, so should not cause any problems to follow along.


3333.gif (815.2 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Shawn Marshall avatar image
Shawn Marshall answered ·

Thanks so much for the replies and sample files; I appreciate it.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Shawn Marshall avatar image
Shawn Marshall answered ·

Thanks for taking the time to reply. I did find that thread before posting this question here, but when I read:

"You can use an aiStateFloat set to Rl. This gives you the distance from the camera to the shading point. Add one with aiAdd and take the reciprocal with aiReciprocal, thus taking the linear distance input and applying the function 1/(x+1)."

my eyes glazed over. Sketch and Toon has a simple checkbox and parameters for decreasing line width; I was hope Arnold's implementation would have a similar, simple interface. I guess not.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Lee Griggs avatar image
Lee Griggs answered ·
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.