Cel Shading in GameMaker - Cartoon Chickens
The demo may take a moment to load, be patient.
Cel / toon shaders are an effect which manipulates lighting to give it a quantized, artistic look. It was made popular in video games by games such as The Legend of Zelda: The Wind Waker, Borderlands, Dragon Ball Fighter Z, and many others. It's used to give the games a flatter, cartoony look, as if they popped off of the page of a comic book or twentieth-century animation.
And you can use the effect for 3D games in GameMaker!
This extension is based on my Luminous Chickens 3D lighting library, so if you've used that, it should look very similar.
Works on Windows, Linux, OperaGX, HTML5, and probably everything else.
What's Included
- All of the stuff which Luminous Chickens includes: light types, ambient light, fog, etc.
- Adjust lighting levels using a ramp texture, allowing you to create stepwise lighting.
- Optionally use the vertical axis of the ramp texture.
- Optional outlines, which you may set the opacity and color for (see included screenshots).
- Works on both Windows and Linux, and probably most other platforms.
- A demo project.
Documentation
can be found here.
Vertex Formats
The shaders expect a 36-byte vertex format defined with a 3D position, a 3D normal, a 2D texture coordinate, and a 4D color. If your game builds vertex buffers with a different format, you will need to edit the attribute list in each shader. (If you're at a level where you know how to use this stuff, that probably won't be too hard for you.) I can't imagine you'll need anything other than position/normal/texture/color, since implementing normal mapping or something with a toon shader seems a bit counterproductive.
How They Work
I've made an extensive tutorial series on my YouTube channel about 3D lighting effects in GameMaker. This includes four videos about toon shaders, plus a large number of others.
Obviously, these are not beginner-level subjects. These (and others) would also be helpful to watch.
- 3D in GameMaker Studio 2 (full playlist)
- - - - - -
- 3D Directional Lights
- 3D Point Lights
- Fragment Shader Lighting (vs vertex shader)
- 3D Spot Lights
- 3D Spot Lights (advanced stuff)
- 3D Fog
- The High-Level Shader Language (HLSL)
- Multiple Render Targets
- Outline Detection - Sobel Filters
Price
It's $5. If you pledge to (in past or present tense) my Patreon for a lifetime total of $5 or more, send me a message there and I'll give you a key.
If you don't want to pay, you can also learn how to write these things yourself via the YouTube links above - they're free, and probably more useful in the long run.
The demo's free.
Notes
- Noches the chicken officially has a statue built in her honor (I guess). Is this weird?
Repository
N/A this time.
Credits
- The chicken icon and walking sprite was created by @alemunin
- The skybox and 3D meshes in the demo were created by the excellent synty studios
- The planet image maps came from somewhere on NASA's Jet Propulsion Laboratory gallery
Other Relevant Projects
I've made a bunch of other things for 3D in Gamemaker that you might be interested in:
- Collisions
- Basic 3D lighting
- Toon shading
- Terrain editor
- 3D model converter
- Better D3D emulation
Status | Released |
Category | Assets |
Author | Dragonite |
Made with | GameMaker |
Tags | 3D, cel-shader, GameMaker, lighting, Shaders, toon-shader |
Purchase
In order to download this shader you must purchase it at or above the minimum price of $5 USD. You will get access to the following files:
Download demo
Development log
- Added gradient fogJun 21, 2024
- Colored Lights, Fancier Demo, HTML5 DemoOct 09, 2023
- Documentation written (finally)Feb 17, 2021
Leave a comment
Log in with itch.io to leave a comment.