Jump to content

Environment Mapping in Fallout 3


Site Bot

Recommended Posts

Article link: Environment Mapping in Fallout 3

 

Environment Mapping in Fallout 3:

with Ghogiel

Aim:

A basic tutorial that demonstrates how to create custom environment/reflection maps, setting them up on your models, masking, how they work in practical use, plus a few examples. I have writen this as it seems I am the only one who figured out how they properly work. As evidenced with all of the released mods I have inspected which attemped to use custom env maps.

 

Apps:

Photoshop

nvidia dds plugin

nifskope

 

***To Create a Custom Environment Map***

Firstly I am no expert, I am just documenting my experiments for others to benefit from. So go google cube mapping and Environment/reflection mapping, and you'll know more than me pretty quickly.

 

First thing you will need to do is make a document with the dimensions of, say 768x128. This is a decent size map, but shouldn't strain a medium system. If the need suits you, going smaller or larger is fine.

 

What is important, is it has to be ratio of 6x1. If you see a mod with a _e.dds and it isn't in this dimension , then it won't work, and the GECK and the game will not render it. (because to actually save a cube map it has to be 6x1)

 

Now get any old image, landscapes scenes are probably the most common image. CGtextures.com has a few good ones. In this example my first env map is actually a forest scene, and is 384x64.

 

Go and save it. you need to save it as a Cube Map. Or else the game ignores rendering the env map, citing a error that the texture doesn't have mipmaps. Save as a dds. To select "Cube Map", it's under the drop down that lists 2d texture. mipmaps ticked. leave everything as defaults.

http://i25.photobucket.com/albums/c85/lego-botz/other/DDSexport.jpg

Now you have created an environment map. They are usually marked by the extention of "_e.dds". It doesn't matter that it has that extension, but for anyone inspecting your files, it'll make it easier to understand what actually is what.(and probably yourself).

 

***Setting Up Environment Maps and Environment Masks***

In nifskope.

Open the mesh you want to add a environment map to.

Open the BSSaderPPLighting node, and select the BSShaderTextureSet

In Block details expand the list of texture.

 

This is a list of what nifskope improperly displays as what particular map corresponds to a particular slot. And Where I corrected it.

http://i25.photobucket.com/albums/c85/lego-botz/other/TextureSets2.jpg

 

input your _e.dds into the second to last slot.

 

You must tick the shader flag for SF_MULTIPLE_TEXTURES or else your env mapping won't be rendered.

 

Save.

 

to get a preview of the mesh, check the model in GECK model viewer. right click the .nif >open with... >GECK.

 

***Examples and Practical use***

 

Here is the texture sheet for my example.

http://i25.photobucket.com/albums/c85/lego-botz/other/TextureSheet.jpg

 

What it looks like rendered in the GECK.

http://i25.photobucket.com/albums/c85/lego-botz/other/EnvMapTests.jpg

 

You can very clearly see all of the maps at work.

Notice how the diffuse map is in a way completely over ridden by the Env map. I can still pick up something from it, but it looks more like a really strong reflection map and not like my diffuse map does. This is because of the completely white env mask (_em.dds)texture.

 

Here are several tests.

http://i25.photobucket.com/albums/c85/lego-botz/other/EnvmapTests2.jpg

 

As you can see by simply changing blank white or blank black _em.dds, I get startling results. And if I change the _e.dds, I can get a really nice chromed effect.

 

Now we have talked about the environment maps. I want to mention environment masks. As you can see from my test picture, the base of the mask is 128RGB. This means that a flat grey 128RGB _em texture on a mesh with a env map, will look exactly the same as if it has no mask at all. So you can overdrive the Env map effect by going over that threshold. You start to get a really chromed look the closer to white you go. Now going the opposite way you remove the reflective effect.

 

The environment mask can be used as a mask(duh). To mask parts of the texture/mesh, thus making it appear to have several different materials on one model. Simply put, black = zero reflections, midgrey = normal reflections, White = super chrome

 

Important- It appears that when a _em.dds map is not present. The engine automatically defaults to using the specular map to mask the env map. in the example above, if you look at my spec map, the visor area is really bright. It's that bright strip at the bottom. And looking at the examples that have no _em map on them, you can see that the visor looks nearly identical to the examples with the white _em map.

 

Also might be worth noting- The cube map Fallout 3 uses, is simply 6 square images in a row. 1 each belonging to a side of the cube. The first 4 are wrapped around the sides of the mesh, and the last 2 images are displayed on the top and bottom.

Making a proper cube map will ensure that sky(faux) reflections do not appear on the bottom of the mesh, and ground reflections do not render on the top.

 

This is where Fallout 3 displays each side of the cube map.

http://www.fallout3nexus.com/imageshare/images/209926-1259279573.jpg

 

I am not going to cover how cube maps are rendered in game or making true cube maps in this tutorial.

Here is the tutorial/experiment I wrote to cover that.

 

How To Create Cubemaps In Fallout 3

 

Google cube mapping, and check the links section if you want to know more.

 

Oblivion had a few env maps hard coded, changing one, in effect changed all items which used it. But Fallout supports Custom environment maps which allows for a great deal of creative usage.

 

Links and Resources:

 

Example cube maps.

http://www.codemonsters.de/home/content.php?show=cubemaps

Ati Cube Mapping Tool

http://developer.amd.com/gpu/cubemapgen/Pages/default.aspx

Link to comment
Share on other sites

  • 1 month later...

its only really useful for scope lenses and glass things.

Aside from scope lenses, windows, bottles, and other glassy things, I'd never suggest using a custom environment map on a non-glass mesh. If you want a helmet or weapon to look nice with an env map, just pick the default data/textures/effects/chrome_e.dds or bronze_e.dds

Link to comment
Share on other sites

  • 5 months later...
Thanks for the article!. I'd been getting frustrated with getting decent ammounts of shine on some clothing items without them looking too much like polystyrene, it was the _em that was stumping me all along. Finally got some nice pvc and satin outfits looking good.
Link to comment
Share on other sites

  • 2 weeks later...

its only really useful for scope lenses and glass things.

Aside from scope lenses, windows, bottles, and other glassy things, I'd never suggest using a custom environment map on a non-glass mesh. If you want a helmet or weapon to look nice with an env map, just pick the default data/textures/effects/chrome_e.dds or bronze_e.dds

its all up the artist and getting the effect they want.

 

I would recommend an env map on non-glass meshes. Simply look at the names on the 2 textures you do recommend. :rolleyes:

 

also works for plastics.

Link to comment
Share on other sites

  • 3 years later...

"You must tick the shader flag for SF_MULTIPLE_TEXTURES or else your env mapping won't be rendered."

 

 

you probably mean SF_Environment_Mapping, otherwise your diffuse texture won't show up in Fallout.

Edited by MrDeathKill
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...