Monday, August 25, 2008

Pretty Model Hacked

Over the past several days, I took a break from area design to try my hand at 3D modeling, something that I've never done before. The closest that I have come to creating 3D models was to retexture several NWN2 placeables. Emboldened with my success in this endeavor, I figured that the logical next step is to try to create a new character head. Stands to reason, right? Right.

My objective was to create a pretty half-elven head for one of my NPCs. Anyone who has tried making a female half elf character in NWN2 will understand why I need a new head model. The ones that come with the game are all pretty... pretty ugly. There are a number of heads that are available at the Vault, but none of them are appropriate for my NPC.

With no prior experience and no patience to read tutorials, I jumped right in and fiddled with my 3D software. I decided that the best way for me to learn how to create character heads is to examine and tweak the ones that come with the game. This strategy opened up a whole new vista of awe and wonder -- awe over the labyrinthine interface of the 3D software and wonder over why my tweaked models won't show in the toolset. Among the many questions that arose over the next several days are the following:

  • When I try to convert a file from MDB to OBJ, why does the resulting model look like a broken accordion?

  • Where's the command to apply textures to a 3D model?

  • Why are the textures on my model upside-down?

  • What's the right way to attach a skeleton to a skin mesh, and why does the skeleton disappear when I export the model as an MDB file?

  • When I put my model in the override folder, why does my game crash?

After a few days of frustration, it dawned on me that maybe I should have tried making a non-animated placeable instead. Duh.

I thought of backtracking a bit to practice 3D modeling by creating and texturing a box. Setting up the box mesh was easy enough, but I couldn't bring myself to texture it. I don't need a box in my game. I need a pretty face for my half-elven NPC. The toolset already has boxes and crates aplenty, but old Diogenes would sooner find an honest man in classical Greece than a pretty half elf in NWN2.

While frowning at the box mesh that I had created, a flash of inspiration came upon me. Using my 3D software, I had learned how to realign the vertices of a skin mesh to change the appearance of any head model, but I had not learned how to properly attach bones to the skin mesh. If I can change a model's appearance and save it as an MDB file, I can hack into the original model and adjust its vertices to match the model that I had tweaked. Since the bones of the original model are already attached to it, I won't have to attach the bones myself.

Fortunately, the format of MDB files is documented at the NWN2Wiki. Using this information as a reference, I was able to create a set of C++ functions to hack into MDB files. Having found a way to create new head models, all I had to do was to find a female half-elven head and change its appearance.

Because I wanted a pretty face to tweak, I downloaded the Oblivion to NWN2 hakpak by Gleeman. This hakpak contains a number of heads and hairstyles that were created by other modders for Bethesda's Oblivion and converted by Gleeman for use in NWN2. Using ZBrush, I changed the appearance of one of the models from the hakpak to suit my needs. Below are a couple of image captures of the software. The one on the left shows how Gleeman's model originally appeared. The picture on the right shows what the model looked like after I applied cosmetic surgery.

To see how the new model looks in the game, I took screenshots of her in two very different areas in my module. These screenshots appear below.

Having developed an unusual but effective workflow for creating new character models, I'll be making more of them in the days to come.

Friday, August 15, 2008

Coming 'Round the Mountain

The Coldlands is a mountainous region that is rich in heliotrope, a gem that is better known as bloodstone. Despite the abundance of gems in these mountains, only the toughest and most desperate prospectors dare to stake a claim here because of the savage humanoids that infest the region. Gareth Dragonsbane, the king of Damara, offers a bounty on the heads of these creatures, but in attempting to collect these heads, many adventurers have lost theirs in the process.

The initial part of Faithless is set in the Coldlands, where the player characters will eventually stumble upon an adventure far more dangerous than collecting monster heads. The very first area that they will find themselves in is a mining camp. Although I had created the initial area last April, I decided to change it because it does not measure up to the prefabs that I've been adapting for my module.

