Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

cell shading in DeleD!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Tutorials
View previous topic :: View next topic  
Author Message
elementrix
DeleD PRO user


Joined: 11 May 2006
Posts: 1300
Location: The Netherlands

PostPosted: Fri Jun 22, 2007 10:55 am    Post subject: cell shading in DeleD! Reply with quote

because my scene i am making is now doing a lightmap that will take about an hour i thought lets create a new small tutorial.

someone who does not know what cell shading is:

it is that you object gets a black line around him.
it's used very much in games and it will make you scene look more cartoony.
here is an example of cell shading:


as you can see there is a thick black line around the car.
usually cell shading is done by an shader, but DeleD doesn't support shaders so i will teach you guy's how to make cell shading with a nice trick.

ok, let's open DeleD and create a nice cube:



now select your cube and click on the space bar ( to copy and paste) or if that does not work click on copy and paste at the top of your screen (the 2 squares beside the scissors).
now you have a second cube, scale it a littlebit bigger than the first one so you have one small cube in a bigger cube.
then go to the polygon mode(the triangel in the midle of the 5 edit mode's)
select all the face's of the biggest cube ( make sure you haven't selected the smaller one) and then click on flip in the low polygon editing menu.
you will see that the bigger cube will change in a hollowed cube without outer polygons.
now make a black texture, yes completely black and intergrate that texture in DeleD (how to intergrate a texture? look in this tutorial at the bottem : http://www.delgine.com/forum/viewtopic.php?t=2087)
now make the black texture on the outer cube (which is flipped).
the result will look like this:



now go and look around the cube with the camera, you will see that from each point of view the cube will always have a black line around him.

now what if we have complex object with a hole in it?
when you use the same thing as above on a torus you will see that the polygons around the hole won't go at the right place.
here i will tell you how to make cell shading on complex object (but it can also be used on cube's and simple geometry).

this time i will use an torus.
so open DeleD and create a torus:



then go to the polygon mode and select all the polygon in the object.
now click on extrude and make sure that you have "keep original polygons" selected in the right bottem of your screen.

now extrude the torus AND MAKE SURE YOU DON'T UNSELECT IT.
ok so you have you torus with the extruded torus around it.
now click on your black texture ( the same you used in the first part of this tutorial) AND STILL DO NOt UNSELECT.
now you have to click on "flip" in the low polygon editing menu.
now you may unselect and watch how your object looks like Very Happy
it will look like this:



tips:
tip 1: if you use the second way i explained make sure you do it right the first time because if you think you black line is to thick it is very hard to select all those polygons around it because the object is still one if you do this.

tip 2: if you want to lightmap make sure you have the option "cast shadow" for the black texture unselected ( and receive texture can also be unselected because the color black will absorb any light.

tip 3: Ofcourse you can use all kind of colors for the line's around the object. ( for example a green apple with a dark green line around it)

tip 4: the only thing why you could beter do it with a shader in an another program is because you now get double the polygons you would normal have.

hope you enjoyed the tutorial and if you have any extra things you found out while doing cell shading or something i did wrong in this tutorial please be so free to report it here
Wink

lol the lightmap i am making of my scene isn't even at the half Crying or Very sad Shocked
maybe a second tutorial LOL Razz

here is my lamborchine cell shaded:
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Paul-Jan
Site Admin


Joined: 08 Aug 2004
Posts: 3066
Location: Lage Zwaluwe

PostPosted: Fri Jun 22, 2007 4:24 pm    Post subject: Reply with quote

*gheh* that's a great idea, neat!

Strictly speaking I think an essential part of cel shading, besides the thick silhouette rendering, is the rendering of inner contours (usually by simply rendering the 3D model in a limited set of shades)... but I guess tricking that without using shaders is truely impossible.

Guess we should really introduce true shader support sometime soon (preferrably without getting in the way of users who don't want to be bothered with all that).

Anyway... great little tutorial, it's nice to see something different like this!
Back to top
View user's profile Send private message Visit poster's website
elementrix
DeleD PRO user


Joined: 11 May 2006
Posts: 1300
Location: The Netherlands

PostPosted: Fri Jun 22, 2007 5:03 pm    Post subject: Reply with quote

Quote:
Guess we should really introduce true shader support sometime soon


that would be great Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Mr.Fletcher
DeleD PRO user


Joined: 07 Aug 2004
Posts: 1772
Location: Germany

PostPosted: Fri Jun 22, 2007 5:39 pm    Post subject: Reply with quote

elementrix wrote:
Quote:
Guess we should really introduce true shader support sometime soon


that would be great Very Happy

Yeah, I think so, too!

Also: nice tutorial! Wink
_________________
Behold! The DeleD Wiki! Please help us expanding it Smile
DeleD on IRC
Back to top
View user's profile Send private message
jwatte
DeleD PRO user


Joined: 26 Apr 2006
Posts: 513

PostPosted: Fri Jun 22, 2007 6:18 pm    Post subject: Reply with quote

Another feature of Cel shading (note the spelling -- it comes from animation, where they draw frames on "cel" paper) is that lighting is a sharp function, not soft. Typically, something is either in highlight (color of light), or lit (color of texture or solid), or unlit (darkened version of texture or solid). With real shaders, that's easy to put in DeleD; without, it needs a custom plug-in to view.
Back to top
View user's profile Send private message
Vijchti
Member


Joined: 16 Aug 2006
Posts: 250

PostPosted: Fri Jun 22, 2007 9:03 pm    Post subject: Reply with quote

I read the first few sentences of your explanation, realized where it was going, and immediately thought "Daaaang...that's brilliant!" Very Happy

Nice work. I like seeing little tricks like this.
_________________

"Psst, Here's a secret...Your last mortal thought will be,
'Why did I take so many days - just like today - for granted?'"
Back to top
View user's profile Send private message
Daaark
DeleD PRO user


Joined: 01 Sep 2004
Posts: 2696
Location: Ottawa, Canada

PostPosted: Sat Jun 23, 2007 12:41 am    Post subject: Reply with quote

That's not cell shading.
_________________
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Tutorials All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum