Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Pages: [1] 2

Author Topic: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)  (Read 39262 times)

neirao

  • Sr. Member
  • ****
  • Posts: 624
  • Neirao
    • View Profile
SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« on: October 17, 2016, 06:19:10 pm »

Hi guys! :)

im starting my news 3D characters(but i wiil render like 2D)
so, these days i remember about this request...

AUTO GENERATOR and APPLY the 2D CELL SHADING MATERIAL:
please see the images :)

1-atual mode
2-with script mode


Someone can do this script :)????

This is very usefull - time saved on multiples objects!!

Thanks!!

« Last Edit: October 21, 2016, 01:38:05 am by neirao »
Logged

neirao

  • Sr. Member
  • ****
  • Posts: 624
  • Neirao
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #1 on: October 17, 2016, 08:46:21 pm »

what do you think guys?
Logged

nemyax

  • Full Member
  • ***
  • Posts: 227
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #2 on: October 18, 2016, 03:29:31 am »

I think contour shading should be done differently.
Logged

neirao

  • Sr. Member
  • ****
  • Posts: 624
  • Neirao
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #3 on: October 18, 2016, 03:46:20 pm »

yes!!
in this sample i SELECT ALL and put the same distance
but in the script we can select 2 shapes and put distance X and select anothers shapes and put distance X2, etc :)

PS: in the sample above i use only simples Spheres primitives, but in a complex shape, may works diferentily (better or worst) ;D ;D
« Last Edit: October 18, 2016, 03:52:30 pm by neirao »
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #4 on: October 18, 2016, 04:01:53 pm »

It's possible to do this. Even moderately easy for its most basic implementation. If no one takes a stab at it I might be able to work on it this weekend.

Of course, if Steve enables custom shaders for materials then this old method of outlining won't be necessary, and the results and ease of animation would be much, much better.

By the way, the term "cel-shading" refers to the flattening of the shading into a single tone, and does not refer to the black border/outline effect.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #5 on: October 18, 2016, 05:35:50 pm »

If only it were that easy. If I add custom shaders I'd have to support them in the ray tracer as well - and that's a ton of work!
Logged

neirao

  • Sr. Member
  • ****
  • Posts: 624
  • Neirao
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #6 on: October 19, 2016, 06:27:22 pm »

Wow Raxx!!
thanks if you try :)

Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 322
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #7 on: October 20, 2016, 10:19:19 am »

A couple of years ago I had a project like that, where I had to use this double mesh technique. Yes, a script that will make this outline would be useful. Great idea, neirao.
Logged

neirao

  • Sr. Member
  • ****
  • Posts: 624
  • Neirao
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #8 on: October 20, 2016, 03:28:09 pm »

Thanks Daniel! :)

yes, very usefull!
« Last Edit: October 20, 2016, 03:37:13 pm by neirao »
Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 322
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #9 on: October 20, 2016, 04:33:08 pm »

neirao: You're welcome, bro! :D
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #10 on: October 20, 2016, 09:29:58 pm »

So, I got to work on this in my free time, and discovered that I can't make double sided materials via script (not documented anyway).

So unless that gets fixed, you'll have to create and apply your own outline material. I decided not to make the flat-shaded material either, for the sake of consistency. Basically it's just an outliner, not an actual cel-shader-er. Thus, I'm calling it...CelShadurr

Instructions:
  • Install into your script directory
  • Click on the turd
  • Drag anywhere in the workspace. It should create a parametric shape outlining everything
  • Don't want something outlined? Append the mesh's name with "_noOutline". For example, "mesh01_noOutline". Then double click and OK the CelShadurr shape to regenerate it
  • Apply your own material to the shape

Uniform scale or double click and manually enter the outline thickness.
« Last Edit: October 22, 2016, 03:24:46 am by Raxx »
Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 322
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #11 on: October 20, 2016, 11:46:12 pm »

Omg, Raxx, of course! :) Who else? The mastermind of scripts. Thanks, bro! Thanks! :D
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #12 on: October 21, 2016, 12:05:52 am »

You're welcome! Hope it helps, somehow. If you can't tell, I'm not very impressed with what it can('t) do >:(

I forgot to mention it, but you can change the thickness of the outline either by scaling it using the uniform scale tool or by double clicking it and entering it manually. It's measured in Anim8or units.
Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 322
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #13 on: October 21, 2016, 12:25:34 am »

Yeah, I've noticed. You may not be impressed, but maybe DaVinci wasn't impressed with Monalisa when he made it either. Anyhow, it's simple, but very useful script :D Thanks
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: SCRIPT REQUEST! - 2D cell shading (AUTO GENERATOR)
« Reply #14 on: October 21, 2016, 12:59:58 am »

Good news, I fixed the one bug and made a few optimizations. The new version is in my post above.
Logged
Pages: [1] 2