Joined: 20 Aug 2006 Posts: 1233 Location: The Rue Morgue
Posted: Wed Oct 25, 2006 5:07 pm Post subject: Montgomery - Custom Terrain Types - EP/Lead Design
PART I -
I've been playing around with terrain textures, learning about how to properly format them with all of the assorted miscellany that's required.
I didn't know a .dds from a dvd until a week ago, so take all of this information as an exploratory process. Also, feel free to add your own comments.
{Thanks to Cunbelin for some useful info}
STANDARD TERRAIN FORMAT
For starters, standard NWN2 terrain textures are comprised of three .dds maps:
TT_GD_Dirt_01.dds - This is the main texture, the visually pleasing graphic you see in game. I believe this is also termed the diffuse map.
Diffuse Map
Size: 512x512
Format: Direct Draw Surface, .dds
Compression: DXT5
Mips: 1-4
Size(kb): 342
Alpha: Yes, for specularity
TT_GD_Dirt_01_n.dds - This is the normal map. This map gives the terrain depth without having to model the terrain. (Cunbelin has suggested that normals might not be loaded for terrain in the toolset)
Normal Map
Size: 512x512
Format: Direct Draw Surface, .dds
Compression: DXT5
Mips: 1-10
Size(kb): 342
Alpha: Yes, height
TT_GD_Dirt_01_c.dds - This doesn't appear to have an affect on tinting/terrain color in the toolset. Cunbelin has suggested it is for specular highlights, and I'll take his word for it.
Size: 512x512
Format: Direct Draw Surface, .dds
Compression: DXT1
Mips: 1-10
Size(kb): 171
Alpha: 1 bit alpha channel (0,0,0/255,255,255)
Here you can see a fully operational new terrain in progress:
{The new terrain is on the left, a standard one (Dirt) is on the right. For purposes of this exercise and tutorial I am using a .tga from a package of textures tgas uploaded to the vault}
To create a new terrain, you need the following tools:
- Adobe Photoshop (or some equivalent such as Gimp or Paintshop)
- The Compressenator
What you'll want to do is take your basic texture, probably a 512x512 .tga. Use the NVIDIA Normal Map plug-in to convert it to a normal map (I've used 4 sample/3x3/5x5 scales of 5-10, still playing around with the options on the filter).
Now you have a main texture and a normal map of the main texture.
Adjust these as you see fit.
Duplicate the normal map's blue channel to the diffuse map, and the diffuse map's blue channel to the normal map, renaming each new channel "Alpha 1".
Check "invert" and use filters to adjust the results in the Alpha channels.
Now copy the main texture and create a third .tga. This is going to be your _C map.
Some _c maps are exactly the same as their parent textures. Some _c maps have different h/s/l or b/c or both. Some _c maps seem to have possibly a diffuse filter on them. The overall process and purpose is a mystery to me so far.
{more _C map generation process}
Save each of these according to the standard naming conventions of terrain textures, adjusted for your personal identification, etc.
Open the main and _N maps with compressenator and generate their mip maps, and compress as DXT5. Save the compression (.dds).
Open the _C map with compressenator and generate it's mip maps, compress as DXT1. Save the compression (.dds).
Put your three .dds files into override (hak later)
Add a line in your terrainmaterials.2da refrencing the main texture (You should be aware that simply adding things to the end of the 2da is not an ideal way to create custom content, you will want to pad at some point).
Create a 64x64 bmp of the main texture and drop it into the /toolset/terrain folder for the icon in the "texture selection menu"
There is a DDS compression wizard with the NVIDIA plug in for photoshop, but I haven't played around with it yet (switching to compressenator for those steps).
Some of these steps may not be the best practices for doing this, they simply represent the way I went about it over the course of the past couple of days.
PART II -
I've organized a good batch process for giving base images a proper alpha channel, converting images to normals, etc. The process produces results that compare favorably in an eyeball test with the standard terrains. In-client testing will be necessary obv.
The only stumbling block so far is the _c map. The purpose of the _c maps seems shall remain mysterious - to me at any rate - at least until the client is released.
Some terrain textures use the same image as the _C map, others have images with differing h/s/l, others have still more dissimilar _c maps, using different images overlayed onto the diffuse texture, etc.. I've yet to discern a rhyme or reason that would allow them to be converted en masse. There is probably a few varieties of filter sets that would produce some varieties of _c maps and a few types that simply need to be generated manually.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Planescape, Dungeons & Dragons, their logos, Wizards of the Coast, and the Wizards of the Coast logo are (C)2006, Wizards of the Coast, a subsidiary of Hasbro Inc ("WOTC"). Copyright material is presented on this website and in the forums for informational and community gaming purposes. We assert no rights in relation to Hasbro, WOTC, Atari, Obsidian Entertainment, or Bioware copyrighted material presented on this website and the associated forums. This modification is not made, distributed or supported by Atari, Bioware or Obsidian Entertainment Inc.