Game Development Community

Cell shading....

by John O · in General Discussion · 05/15/2003 (7:29 am) · 13 replies

Has anyone made a cell shaded game using the torque game engine? Im using Milkshape 3D....I just want to know if its possible.

#1
05/15/2003 (8:06 am)
Sure, it's possible. You just need to make the necessary changes to the rendering code.
#2
05/15/2003 (8:12 am)
There's even a technique to make models look cel-shaded without any special rendering technique other than environment mapping (which milkshape supports and torque). I doubt the milkshape exporter properly exports environment mapped textures, but you could make it look cool in milkshape. I saw a tutorial of how to do this on the milkshape forum... if you poke around there you might find it. If you have too much trouble I remember the basic technique, but I don't remember all the details.
#3
05/15/2003 (9:34 am)
I think I saw the same post you did in the Milkshape forums..But I cant find it now:(
Im working on a action/adventure game, and I want to do it in cartoony fastion.
#4
05/15/2003 (11:08 am)
You might try to contact the author of this post.

I *think* this project uses cell shading, if not his technique is very convincing. ;-)
#5
05/15/2003 (11:50 am)
I will do that, thanks:)
#6
05/15/2003 (2:21 pm)
Well, the technique for milkshape was basically this. You have to make a texture that is just a few horizontal stripes... a small line for the highlight, a broad line for the light shade, and a dark broad line at the bottom for the shaded part. That is what you apply as the environment map to the parts you want to have the cel shaded look. To make the outline, you duplicate the whole model, then reverse all the faces (make sure backfaces are culled away). Change the properties of these new faces to no texture, black color, no ambient light... etc, so they appear black. I tried this once with a spaceship model and it really did look pretty good. It probably won't work if you have lights moving around all over the place, but for still shots especially it looks good :)
#7
05/15/2003 (6:58 pm)
Thank you John:)
#8
05/15/2003 (7:01 pm)
Also, can anyone give me some tips on how to create a good cell shaded game? Like should I make it 2D, or should the backgrounds be in full 3D? Any suggestions will be fine:)
#9
05/16/2003 (12:48 am)
The best technique for rigged/animated meshes is described above pretty well. You don't even really need to do the texturing bit. Just use simple textures.

Copy and flip the initial mesh. Then color it black and cull away backfaces. You have to use the Fat Boy tool in Milkshape to pump up the cel shade so it's larger than the original mesh thus outlining it. I use this technique throughout my whole game, except for normal objects which I just do in code. When my level loading function is called all level entities are then cel shaded.

Cel shading has gotten more complicated since it's introduction though. When it was first introduced in Jet Grind Radio for the Dreamcast it was merely mixing simple textures with the black outlines. The new gfx technology allows for cartoon rendering which is really entirely different.

If you were going to make a 2D game you could just fake it by using cartoon looking sprites. When you mask away black pixels you could leave a small outline around your main image that is not exactly rgb(0,0,0).
#10
05/16/2003 (8:08 am)
Thanks for the advice Jeremy:) Has anyone made a cell shaded game with the torque game engine?
#11
05/16/2003 (8:23 am)
Look at Dog of Prey for a Torque game using NPR techniques.

The technique that Jeremy gives is a very clever trick that allows inked edges on just about any hardware. The only problem is, you have to double your polycount for every object you wish to render that way.

NPR is certainly an area that would be easier to explore if you limit your game to higher-end machines and use hardware shaders. Both NVIDIA and ATI (the latter in particular) have produced some interesting NPR demos.

Btw, if you wanted to go for Disney-style inking, never use black outlines. Instead, they should be a darker shade of whatever your object is colored.
#12
05/16/2003 (8:30 pm)
Thank you Simon:) I really like the technique used to make that game. Im going for a very cartoony type game. Now this game "Dog of Prey" was made using the torque game engine? I still have yet to buy the TGE, I plan on getting it if, I know it can handle the things I want to create......
#13
05/17/2003 (8:19 pm)
Yeah, DoP is a Torque game. I thought I intimated that when I said "Look at Dog of Prey for a Torque game [...]" *grin*

Glad I could a bit more insight. NPR is a pet hobby of mine. Check out this resource for more reading - it actually has a link to one of my own products (toon up pro) but unfortunately leads to a 404 right now.