K-ON! Clubroom – Parts 11, 12 & 13

Another late update (sorry!). At least it’s not more than a week since the last one.

K-ON! - 27 - Sun and Sky

First thing to look at in this build is the new sky. It’s a bit hard to see through the windows, but there’s now clouds in the sky and a flare where the Sun is (and the flare moves as the Sun sets).

This first version of the sky is not actually using Unity’s built in skybox, but is simply mapped to the inside of a sphere. A second camera renders the sky sphere behind everything else and rotates to match the player’s view: a simple 3D skybox implementation.

K-ON! - 28 - Projector ScreenK-ON! - 29 - Loudspeaker

There’s also two new additions to the room itself: the projector screen above the blackboard and the loudspeaker. Both are using normal maps to add a little bit of depth.

Normal mapping won’t work as well in VR as it does on a 2D screen, but it still improves the lighting without adding extra polygons.

Next up is probably the most important feature in any video game: lens flare.

K-ON! - 30 - Lensflare

Yeah, I know.

Mostly I just wanted to learn how Unity’s lens flares worked. (Once Oculus support went in, the flare was reduced to just the glow around the Sun itself.)

I also improved the sky outside the room.

K-ON! - 31 - New Sky

It’s a bit hard to see in this picture, but the sky now has a more natural gradient from pink to blue. The clouds also look a lot better.

The last update to discuss today is a simple one.

K-ON! - 32 - Lights

Ceiling lights.

Not a lot to talk about here. It’s a simple model with a simple texture.


Until next time, best wishes from the dark side of the Moon.

(Also, if you’re reading this: please leave a comment with your thoughts!)


K-ON! Clubroom – Parts 8, 9 & 10

Time for another update. Three builds this time, to make up for the late update.

K-ON! - 22 - Bench

The first new addition is the bench and its beautiful soft shadow.

K-ON! has some unusual quirks in its furniture. Take a look at how the front legs are joined to the arm rests, then compare that to the back legs. Watching the show, I never even noticed that detail.

K-ON! - 23 - Bench Back

This end of the room is really coming together now. One less white box!

The next change was a bit disappointing, but necessary. Up until this build, there was an annoying performance problem that I was having trouble tracking down. I finally discovered that it was caused by the free FXAA filter I was using to smooth out the scene.

I hadn’t purchased Unity Pro at this point, so my only option was to lose the filter.

K-ON! - 24 - Aliasing

Take a look at the above image and you’ll see that everything is a little less smooth. On the plus side, the performance is now a solid 60 frames.

Anyway, on to the next feature: posters!

K-ON! - 25 - Posters

I’m really happy with how these turned out. I couldn’t find a high resolution source image, so I had to reference whatever screen captures I could find from the show and redraw the posters myself.

I drew them in Inkscape and then added some final touches in Photoshop.

K-ON! - 26 - Posters Large

The in-game posters use a transparent “cutout” shader. The advantage of the cutout shader (as opposed to the ordinary transparent shaders) is that it can receive shadows. The drawback is that it only supports full transparency or full opacity. That’s all I needed though, so I went with it.

But why do I need shadow support on the posters?

This build introduces a special new feature: the Sun now sets in real-time! I think K-ON! really captures the feeling of time passing and people growing up, so I want to build a VR experience that respects that.


Hopefully I’ll post again before our Sun’s light has traveled another 1212 Astronomical Units.