Fake Cel Shading

Discussion in 'Mapping Questions & Discussion' started by hascat, Nov 23, 2008.

  1. hascat

    hascat L1: Registered

    Messages:
    2
    Positive Ratings:
    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.

    [​IMG]
    [​IMG]

    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.

    [​IMG]
    [​IMG]

    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.

    [​IMG]
    [​IMG]

    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!

    [​IMG]
    [​IMG]

    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.
     
    • Thanks Thanks x 2
    Last edited: Nov 24, 2008
  2. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    That looks so cool
     
  3. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,564
    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 :/
     
  4. Fireman

    Fireman L4: Comfortable Member

    Messages:
    150
    Positive Ratings:
    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.
     
  5. hascat

    hascat L1: Registered

    Messages:
    2
    Positive Ratings:
    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.
     
  6. laghlagh

    laghlagh L6: Sharp Member

    Messages:
    391
    Positive Ratings:
    52
    haha

    This is pretty cool though.