I searched the Vault for an area prefab that would make a suitable location for the mining camp. I wanted the area to have tall mountains with sufficient space for a mining camp and a pathway to the mine itself. The camp must be large enough to have the usual tents as well as a crafting station for players who want to craft weapons or armor.

Needless to say, the camp must also have space for other amenities.

I downloaded several mountain prefabs from the Vault, but I was dissatisfied with nearly all of them. The way the textures were applied was often bad, and the choice and location of placeables and trees left much to be desired. I've come to realize that making a convincing mountain area strains the capabilities of most modders.

Fortunately, I found one prefab that was perfect for my needs. Not only were the mountains realistic, but the prefab also had level space for a cabin and an animal pen. I took away the cabin and most of the surrounding placeables, but I retained the animal pen. I also added some non-hostile NPCs to the area, as may be seen from the picture to the right.

The only real problem that I had with the prefab was that it didn't look like it could be set in the Coldlands. The place had a very arid feel to it, so much so that I could almost feel my skin drying when I took a virtual stroll through the area. The prefab that I am referring to is the Surague Escarpment by Anduraga, who also answers to the name Josh. Readers may recall from my last post that Josh had done a wonderful job revamping the Basilica of Lost Hope, an area that was originally featured in Mask of the Betrayer. I am fortunate in being able to call upon Josh's talents a second time, albeit indirectly.

Adapting the Surague Escarpment for my module called for an extreme makeover. Firstly, I replaced all the trees and shrubs with flora that were more suitable for a cold mountain region. This task is actually easier than it sounds. All I had to do was to select all the trees of each type and change their Appearance Type in the Properties window to a more appropriate tree. I also used the texture replacement feature of the toolset to replace some of the textures with mud or grass. With the new textures in place, I found the mountain pathways too dark, so I painted over the pathways with a lighter shade of gray.

With the easy part over, I had to manually apply other mud and grass textures to make the area look more convincing. I also tweaked the grass a bit. The thing about grass is that it doesn't look good when viewed from afar. Since there were a number of non-walkable spots with grass on them, I weeded out the grass from those spots. On the other hand, grass looks good over the roots of trees, so I added more grass in places that didn't have enough of it.

I wanted the area to look like it is set in early spring, so I adjusted the light and bloom settings accordingly. For the daytime, these settings are as follows.

  • BloomBlurRadius = 3
  • BloomHighlightIntensity = 0.3
  • BloomHighlightThreshold = 2
  • BloomSceneIntensity = 0.85
  • Fog: FogColor = 173, 183, 201
  • ShadowIntensity = 0.45
  • SkyLight: DiffuseColor = 153, 125, 68
  • SkyLight: Intensity = 1
  • SkyLight: SpecularColor = 163, 125, 105
  • SkyZenith = 107, 126, 196
  • SunMoon: DiffuseColor = 232, 220, 169
  • SunMoon: Intensity = 1.35
  • SunMoon: SpecularColor = 234, 230, 210

There is still the question of where to locate the mine entrance. The Surague Escarpment is a very large area with quite a few caves in it. I can choose any one of them to be the mine site, or I can choose to have all of them as potential sites for exploration. If I choose only one, I should probably reduce the size of the area. I want to defer this decision for when I'm designing my encounters, however. For now, I can move on to designing other areas of my module.

Wednesday, August 13, 2008

New Basilica Thrashes Old One

In my last post, I presented the Basilica of Lost Hope, an area that I recycled from one of the modules of Mask of the Betrayer. Well, I'm junking this area in favor of a brand new one, courtesy of Josh (a.k.a. Anduraga). Josh has done a couple of beautiful area prefabs (namely, Surague Escarpment and Tropical Shore) and is currently designing areas for "Misery Stone," a highly anticipated NWN2 horror module. Seeing that I had ripped the basilica right out of MotB, Josh decided to make a better one. The resulting area kicks serious ash and is even more terrifying than the one I made.

In terms of floor area, the original basilica and the one that Josh made are the same size. The latter looks far more spacious, however, because of its higher ceiling. The stained glass windows are more realistic and are an integral part of the walls. Josh created this area using the RWS Pocket Cathedrals hakpak by Robinson Workshop. He also set up the lighting of the area and added the visual effects of light streaming through the windows.

