Baking a CubeMap into a Single Texture

If I create a sphere with some UV coordinates on it, load it up and put a cube map on it, is it possible to then save out a single texture image of that cube map based on the UVs?

No, but you could achieve this effect with a different approach. Instead of constructing a sphere with UV coordinates for your flat map and UVW coordinates for your cube map (even if the UVW coordinates are implicitly generated), you will construct a flat rectangular mesh with XYZ coordinates and UVW coordinates at each vertex. For the XYZ coordinates put in (U, V, 0) or (U, 0, V), whichever is more convenient for you. So now you have a mesh that has UV coordinates in the XYZ position and UVW coordinates for texture coordinates.

Attach this mesh to render2d so that it fills the screen, apply your cube map to it, and take a picture of the result. This picture is now a 2-d texture that you can apply to your sphere.

Note that you need to be able to generate the UVW coordinates explicitly for this approach; you can’t use automatic coordinate generation. But that’s a fairly simply computation.

David

Hmm. That seems like a rather complicated approach for what I’m trying to achieve. I’ll just do planar maps for the top and bottom of the sphere and have it mirror at the equator. Thanks for the info, David.