Jump to content
Sign in to follow this  
Isleofgough

Banding NPR shader

Recommended Posts

Posted (edited)

How would I set up a shader to create non photorealistic banding based on luminosity remapped to a stepped color ramp? Here are C4D and Modo shaders that get that effect:

 

 

ModoNPR.png

 

 

 

C4Dtoon.jpg

Edited by Isleofgough

Share this post


Link to post
Share on other sites
Posted (edited)

Hi Philo,

its just a start, but I set up a diffuse shader that quantizes lighting using the output of a pbrlighting-node. Make sure to set your render view to the 'cartoon' channel.

cartoon_shader.hiplc

houd_cart_shader.jpg

Edited by konstantin magnus

Share this post


Link to post
Share on other sites
Posted (edited)

That is PERFECT!! I tried to modify the color toon shader, but it is not something that can be easily altered to quantize more than three levels. I will look at the details to see how you made this, but it works great! Quick question, though: I assume your shader doesn't read your color data? It looks like your color is derived from the texture map.

Edited by Isleofgough

Share this post


Link to post
Share on other sites
On 26.5.2018 at 4:24 PM, Isleofgough said:

It looks like your color is derived from the texture map.

Yes, true. Because I thought thats what you wanted.

You can always connect a parameter node with "Cd" to the color input of pbrdiffuse, though.

Share this post


Link to post
Share on other sites

Thank you. I am still trying to get my head around shader nodes. I find them less intuitive than geometry nodes and am looking for free or paid tutorials to understand them better. I really appreciate your example. I looked at the toon outline and toon color shader’s internal structure and they are formidable. In addition, the outline shader doesn’t work right if the copy or instance has a principled shader. Sidefx has registered this as a bug, but I’m sure the solution is in the nodes.

Share this post


Link to post
Share on other sites

That is very helpful! Building shaders is not something i’ve had to do in other 3D programs excepting connecting some intuitive nodes. Other programs with npr shaders generally have outline features as well, but in Houdini this is a separate shader that has to be assigned to instance or copy - and it works only when the other is assigned a cartoon color shader. The prebuilt toon color shader doesn’t have many options, so your tutorial on building it manually is invaluable!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×