Baking planet texture to equirectangular projection

Blender provides a great possibility for creating procedural textures and materials. In particular, in Blender, we can create interesting procedural textures for planets. However, Blender’s node system is not compatible with third-party renders and game engines, and procedurally generated textures need to be baked into an image.