## Conversion between specular exponent, specular roughness, and specular glossiness

Ever need to convert between specular exponent, roughness, and glossiness? for the Blinn-Phong BRDF, these three values represent the same concept. Specular Exponent is the actual value used to compute the BRDF. Let’s call that variable $e$. The roughness $m$ and glossiness $g$ values are numbers between 0 and 1 and they are additive inverses of each other. In other words

$$g = 1 – m \, ,$$

$$m = 1 – g \, .$$

The exponent is given by

$$e = \frac{2}{m^2} – 2$$

or

$$e = \frac{2}{{(1 – g)}^2} – 2 \, .$$

The BRDF $f_r(\omega_i, \omega_g)$ is

$$f_r(\omega_i, \omega_o) = \pi \frac{F(\omega_i \cdot \omega_h) D(\omega_i) G_2(\omega_i \cdot \omega_g, \omega_o \cdot \omega_g)}{4 (\omega_i \cdot \omega_g) (\omega_o \cdot \omega_g)}$$

where Blinn-Phong $D(\omega_i)$ is given by

$$D_{\mathrm{Blinn-Phong}}(\omega_i, \omega_h, e) = \frac{e+2}{2\pi} (\omega_i \cdot \omega_h)^e$$

and the resulting specular illumination is given by
$$\mathbf{L}_o = f_r(\omega_i, \omega_o) \mathbf{L}_i (\omega_i) \mathbf{V}_i (\omega_i) (\omega_g \cdot \omega_i) \, .$$

## Commodore VIC 20 NTSC and PAL colour/color palettes

I’m posting this mostly so I can look at the colors any time I want.

NTSC

PAL

## One Hour Game Jam #101

Last blog post, I mentioned One Hour Game Jam which happens every Saturday. So this week, I’m going to jump in and make my first entry since LD29 a few years ago. I’ll probably dust off the old LD29 Manifold code and get ready for the compo.

I have already been practicing making music in 10 minutes or less. Several times this week, the composing bug hit me and I’m confident of putting something together in 15 minutes. But either workflow has something to do with it or being distracted by sound design is.

I have recently taken a sampling approach to this problem. Ableton Live has been the tool of choice lately and recording clips and then sequencing them is very time effective. It is very important to decide what core set of sounds will be needed so that the note entry takes up most of the time. Using an APC40mkii is then very easy to record the sequence of clips using its scene launch capability.

For this weekend, the computer will be set up just for that. The hardware synthesizers will be configured and ready to go and all the tracks will be set to record their respective sounds. The mastering track will be set so exporting the master audio is streamlined.

It’ll be exciting to see what this weekends compo will bring out musically. Can’t wait… In the meantime, warming up to the 21 day challenge, lets dust off the game engine.

## 21 Day Challenge

I have a book by Andre Lamothe called Teach Yourself Game Programming in 21 Days and so I am going to build a game development library in TypeScript for the web. One motivation is that I just found out about the #1hgj One Hour Game Jam that happens every Saturday and that would be lots of fun!