Cleanup is going to take awhile, so the site is back up but editing has been disabled.

Cell Shading

From HalfLife 2 Knowledge Base

Jump to: navigation, search

Contents

How to Cell Shade in Hammer

Materials Needed

K_CellShading Materials Pack ( Downloadable Here )

Example Map: K_CellShading

Using Cell Shading

Cell-Shading is great for adding a cartoon-ish look to your maps, or individual objects within your map. You'll need to download the 'K_Cellshading Materials Pack' For this tutorial, It is needed for one of the cell shading techniques. Here is an example of the two types of cell shading I will be telling you how to create:

Layer Method:

Image:K_cellshadinglayerex.jpg

Hollow Method:

Image:K_cellshadinghollowex.jpg


Layer Method

Step 1

We'll start with the "Layer Method", This method is the easiest to create and when the shape collides with any wall or another object the outline will appear to move and will cover up the clipped edges, as seen in the far right corner of the 1st example image. Sadly, this method has 2 small defects; Objects using this technique that are movable sometimes flicker ( Rarely ) and the outlined texture gets slightly tinted by outline. This method requires the Black_50Percent texture and an unlit texture such as the included White_50Percent. Create an object of any shape and texture it with any 'UnLit' texture like a light or the White_50Percent texture. I created a square:

Image:LayerStep_1.jpg


Step 2

After you have created your shape select it and Copy it (Ctrl+C), Go into the edit dropdown menu at the top of your hammer window and select "Paste Special...", you should paste 1 copy, check the "Start At Center Of Original" box and make sure XYZ boxes have 0's (Zero's) in them, Press the "OK" Button. You should now have an exact copy of the original shape and the new one is selected, Press Ctrl+M to bring up the transform window. Select the scale check circle and enter 1.1 in the X, Y, and Z boxes. 1.1 is not the only size outline you can create, but I recommend this size, for it looks best. Now keeping the newly sized object selected change it's texture to 'Black_50Percent', included in the K_CellShading materials pack. Presto! You have your 1st cell-shaded object using the 'Layer Method'! My result looks like this:

Image:LayerStep_2.jpg


Hollow Method

Another technique of creating cell shaded objects is what I like to call the 'Hollow Method'. In this technique you create a cell shaded object that has a solid black outline rather than a semi-transparent one, and the outlined texture does not get shaded black. Though this method is slightly more time consuming, it pays off and does not require UnLit outlined textures or my texture pack. You may want to use unlit textures still, it stops the outlined shape from having shaded sides, making it more cartoony, but it is up to you.

Step 1

Begin by again creating a simple shape, though with the Hollow Method you may not want to make the shape too complex. I'm going to use a simple cube for my example again. You can texture it however you like. Here is my shape:

Image:HollowStep_1.jpg


Step 2

After you have created your shape select it and Copy it (Ctrl+C), Go into the edit dropdown menu at the top of your hammer window and select "Paste Special...", you should paste 1 copy, check the "Start At Center Of Original" box and make sure XYZ boxes have 0's (Zero's) in them, Press the "OK" Button. You should now have an exact copy of the original shape and the new one is selected, Press Ctrl+M to bring up the transform window. Select the scale check circle and enter 1.15 in the X, Y, and Z boxes. 1.15 is not the only size outline you can create, The scaling is slightly bigger here due to the outline, I'll get to that later. Don't worry about it.

Step 3

Take your newly scaled object and make it Hollow (Ctrl+H), Choose the smallest hollow possible, which is '2'. You cannot see your original shape, that is ok, select the whole hollowed shape and texture it with "invisible". Proceed to move the camera in the 3D view of hammer inside of the newly hollowed cube, select all inner walls of your newly hollowed shape by opening the texture application and clicking on all sides (My cube has 6) of the inside while holding 'Shift'. Change the texture to any texture, this will become your outline. I suggest an unlit solid color like the 'White_50Percent' or one that cannot be shaded like a perfect black, you can find a perfect black texture by typing "black" in the texture browser window, select the "toolsblack" texture.

Step 4

You cannot see the cell shading effects of the Hollow Method in Hammer, you must compile your map and run it. Presto! Your cell shaded object is complete! Here is my result:

Image:HollowStep_2.jpg

--StickFigs 22:22, 22 Dec 2004 (EST)

Personal tools