fix material generation, some backwards compatibility, spikeworld