Lighting & the cutting room floor
A lot of my effort lands on the cutting room floor.
Have you ever watched videos of a certain game, and thought "how did they do that?". This kind of research occupies a good chunk of my time as a technical artist.
I wanted the lighting in Bad Pixels to be a bit more stylised than bog standard. Not happy with the way point lights have a bright core when up close to objects, I wanted more cartoony light. So I got to researching and writing a few shaders.
First off I tried writing a shader much like the look in Wind Waker. A 3D model that brightens the contents inside it using this article on Unity's stencil buffer. While the cut off is nice and sharp as I envisioned, this effect didn't work for me. It made everything inside the lit area bleached out. Bad Pixels doesn't have the palette range. Fun to code but... Cut!
Next I went for custom lighting. The idea was to affect point lights and not directional lights. This made a cell shaded look, clamping the range of the light's falloff. In the end I didn't like this look because of how it works with different surface normals. Everything seems to be out of sync compared to how a light would work in the real-world. Pointed at a cube corner for example the range of the circles don't match up. Again, fun to code but... Cut!
I felt these lighting techniques didn't represent early flat shaded 3D games. I was mixing too much "new" with "old". So let's take a look at how old games were actually lit:
Directional vector. When a polygon's flat (normal) direction matched the direction of a vector (the Sun), it would be full bright. The more a polygon faced away from the vector, the less full the brightness would be. Until if the polygon didn't face the directional vector, it would be "unlit".
Depth fog. As things are further way, the pixels get tinted a certain colour. This is also used to hide draw distance.
Pre-coloured 3D data using vertex colours. Not using any kind of lighting at all. Make lighting direction choices in an art program beforehand.
Most "old" flat shaded works used pre-lit 3D with no actual lighting, sometimes with depth fog. Star Fox, Hard Drivin' and Virtua Racing are classic examples.
On hardware with a bit more power, directional vector lighting was an option.
So it makes sense that older games of this generation didn't have point lights at all.
Playstation 1 games had generous point lighting with vertex lighting calculations. For Bad Pixels, I'm using older techniques for daytime and night time lighting. At the risk of looking too "new", point lights didn't make the cut to exist in my vision.
The final look? Directional lighting for day, depth fog for night. Trying out a few looks helped me decide that point lights should be completely discarded. Modern game engines make modern features like point lights easy to add without a thought.
The "cutting room floor" is true for movie makers as much as it is for game developers, or any creator for that matter. Artists have sketchbooks. Sculptors have a floor covered with scraps. Game developers have unfinished prototypes. To make something that follows a vision, a lot of areas get tested and discarded.
Get Bad Pixels
Bad Pixels
8-bit shoot-out in the old west
Status | In development |
Author | dadako |
Genre | Action |
Tags | 3D, 8-Bit, boomer-shooter, Commodore 64, FPS, Low-poly, Pixel Art, Retro |
Languages | English |
Accessibility | Subtitles |
More posts
- console hud60 days ago
- TerrainJul 18, 2024
- Lighting part 2 - shadowsApr 15, 2024
- Wanted, dead or dead.Dec 16, 2023
- one sprite = one hundred cowboys?Nov 17, 2023
- Tumbleweeds, roll out!Oct 11, 2023
Comments
Log in with itch.io to leave a comment.
indeed - the spotlight doesn’t produce something pleasing.
is fog dithering aligned with ground dithering? not obvious in gif.
Fantastic post. I love that you carefully considered all of the possibilities and decided to keep the overall visual style as well as stay within the technological constraints of that period. What an excellent project.
looks like a cool project, hope you are having fun with it.