Snarkpit Articles


Premise





Cel-shading is almost a buzzword in games these days. Mention "cel-shading" and heads suddenly turn up. Now you too can jump on the bandwagon and cel-shade your own level! Hurrah! The concept is basically drawing a black outline around an object. In 3D modeling, you would simply do this by cloning the mesh, inverting the normals, and assigning a black material to the whole thing. However, Worldcraft/Hammer is clearly different from modeling, but the overall concept is still the same.

Tutorial



A basic proficency of Worldcraft / VHE is assumed of the reader.

1] Make a new blank map. For now, we'll cel-shade a crate for tutorial purposes.

2] Make a 64x64x64 block and align some proper crate textures on it if they are not already.




3] Clone (Shift+Drag) the block, and apply the NULL texture to it. Keep in mind that you should now have TWO blocks; 1 with crate textures, 1 completely covered in NULL.




4] On the top menu bar, select Tools >> Hollow. The value must be negative. The larger the number, the thicker the outline will be. For now input "-4". This will hollow the block outwards 4 units.




5] In the 3D view, move the camera inside the hollowed block and texture the inside faces BLACK.




6] Ungroup the BLACK shell and func_illusionary each brush of it seperately. Do it seperately because if it is all one func_illusionary, then it will cut into itself and ruin the effect. It will also prevent VIS from removing the crate inside the BLACK shell and allow light to pass through to the crate inside the shell.




8] Build a temporary room around the object, and insert an info_player_start. Compile and enjoy (VIS and RAD aren't really neccesary).




What the Hell is Happening?



The NULL texture tells CSG and BSP not to even render the face. Therefore, it is see-through. However, when you see through it, you see the black texture on the other-side, creating the illusion of a black outline.

Keep in mind the tutorial method is very hacky, but is used merely to illustrate the main principle for people. Also note that you should raise the entire object at least 1 unit up so that the outline does not intersect completely with the ground. The cel-shading described in the tutorial looks bad, but it's cel-shading none the less. For more complex brushes, you will have to build the "black shell" manually to conform to the object.

For best results, like featured in the lower picture, slope the edges of each BLACK brush so that every edge is mitered... It's difficult to explain, but easier to see in RMF form. So if you're really curious about how to execute it better, download the RMF below and look at it.



Downloads



Example Map - DOWNLOAD
(RMF contains crate at each stage of the tutorial, along with the crate featured in the picture above, cel-shaded correctly. Also contains a BSP playable in regular Half-Life)

Special Thanks to Chips, creator of bb_mars (I think), without of which I would have never even imagined of the technique. And additional special thanks to BuzzyBots; may non-realistic rendering live on!


Post ReplyView Topic
Discussion
0 starsPosted by Foxpup on Mon Nov 29th 2004 at 2:11am

How come video games based on cartoons (like The Simpsons: Hit And Run) don't use this effect???
0 starsPosted by alba on Thu Aug 12th 2004 at 5:36pm

Oo! I like it, gonna try it out smiley
Post ReplyView Topic