Improved SDF generation