how does frame generation work