11
$\begingroup$

I followed a tutorial Adding Clouds to Blender Cycles' Sky Texture on how to generate a nice sky in Blender with good results.
Now I want to export the sky as 6 images for making a skybox in my game engine (Esenthel). I tried with rotating the camera in the six directions needed( front, back, left, right, up and down) and saved the renders, but that didn't work to good as I got visible seams when applied in my engine skybox.

Do anyone have an advice on how to do this export correctly?

$\endgroup$
12
$\begingroup$

You can UVmap a cube and add a Glossy Material to it. Set the Roughness parameter to 0.0 Add a Sub-Surface Modifier to the cube and set it to about 4 iterations, this helps for baking the Glossy Shader properly.

Add a texture node to the material so the sky can be baked to the UV Coordinates.

enter image description here

Now invert the faces for the cube so they face inwards. This should work as a SkyBox.

enter image description here

If you want the sky to be available in a GLSL shader as a reflection map then you may want to pay closer attention to how the UV's are laid out since a game engine may have specific layout requirements for skybox/enviroment/cubeMaps.

Here's some reference on how to code a cubemap using a runtime technique that was published by nVidia, it uses nVidia CG which is a shader language that is compatible with both OpenGL and DirectX.

https://web-beta.archive.org/web/20160408223256/http://http.developer.nvidia.com:80/CgTutorial/cg_tutorial_chapter07.html

And the source code to go along with the CgTutorial

https://developer.nvidia.com/cg-toolkit-download

$\endgroup$
  • 3
    $\begingroup$ "Please avoid text in images" - David $\endgroup$ – GiantCowFilms Apr 11 '15 at 2:26
  • $\begingroup$ I've tried this method but when I try to add a subsurf modifier the bakes images are very distorted around the edges. I rendered each face to a seperate image tho, not sure if that's the problem. I removed the subsurf and the bake seems to be rendering fine tho. $\endgroup$ – Sidar Feb 16 '18 at 16:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.