Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Toon contour thickness

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
diego6S3FN
762 Views, 5 Replies

Toon contour thickness

Hi, I'm starting with Toon shader for a series of scenes I have to do, this shader is really extraordinary.

The problem I see is that the thickness of the contour doesn't scale with the perspective, as you can see in the image of the palm trees the first one looks good but as they get further away the detail is lost as the contour doesn't scale proportionally to the distance from camera.

toon-snapshot-palms.jpg

However in the screenshot of the Toon Shader framed in red you can see that there are inputs to make the contour less thick with "Width scale".

toon-snapshot-interface.jpeg

I wonder if there is any possibility of plugging in a shader that has a distance to camera so that objects that are further away have a less thick contour.

Or maybe someone can think of another way to do it,

Thanks in advance.

Diego

Tags (1)
Labels (1)
5 REPLIES 5
Message 2 of 6
CiroCardoso3v
in reply to: diego6S3FN

You can connect a Facing Ratio node to the edge thickness.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

Message 3 of 6
diego6S3FN
in reply to: diego6S3FN

Hi Ciro, thank you for your answer,

I have done some tests with the facing ratio but this gives a bit irregular result as it is getting angle information and it seems that what we need here is more a depth information like Z-depth or the one that can be used by the native Arnold fog, but I don't know how to get this information with the Arnold nodes.

Actually if I could transfer the information from Z-Fog to edge tickness I think it would work very well.

Is there a node or combination of nodes that gives this data?

Kind regards,

Diego



Message 4 of 6
lee_griggs
in reply to: diego6S3FN

You could try the depth mask as used here.

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 5 of 6
diego6S3FN
in reply to: diego6S3FN

This has worked perfectly! Thank you very much Lee, I have attached a screenshots in case it helps anyone, now the contour width is proportionate in the distance even it's a good way to create a bit of fog in toon scenes.

I had to play a bit with bias and gain to find the right gradient.

Really cool, thanks


toon-snapshot-palms-fixed.jpg

toon-snapshot-interface-fixed.jpeg

Message 6 of 6
maxtarpini
in reply to: diego6S3FN

You can use also this one :

https://answers.arnoldrenderer.com/questions/11281/aitoon-width-scaling-depending-on-distance-from-c...

Setup is like this : AiStateFloat needs to be set to Rl

screenshot-from-2021-11-18-18-56-54.png


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report