Cycles displacement shader

Vertex displacement

First you need a spherical mesh build from lots of vertex points. At the beginning these points are all on the surface of your sphere. Then you use an algorithm to displace these points. Displacement can move some of the points away from the center of the sphere or others closer to the center. This leads to a new surface more curly than the underlying spherical mesh.

Blender 2.7x and the newer 2.8x version have slightly different material nodes for displacement. Enable the Experimental feature set, and use the Subsurf Modifier with Adaptive subdividing. For details see Blender manual on displacement.

The above object is based on an ico-sphere mesh, subdivided and displaced with the help of a Musgrave noise generator. Only nodes are used, no programming needed.

Open Shading Language

For custom effects you can add your own shader programs to one or more nodes in the material graph. For example this image uses the Open Shading Language to form the ripples on the surface.

shader comb(
    float Vin = 0.5,
    int Teeth = 3 [[ int min = 1 ]],
    float Width = 0.1 [[ float min = 0.0 ]],
    output float Vout = 0.0)
{
    int half = Teeth / 2;
    float delta = 2.0 / (Teeth + 1);
	float peak = 0.0;
	float offset = Teeth % 2 == 0 ? 0.5 * delta : 0.0;
    Vout = smoothstep(peak-Width, peak, Vin) - smoothstep(peak, peak+Width, Vin);
    for(int ti=1; ti<=half; ++ti) {
        float p = peak - ti * delta;
        Vout += smoothstep(p-Width, p, Vin) - smoothstep(p, p+Width, Vin);
    }
    int rest = Teeth - half;
    for(int ti=1; ti<=rest; ++ti) {
        float p = peak + ti * delta;
        Vout += smoothstep(p-Width, p, Vin) - smoothstep(p, p+Width, Vin);
    }
}

Software used