Let's talk graphics.
So, as many of you will likely know by now, one of the primary things that contributes to the atmosphere of doortal is the graphics and lighting. These two things happen to also be the two things I am very passionate about as a programmer.
So, let's talk lighting. I knew when I started this project that I was going to bake the lighting, as this allowed for very high quality lighting at minimal cost of performance.
So, for the diffuse lighting I went with lightmapping. Lightmapping is basically a method were you calculate the lighting and save it to a texture for the mesh. Now, I had a pretty unique requirement when working with doortal. I wanted to be able to change the colors of the lights.
Now, normally you'd just use dynamic lighting for this. But in doortals case there weren't really any dynamic objections that allowed for the level of visual quality that I desired.
The solution? Bake multiple lightmaps, one for every light in the scene! This is so powerful because you can then re-color the lights after the fact. So, this gives very high quality diffuse lighting.
And this works wonderfully, andgives very high quality diffuse lighting. However, that is still only half of the puzzle. The other problem that needs to be covered is specular lighting.
Fortunately, there is another great solution for specular lighting - radiance probes! Basically, radiance probes are like an advanced version of a cubemap, where the lighting is "captured" at a single point. Now, this works great for most specular surfaces!
If we try to use this for specular lighting, we get:
Which works very well! Or well, it does; most of the time. But there are still a few issues. For instance, the reflections from the stove top and the mirror obviously do not line up properly.
Fortunately, for planar reflections like mirrors, there is another great technique; planar reflections!
The only problem is that planar reflections require your scene to be re-drawn once per frame. If you have a lot of planar reflections, this becomes too much to handle. Fortunately, with some clever trickery you can make it so you only have to draw one per frame and still get away with roughly 5 planar surfaces before the drawbacks become too obvious.
Now, how do you pick where to use planar reflections.
Well, the toaster probably doesn't need to have multiple planar reflections dedicated to it, but the mirror and the marble and stove top are probably good options. So, if we try to do this now we get;
and this is, in my opinion; a much better result. Now, we have both specular and diffuse lighting working and working well!
But, there are still a few final things to cover. Mainly glass and post processing.
Glass is actually fairly easy to render in this case, we just rely on good-ol' screen-space ray-tracing to get us all the way there. It's a very cheap effect and (in my opinion) looks very convincing. Now, for post processing very little was actually done, aside from one major effect; chromatic aberration.
Chromatic aberration is used here only to give an extra bit of flare to the final image, and is the effect that creates the purple and green ish lines along the edges of objects. In my opinion it makes it feel much more natural.
Files
Get Doortal
Doortal
A simple game were you walk through doors. Oh, and there's a radio.
Status | Released |
Author | NotTheFishYoureLookingFor |
Genre | Survival |
Tags | Horror, Singleplayer |
Leave a comment
Log in with itch.io to leave a comment.