Update some attributes automatically

Such as the light direction