Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comicbook shader for real time with three.js (cel shading)

Tags:

three.js

How can I achieve a similar effect (cel shading, comicbook) with three.js like the example?

Are there any lessons or example code?

Example http://demonraid.com/wolvie2/

like image 520
CorvusiiCorax Avatar asked Mar 14 '16 18:03

CorvusiiCorax


People also ask

Is cel shading 2d or 3d?

Cel shading, cell shading, or toon shading is a type of non-photorealistic rendering designed to make 3-D computer graphics appear to be flat by using less shading color instead of a shade gradient or tints and shades.

Is cell shading rendering?

In brief, Toon Shading, also known as Cel Shading, is a simplest non- photorealistic rendering technique to give mesh a cartoon look and the impression of hand drawn models in the final render. In animation field, Toon Shading technique has been used for years and recently applied to video game field.


1 Answers

The example you provide is very complex with several effects that make up the comic-like looks.

But if you can settle for a simpler look, then Three.js provides a ready made cel shader that you can combine with an outline effect: https://threejs.org/examples/#webgl_materials_variations_toon

The material is documented here: https://threejs.org/docs/#api/materials/MeshToonMaterial

And the outline effect is here: https://github.com/mrdoob/three.js/blob/master/examples/js/effects/OutlineEffect.js

like image 132
Holger L Avatar answered May 24 '23 20:05

Holger L