The one modification that I made to this area was to add beams of light streaming from the ceiling to illuminate the skull piles. The original area had these beams of light, but they were absent in Josh's version. I can understand why he didn't add them. The cathedral tileset doesn't have ceilings with holes to let the skylight through, which makes it awkward to explain the presence of these beams of light. Also, a new VFX would have to be made for the light beams because the one used in the original area isn't tall enough to stream from the ceiling. I figured that the lighting in the basilica is so dark and the ceilings so tall that it's entirely possible that the ceiling has holes that are too far away to be seen. As for creating a new VFX, that is a task that I gladly undertook.

What can I say? The new basilica is scary and beautiful. Don't get married in this place, boys and girls. It isn't called the Basilica of Lost Hope for nothing.

Thank you so much for this area, Josh. The willingness to share talent is what makes the NWN2 community great.

Recycled Basilica

Since my very first post at this blog, I had not created any area set in the Fugue Plane. Considering that the whole point of my module is for players to try to destroy the Wall of the Faithless, readers may very well wonder if I haven't lost focus somehow. Wonder no more. I present one of the sites of the City of Judgment -- the Basilica of Lost Hope.

All right, this area is something of a cop out. Like the first area that I created for Faithless, the Basilica of Lost Hope is lifted from Mask of the Betrayer. The designers at Obsidian Entertainment did a decent job of creating this area. The layout of the building is similar to that of real basilicas, although the ceiling of the former is rather low. What I like about OEI's design is that the sounds are appropriately creepy, and the misty haze that permeates the area gives it a ghostly ambience. What I didn't like about it, however, is that the lighting is as bland as Kelemvor, the incumbent god of death. To make matters worse, the combat encounters did not take advantage of the creepiness of this place. What could have been a scary boss encounter was instead a straight-up fight with a group of easily-dispatched creatures. What a waste of potential.

Fortunately, I have a knack for establishing the mood of an area with lights and shadow. The screenshots that are displayed here are the result of several hours of experimenting with lighting and bloom. With the basilica's new look, the only kind of combat encounter that is suited for this place is one that guarantees heart-pounding suspense. I just hope that I can deliver on that promise.

The lack of stained glass windows is a glaring omission in the original Basilica of Lost Hope. What building would dare call itself a basilica without them? Fortunately, there are several stained glass window hakpaks available at the Vault. The one I chose is Ar_Pharazon's Stain Glass. Readers may see a couple of windows from this hakpak in the background of the screenshot to the left. I actually prefer the Stain Glass package over Ar_Pharazon's other submission, which features images of the major deities of Faerun. The former looks more authentic than the latter.

Monday, August 11, 2008

A-Camping We Will Go

One of the most gorgeous area prefabs at the Vault is Registerdebakel's Forest Prefab XXL (Part A). To date, this prefab has been downloaded 560 times, and it has garnered an average score of 9.2. It is one of the few area prefabs to have been awarded the Neverwinter Vault's Hall of Fame, a distinction that it shares with only three other prefabs. Several module builders have signaled their intent to use this prefab in their modules. One of this year's most highly anticipated modules, "Into the Forgotten Realms: Trinity" by Gaming Parents Studios, is being built with this prefab.

I took a virtual stroll through this forest a week ago, and I was immediately taken by its charms -- the leaf-strewn ground, the verdant foliage, the laughing brook with its pretty waterfall... "I must have this lovely forest in my module," I thought to myself as I blinked back tears of joy. I then opened the prefab in the toolset and proceeded to uproot most of the trees to make way for a military camp that I was designing. Oh, what fun!

Much of the action in Faithless revolves around battles between entire armies, for which I need to create military camps. The camp that I made is patterned after those of the Roman army. This area is large enough to house two centuries. (A century is a Roman military unit comprised of 60 to 100 soldiers led by a centurion.) The organized way that the camp is structured indicates that this particular army is highly disciplined.

