Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Graphic Artistry: Cube Maps


Recommended Posts

GA_CubeTitle.png

Craft_Welcome.png

We'll start off by answering the big question, what are cube maps?, Cube Maps are six images that are mapped onto a cube, this creates a 360° panorama. Cube Maps are supported natively too, so they're really quick to render in-games and because of this there is a certain way they're created and used.

The Cube Maps are used in games as another form of environment mapping or in the case of Skyrim can be used along side an environment map. Now why would we want to use them?, well for most textures we don't need to have the environment affect them, but for textures like Weapons and Armor, having this extra effect helps create a more realistic look. For example Armor uses environment mapping alongside the specular map to create realistic looking metal textures.

Before we move on we'll take a look at what they look like, first (1) we have a cross shaped Cube Map and the next one (2) we have the horizontal Cube Map. The second type is the layout the textures from Skyrim use.

(1)

CubeCross.jpg

(2)

CubeHorizontal.jpg

And with that we'll move onto creating them :dance:

Craft_Req.png

Photoshop/GIMP/Paint.Net

Photoshop DDS Plugin // GIMP DDS Plugin

Craft_TasticTitle.png

So let's get creative shall we? :D, We'll go step by step through creating a test cube map, nothing fancy or anything.

CM_01.png

The first thing you will need to do is create six textures based on the environment of your choice. The DDS plugin expects you to lay out the faces of the cube map horizontally: +X -X +Y -Y +Z -Z. Or in another way: RT, LF, UP, DN, BK, FR.

So keep that in mind when creating those textures.

:smarty: Smarty Says: Remember the textures are cubes themselves, so sixes 128x128, 256x256 etc are used. We'll be using 128x128 cubes later so best go with that.

For this tutorial I'm using simple plain cubes as it;s only a practice texture. You can follow along and do the same if you'd like or make something that'll be useable in-game.

CM_02.png

Open up your 2D application of choice and create a new image, make the dimensions 728w and 128h. This is the same as a vanilla cube map and will work well for this tutorial. So going by what the DDS tools need us to do, we'll start with the left side of the texture and place our first texture in there, this one will be the right side of the cube.

So open up your right side texture in your 2D application, then copy and paste it into our blank texture. Position it over on the left.

CubeRT.png

CubeExamp01.png

So what we do next is repeat the above, we work from the left to the right pasting in each of our textures. Once we've done that we'll end up with something like this:

CubeExamp02.png

And with done we can now save it. Saving a cube map is almost the same as any other texture, so we set the compression to DXT1 and make sure Mip Maps are created, we then change one last setting. If you look under the compression option (In Photoshop) you'll see see a drop down box that has 2D Texture as it's selected option.

CubeSave01.jpg

Click the small arrow to the right and change the option to Cube Map, the texture will now be saved correctly. If you view the cube map outside of your 2D application, say in a thumbnail viewer, you'll notice it's a single flat texture. The cube map setting tells the plugin to flatten the cube map into a single DDS texture.

CubeSave02.jpg

:smarty: Smarty Says: Don't worry the game can read this just fine :D

When saving the texture you are not required to give it a suffix but it's a good idea to use _e as that's what Bethesda uses for their textures, following that should make it easier to remember what the suffixes mean.

Drop the Cube Map into your texture folder and then we can adjust our NIF so that it can make use of it. So let's get to it!

:smarty: Smarty Says: Bethesda uses the Textures\CubeMaps folder for all their cube maps, you can do the same if you'd like or place them alongside the other textures for your model.

CM_03.png

For our Cube Map to work we need to adjust the BSLightingShaderProperty so the game knows to use the Cube Map. Open up the NIF you want to edit, for this you can use anything you like as it's just an example. Expand the Block List tree until you see the BSLightingShaderProperty and then click on the node to select it.

CubeNIF01.jpg

Now open up the Block Details pane if you don't already have it open, F3 does this. With the BSLightingShaderProperty selected you will see all the settings in this pane.

The first setting for us to change is the Shader Type setting, which is the very first one in the list. Over on the right you'll see something like Default, click the box and use the arrow to show the list, select Environment Map from it.

CubeNIF02.jpg

Next up is Shader Flags 1, we need to use the combo list again and add another option, so click the little arrow over on thee right to display the list. You'll notice it has several options with checkboxes next to them. In the list find SLSF1_Environment_Mapping and check it.

CubeNIF03.jpg

The last setting is Environment Map Scale, we'll set this value to 0.7500.

CubeNIF04.jpg

The last step for us to do is link up our texture, so under the BSLightingShaderProperty click the BSShaderTextureSet, you'll see the details pane changes, click the little arrow to expand the texture list. You'll notice there are several slots for each texture:

  • 01: Diffuse Map
  • 02: Normal Map
  • 03: Glow Map
  • 04: Not Used
  • 05: Cube Map
  • 06: Environment Map

TexSlots01_zpsa291282d.jpg

Click on the flower icon for Slot05 and add your Cube Map texture in there.

TexSlots02_zps326eb679.jpg

And that's it, save your NIF and you're good to go :clap:

Link to comment
Share on other sites

Thank you very much IS for all those tutorials like this... after a couple of months break, there's no need to reiventing the forgotten weel again, but just a quick look at things here is enough to bring back some of the lost memory ;]

Though I have some questions for this cube-tut here. I see no screenshot or paragraph about file names and file paths. From what I saw in original setup, cubemaps are stored inside of textures\cubemaps folder (and usually have _e suffix in filename), and the path to the file with cube-map for certain NiTriShape is stored at 5th place on its BSShaderTextureSet list. I can only presume that cubemaps don't need _e suffix in filenames and don't need to be placed inside of that cubemaps folder - is that correct? But the path to cube map in BSShaderTextureSet is mandatory I think... had no time to test this -?-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...