Thanks to some invaluable assistance from Memo, who sacrificed valuable time off work to help, I finally have a version of the Spherical Harmonics shader that has working lighting (a simple Phong Directional model).
I’ve mixed the previous simple shading with the lighting, in an attempt to make it look like it’s glowing from within. Doesn’t quite work, but looks more intriguing than the lighting on its own.
This formula is great at producing organic, sometimes vaguely obscene-looking (or maybe that’s just me) forms. It’s quite similar to the Superformula really. I’m sure the two share a common origin. They’re certainly both capable of mimicking a variety of natural forms, as well as producing lots of annatural ones.
This implementation still has a few little glitches. The sides of the mesh don’t quite join up correctly. Neither Memo or I are quite sure how to fix that, though I’ve been considering the idea of attempting to use a sphere rather than a plane as the initial mesh. I’m not sure how this would work at the moment, though.
The other problem is, with the lighting and supersampling added, it’s all got a bit slow, predictably. Not sure if I can do anything about that, really…