I kept the contours of Registerdebakel's prefab mostly intact, although I did modify the terrain elevation to allow tents to be put up. The camp is surrounded by a palisade, which I imagine was made from the trees that were uprooted. By modeling the camp around the contours of the prefab, I managed to create a fairly realistic area. It certainly looks more convincing than the mining camp I made four months ago.

No military camp is complete without watchtowers. Although there are watchtower placeables available in the toolset, I prefer to use the ones that come with Barry the Hatchet's BTH Rural Defence Pack. Unlike those of the toolset, Barry the Hatchet's watchtowers may be climbed.

In case anybody is wondering why all my screenshots of this area are set at night, let's just say that players probably wouldn't want to infiltrate an enemy camp in the daytime. On the other hand, astute readers may wonder why there are no torches anywhere near the campsite. Let's just say that the soldiers housed in this camp can see quite well in the dark. Heh-heh.

Update, 12 August 2008
When first I put up the screenshots of the military camp here in my blog, I had the nagging feeling that I overdid the bloom settings. If the player characters were supposed to be nearsighted, I guess the bloom settings would have been okay, but since that is not the case, I had to change the settings. Since the brightness of the area was affected when I adjusted the bloom, I had to change the light settings as well.

For those who may be interested, the following are the new nighttime settings that I used in this area. Properties from the Day/Night Cycle Stages not listed here are the same as the original values that Registerdebakel had set.

  • BloomBlurRadius = 7
  • BloomHighlightIntensity = 0.7
  • BloomHighlightThreshold = 5
  • BloomSceneIntensity = 0.7
  • Fog: FogColor = 21, 21, 31
  • ShadowIntensity = 0.5
  • SkyLight: DiffuseColor = 19, 19, 51
  • SkyLight: Intensity = 0.15
  • SkyLight: SpecularColor = 48, 75, 139
  • SkyZenith = 20, 13, 23
  • SunMoon: DiffuseColor = 55, 61, 76
  • SunMoon: Intensity = 2.5
    SunMoon: SpecularColor = 90, 139, 163

The images shown above were taken with the new settings in place. Below are the images as they originally appeared in this blog.

Saturday, August 2, 2008


"A man's gotta know his limitations."
- Clint Eastwood, Magnum Force, 1973

When Dirty Harry speaks, one would do well to listen. Having worked with the Electron Toolset for some time, I've finally accepted the fact that while I can churn out decent outdoor areas, none of them is going to win any awards. On the other hand, my module isn't doomed to have second-rate exteriors. Thanks to the easy availability of area prefabs at the Vault, modders with little talent in area design can still have stunning exteriors in their modules.

I wanted to create another desert area for my module, so I did a search for desert prefabs at the Vault. I soon found one that was perfect for my needs -- Just Add Encounters - Wastelands by SGK73. I still had to modify the prefab considerably, but the work that I put into this area was small compared to what I would have done if I had started from scratch.

The first thing I did was to extend the area by a few squares. This task was easy to do, thanks to Tanita's TerraCoppa plug-in. I also imported the lighting from the other desert area that I had previously made.

Next, I had to change the terrain to provide elevated ground for a castle, as well as a walkway leading up to it. Changing the terrain elevation was easy. What was difficult was repositioning the height of the placeables that came with the prefab. Changing the elevation usually displaces the nearby placeables, causing them to appear as if they are levitating a few meters above the ground. It's a hassle to try to find the placeables that were affected and to bring them back to Mother Earth. If one is not careful, a few placeables are liable to be overlooked.

Then I had to create the castle. It wasn't enough for me to use one of the castles from the toolset. I had to change the castle's texture to something more appropriate. I can't reveal my reasons for wanting to change the texture of the castle. Suffice it to say that I needed to do this to maintain consistency with the D&D setting.

Finally, I positioned the castle in place and added Nihlar's Cloud of Bats VFX over it. I also added a few more placeables and some grass around the castle. When I was done, I had created my best outdoor area thus far.

Not bad for two days' work.