Author Topic: Toon material  (Read 2898 times)

0 Members and 2 Guests are viewing this topic.

Offline mikejb

Toon material
« on: January 01, 2021, 10:23:30 pm »
Not sure if there's a way to do this within Keyshot (v9), but here goes!

If I apply the Toon material to an object, is there a way to render just the contour lines and ignore any material or colours? For example, the attached image shows a light blue cube with the Toon material added, showing black contour lines. How (if possible) can I render out just the contour lines with a transparent background? I'm using a simple cube as an example. My other images will be quite a bit more complicated.

Edit: I don't need to render the hidden lines.

Offline Anindo Ghosh

Re: Toon material
« Reply #1 on: January 02, 2021, 01:06:27 am »
The "Toon Transparent Black" material does this.

However, if the surfaces are transparent, the back edges will show through, whether you want the hidden lines or not.

Offline mikejb

Re: Toon material
« Reply #2 on: January 02, 2021, 05:56:38 am »
Thank you for your reply. Unfortunately having the contour lines showing through would be a big problem with the type of objects I'm using, and I'd need 100% transparency as well.

I should mention that I can make the Toon material completely transparent by using the Toon "fill" material and then turning the transparency slider for my material down to zero, but as mentioned above, this causes the hidden contour lines to show, which I don't want. I suppose a quick fix would be to have my material set to a solid colour with black contour lines, render that out and then use Photoshop to key out the solid colour, but this isn't an ideal way I don't think.

I appreciate your help all the same. :)
« Last Edit: January 02, 2021, 06:16:34 am by mikejb »

Offline Anindo Ghosh

Re: Toon material
« Reply #3 on: January 02, 2021, 06:15:41 am »
One thing I am unable to understand:
If a given material has 100% transparency, how would the "hidden" lines remain hidden? They have to be hidden by something, after all.

Offline mikejb

Re: Toon material
« Reply #4 on: January 02, 2021, 06:42:34 am »
Yes, that would make perfect sense in the real world, I agree. :)

Let's, for example say that you had a nice model of a computer keyboard, and as well as the nice realistic render of the keyboard you wanted to outline it and all the keys etc. with a black contour line. Well, using the Toon material in Keyshot would definitely outline it the way that you want, but it would also turn your nice model into a flat toon-like image! So, my thought was that you could render the keyboard model as normal, and then after that apply the Toon material and extract the contour lines to overlay onto the original "proper" render.

Online TGS808

Re: Toon material
« Reply #5 on: January 02, 2021, 04:40:00 pm »
I don't think you're going to be able to do what you want solely in KeyShot in a single image. You're going to have to render out two versions and put them together in Photoshop but you don't have to worry about keying out any solid colors. Just render your realistic version, then your toon version. For your toon version, set all your outlines to black, all your fills to white and turn off the shadows (including ground shadows). In Photoshop place the toon image over the realistic version and set the toon layer blend mode to Multiply. That will knock out all the white, leaving you with only the black outlines over your real version. You can then use the opacity slider on that layer to make the lines lighter depending on the look you want.

Offline mikejb

Re: Toon material
« Reply #6 on: January 02, 2021, 05:05:29 pm »
Perfect! Thank you very much.


I don't think you're going to be able to do what you want solely in KeyShot in a single image. You're going to have to render out two versions and put them together in Photoshop but you don't have to worry about keying out any solid colors. Just render your realistic version, then your toon version. For your toon version, set all your outlines to black, all your fills to white and turn off the shadows (including ground shadows). In Photoshop place the toon image over the realistic version and set the toon layer blend mode to Multiply. That will knock out all the white, leaving you with only the black outlines over your real version. You can then use the opacity slider on that layer to make the lines lighter depending on the look you want.

Offline Anindo Ghosh

Re: Toon material
« Reply #7 on: January 02, 2021, 08:00:04 pm »
1. For the compositing option, to prevent the hidden toon lines, you would have to switch off the "Interior Edge Contour" in the toon controls, Advanced section.

2. For more control over the "toon lines" and no compositing required, the Curvature texture will enable any material, such as the yellow emissive in my example, to be used for the "toon lines". For regular toon-like toon lines, a black Flat material would work.

Offline bdesign

Re: Toon material
« Reply #8 on: January 02, 2021, 09:32:19 pm »
Hi mikejb-

The Contour Texture will add an edge detail to your parts, similar to the Toon material, but applied to any material.

Cheers,
Eric

Offline INNEO_MWo

  • Hero Member
  • *****
  • Posts: 1327
  • Total likes: 85
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: Toon material
« Reply #9 on: January 02, 2021, 11:45:09 pm »
What about this?

Offline mikejb

Re: Toon material
« Reply #10 on: January 03, 2021, 04:07:04 am »
Thanks everyone for the excellent help and advice. I've now got more options than I can poke a stick at!

Online TGS808

Re: Toon material
« Reply #11 on: January 03, 2021, 09:07:29 am »
I stand corrected. That is was by Eric comes as little surprise.  :D His method works perfectly and should give you the results you want inside of KS. I completely forgot about the contour texture that was added. D'oh!

Offline DriesV

  • Administrator
  • Hero Member
  • *****
  • Posts: 2630
  • Total likes: 83
  • Product Specialist at Luxion
Re: Toon material
« Reply #12 on: January 03, 2021, 11:49:29 pm »
Yes, a Label with Contour-textured opacity will allow to overlay Toon-style contours onto any material type that accepts Labels.
Look for the 'Contour' materials in the Material Library. These are already set up to be used as Labels, in order to show overlay contours.

Below is an example where the 'Contour Emissive Blue' material from the Library was dragged into the Labels list of the grey plastic material.

Dries