Cost volume generation