Difference between revisions of "Creating cubemaps for Skyrim"

From Nexus Mods Wiki
Jump to: navigation, search
Line 22: Line 22:
 
[[File:TutCubemap2.jpg|right|thumb|Adding a vertical guide]]
 
[[File:TutCubemap2.jpg|right|thumb|Adding a vertical guide]]
 
[[File:TutCubemap3.jpg|right|thumb|Grid]]
 
[[File:TutCubemap3.jpg|right|thumb|Grid]]
 +
[[File:TutCubemap4.jpg|right|thumb|Initial picture]]
 
Begin with a blank image in GIMP, the size of it to be a little bigger than the cubemap you are going to use. In this tutorial I am going to work with faces of 256 x 256 and the vertical cross shape, so the total size of my cubemap will be:
 
Begin with a blank image in GIMP, the size of it to be a little bigger than the cubemap you are going to use. In this tutorial I am going to work with faces of 256 x 256 and the vertical cross shape, so the total size of my cubemap will be:
 
* width = 3 * 256 = 768
 
* width = 3 * 256 = 768
Line 30: Line 31:
  
 
After you've added all the required guides, you'll end up with something similar to the image shown in picture ''Grid''.
 
After you've added all the required guides, you'll end up with something similar to the image shown in picture ''Grid''.
 +
 +
The next step is to select the base image that will be used for the cubemap, or draw it yourself.
 +
:'''''Note:''' If you decide to draw the picture yourself to make things easier, make sure that all the edges have the same colour and paint the light spots without modifying the edges. That will save you a lot of time.''
 +
In this tutorial I've chosen a picture of the Milky Way but it could be any other picture. Open the picture as a new layer ''(File -> Open as layers ...)'' and position/resize/rotate it until you get something like the ''Initial picture''.
 
   
 
   
  
 
==References==
 
==References==
 
* [http://www.custommapmakers.org/wiki/index.php/Creating_a_skybox_from_a_photograph Creating a skybox from a photograph]
 
* [http://www.custommapmakers.org/wiki/index.php/Creating_a_skybox_from_a_photograph Creating a skybox from a photograph]
 
  
 
[[Category:Skyrim]]
 
[[Category:Skyrim]]

Revision as of 13:44, 8 August 2014

Overview

This tutorial shows all the main steps you need to follow to create a cubemap for Skyrim (the cubemap you create here may be used in other games, too).

Required tools

Cubemaps

Vertical cross cubemap

Cubemaps are the texture files that are used on metallic items (like weapons and armours) to add reflections to them. In Skyrim they are usually named with the _e.dds extension.

The strength of the reflection in game is modulated by:

  • the shader flags sets in the nif file, under the BSLightingShaderProperty node. This settings will affect all the mesh node.
  • the environment mask. This texture file is used to adjust the reflection in the different parts of the mesh (envirnment mask files are usually named with the _em.dds extension): the white parts of the environment mask will show all the reflections set in the cubemap, the black parts will have no reflection at all and the grey parts will be somewhere in between depending on the shade of grey used.

The name cubemap comes from the fact that these textures have the shape of an unfolded cube: they consist of six square images of the same size that will cover the six faces of a cube with a seamless picture. There are several shapes for cubemaps (as there are several ways in which you can unfold a cube), the one I am going to use in ths tutorial is the vertical cross shape as shown in picture Vertical cross cubemap.

The most common way of creating a cubemap is using a picture of a landscape, as this landscape will be the image reflected on the item, but you can create cubemaps also using just abstract images with dark and light spots.


Prepare the picture

Adding a vertical guide
Grid
Initial picture

Begin with a blank image in GIMP, the size of it to be a little bigger than the cubemap you are going to use. In this tutorial I am going to work with faces of 256 x 256 and the vertical cross shape, so the total size of my cubemap will be:

  • width = 3 * 256 = 768
  • height = 4 * 256 = 1024

And the canvas I am using is 1042 x 1503 but any size will do as long as it is bigger than 768 x 1024.

A very useful thing to do is to set a grid in GIMP using guides. These guides will mark the edges of each of the six faces that form the cubemap. To make sure that the spacing between them is exactly the size you've chosen for your square faces (256 in this tutorial), select the menu Image -> Guides -> New Guide ... and then select if the new guide is horizontal or vertical and its position in pixels as shown in picture Adding a vertical guide.

After you've added all the required guides, you'll end up with something similar to the image shown in picture Grid.

The next step is to select the base image that will be used for the cubemap, or draw it yourself.

Note: If you decide to draw the picture yourself to make things easier, make sure that all the edges have the same colour and paint the light spots without modifying the edges. That will save you a lot of time.

In this tutorial I've chosen a picture of the Milky Way but it could be any other picture. Open the picture as a new layer (File -> Open as layers ...) and position/resize/rotate it until you get something like the Initial picture.


References