Jump to content

Recommended Posts

I am having a difficult time replicating the Cinema 4D sketch and toon shader in Houdini. In C4D, one can quantize the shading or leave it the equivalent of a principled shader and create colored outlines for the entire object or for edges as well (like a cell render). In Houdini, the toon outline shader seems only to work if the second copy or instance uses the toon color shader. In the attachment, the file shows the problem with use of the toon outline shader with a principled shader (which does not display incorrectly in the C4D equivalent). The reason this is important is that I created several figures for a book on knot tying and wanted to keep the color and texture of the rope while adding a think black outline. I realize that the toon color shader itself can be tweaked to use point color and the shadow, midtone, and highlight areas can be assigned a simple texture. The problem is these simple textures cannot have displacement, normal maps, etc. What I would like to do is use a principled shader for an object and then add an instance and have the instance use the toon outline shader. It appears this is a bug in Houdini, since sometimes the outline shader even will not work if I first assigned a principled shader to the object and then alter changed that to a toon color shader. Is this user error or bug?

ToonShaderC4D.jpg

ToonShaderHoudini.jpg

ToonRenderProblem.hiplc

Share this post


Link to post
Share on other sites

apologies for not quite fully understanding the question...but here's my workaround:

01) make a copy of the object that needs to retain the 'orig' material, scale it to 0.9 so it won't be z-fighting

02) make a copy of the instance, assign toon shader to this, scale it to 1.1 to get the outline 'bigger'

bit of manual work..but i was just trying to understand the problem that's all...

 

ToonRenderProblem_mod.hipnc

 

arrggg...doesn't look very good tho...decidedly hollow !!

Toon.jpg

Edited by Noobini

Share this post


Link to post
Share on other sites

Unfortunately the scaling solution doesn't work. I had tried it. While it works for objects symmetrical around the origin, it creates different artifacts for complicated models. (for instance, an elliptical sphere with have a thicker black line on the long axis if the sphere is uniformly scaled). I might be able to get closer with a copy with slight polyextrude but again, this would create some nasty overlaps. For an example of what I am trying to do, here is a render with sketch and toon from Cinema 4D of a simple overhand knot where the texture and displacement are controlled by a substance shader but a black line is added to be a bit easier to see in a book.

Some observations so far: if I assign an object a principled shader first and then create an instance with the instance assigned a toon outline shader, it doesn't work

If I then change the original object to a toon color shader, it still does not work.

If I start with an object assigned a toon color shader and then create the instance, it works.

Creating a copy of an object is a bit more reliable then creating an instance with the two Houdini toon shaders.

I do not know if whether assigning UVs has anything to do with the toon shaders. I once got the principled shader with an outline shader to work, but i couldn't repeat it.

I can create an identical render to the one below in Houdini minus the outlines, using a substance shader node, so the issue does not appear to be due to use of substance designer materials in Houdini. In the first example, I used just a principled shader and found the same issue.

 

Overhand.jpg

Edited by Isleofgough

Share this post


Link to post
Share on other sites

what about peak (+ or -) instead of simple scale ? (still wouldn't solve the hollow look in my test tho)

Edited by Noobini

Share this post


Link to post
Share on other sites

Peak, scale, and polyextrude will all expand object towards the camera and block out the original object. One would then have to add a negative transform. This would work somewhat for a sphere but would not work for a knot. I submitted this as a bug to SideFx.

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

×