Fake Cel Shading

hascat

L1: Registered
Nov 22, 2008
2
2
I can't claim credit for this technique. I recently played ctf_colorblind_beta which used this technique liberally and decided to figure out what was going on in there. Turns out it's really simple.

Step 1:

Create a cube! We'll use a 64x64x64 to keep things small and easy to work with. Decorate your cube in a solid color. This is important. If your cube has any sort of texture on it, it'll lose that cartoony effect. I used models/debug/debugwhite.




Step 2:

Create a slab on each side of the cube. These should be extruded from each face of the cube by some set amount. I used an offset of 8, so each slab is 8 units from the matching edge of the cube, and is 8 units larger in each direction, so they're 80x80x8. These should all align so they completely enclose the cube. Texture these with another solid color. I chose models/props_trainyard/black.




Step 3:

Texture the outer faces of the slabs with tools/toolsinvisible. This will force only the faces facing the cube to be visible. The other faces will never be rendered, and any face not facing you will never be rendered. The upshot is that the cube will always have a black border, creating the shading effect.




That's it! This is pretty simple to do for any cube or rectangular shape. I'm very new to TF2 mapping myself, so there might be an easier way to do this using the hollow tool or something similar. Have fun!




The attached VMF has a few cubes you can play around with. It's much cooler when you see it in motion than in plain old screenshots.
 
Last edited:

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Interesting.

You couldn't make a map out of this though, unfortunately, due to the technique. Atleast one that was optimised. I imagine an entire map made like this would kill a computer :/
 

Fireman

L4: Comfortable Member
Mar 21, 2008
150
59
There is a map like this made like this already, the op mentioned it, ctf_colorblind. It isn't so much a pc killer as it is...well, blinding. It looks really cool at first, but it's really hard to orientate yourself in a map made entirely out of blacks and whites.
 

hascat

L1: Registered
Nov 22, 2008
2
2
Yeah, ctf_colorblind does have a lot of problems. The foremost was that I spent the better part of the round walking around these fancy cubes trying to figure out how it was done.
 

laghlagh

L6: Sharp Member
Jul 15, 2008
389
53
Yeah, ctf_colorblind does have a lot of problems. The foremost was that I spent the better part of the round walking around these fancy cubes trying to figure out how it was done.

haha

This is pretty cool though.