MDB Utilities 2.3
=================
This plugin currently consists of a simple importer and exporter
for MDB file from Neverwinter Nights 2.
Requirements
------------
3ds Max 4.2, 5, 6, 7, 8, 9, 2008, 2009 (32-bit) are supported.
Max 9, 2008, 2009 (64-bit) are compiled but not tested.
gmax 1.2 is supported.
Installation
------------
If installing with installer:
The installer will use the registry install locations. Testing is with
English Windows and English 3ds Max other locales may not work properly.
If Source is checked it will install the source to
Neverwinter Nights 2\Source\nwn2utils
If installing from the RAR files:
Copy appropriate version of NWN2Utils.dlu to your 3dsmax\plugins directory.
Copy NWN2Utils.ini to your 3dsmax\plugcfg directory.
For 3ds Max 9 or 2008, copy NWN2Utils.ini to your :
\Documents and Settings\{user name}\Local Settings\Application Data\
Autodesk\3dsmax\9 - bit\enu\plugcfg
, where is your system drive, is your login, and is
32 or 64 depending on your operating system.
For gmax 1.2, copy nw2gmax.exe to your "\gmax12" directory.
If you are running gmax 1.2 on Vista or Windows 7 and get the following error on import:
CoCreateInstance() failed
Please check your registry entries
CLSID
Open a Command Prompt as Administrator and run the following in the gmax directory.
"regsvr32.exe MAXComponents.dll"
Its very useful to "Configure User Paths" for "External Files" and add the
locations where you unzipped "nwn2_Materials.zip". You probably also want
to add the NWN2 Override and your My Documents/NWN2/Override directories
as well before the other location.
Documentation
-------------
MDB File Format: Link
Usage
-----
Importer:
Import files using "File->Import->NWN2 MDB Importer(*.MDB)"
Exporter:
Export files using "File->Export->NWN2 MDB Exporter(*.MDB)"
Rigid Body (RIGD):
Any mesh is by default exported as a RIGD object which includes the
mesh as well as the materials and texture maps.
You are limited to 65535 vertices but really should only have
like 1000 to 10000 max for good performance. Lower is better.
Note: Due to the way textures and normals are exported, meshes
may end up with more vertices than are shown in the file summary list.
Materials/Textures:
Setup Max to use the NWN2 Textures by extracting the contents of
NWN2_Materials.zip and then configuring paths under the Customize
menu to point to the folder and subfolders wher the zip was extracted.
The correct file list is probably "External Files" but depends
on the version of max.
Values used in Materials:
Diffuse Color
Specular Color
Specular Level (aka Shininess Strength) = Specular Value
Glossiness (aka Shininess) = Specular Power / 100.0
UIFlags meaning are now known as a bit vector and are exposed
as a User Defined property on meshs. Either enter as strings
separated by | or as a sum of the values for the flags.
(Default value is None but can be configured in INI file).
UIFlag values:
None = 0 (aka trans = 0)
Alpha_Test = 1 (aka trans = 1)
Alpha_Blend = 2 (aka alphablend = 1) #### SHOULD NOT BE USED
Additive_Blend = 4 (aka addblend = 1) #### SHOULD NOT BE USED
Environment_Mapped = 8 (aka envmap = 1)
Cutscene_Mesh = 16 (aka head = 1)
Glow = 32 (aka glow = 1)
No_Cast_Shadows = 64 (aka nocast = 1)
Projected_Textures = 128 (aka projtex = 1)
(See the NWN2 MDB Utility for editing these flags with a rollup editor in max.)
* Note: UIflag is being deprecated in favor of the Expotron flags going forward.
Slots used on Materials:
Ambient or Diffuse - Standard diffuse map
Bump - Normal map (or Diffuse map appended with with _n )
Filter Color - Tint map (or Diffuse map appended with with _t )
Self-Illumination - Glow map (or Diffuse map appended with _g or _i )
* Note: Specular map was the Tint map prior to 2.0 it will still work if Filter Color map
is not used.
DDS files:
This exporter does not create or convert textures from TGA or JPG or PNG
to the DDS format. Use a Photoshop plugin or specialized converter for that.
Here is a link to a standalone tool that somebody posted on the forum:
Link
I've used it in a limit capacity and really like it as it really does make
easier to generate dds files if you have them already in another format.
Skinned Mesh (SKIN):
Skinned objects like those used for creatures are SKIN objects. These are
usually bound to a skeleton and this structure holds the weights
as well as the vertices for a mesh. The mapping between the skeleton and
the vertex bone index is unknown so it is currently being guessed.
The Skeleton name is currently saved in User Defined sheet on the mesh.
This name is required for exporting new meshes.
Collision2 (COL2):
These seem to be less detailed collision meshes. And do not tightly
conform to the model. We dont really know the difference between COL2
and COL3 at this time.
Append _C2 to name to export meshes as COL2 collision meshes.
Collision3 (COL3):
These seem to be more detailed collision and conform more closely to
the model. We dont really know the difference between COL2 and COL3
at this time.
Append _C3 to name to export meshes as COL3 collision meshes.
Collision Spheres (COLS):
These are the collision radii around specific bones in the skeleton.
Prefix name with "COLS??" to add this sphere to the collision sphere.
Walkmeshes (WALK):
Walk meshes seem to control where you can walk and where you cannot.
Some vertices have unusual values like -1,000,000 to indicate
a link to other walk meshes or perhaps non-navigable terrain.
In Max, you probably want to use Quad/Tri Patches to create these.
Material IDS (Source: Jason Keeney of Obisidan)
MTL DEC HEX Name
---- ---- ----- --------
1 0 0x0000 no walk
2 9 0x0009 dirt
3 17 0x0011 grass
4 33 0x0021 stone
5 65 0x0041 wood
6 129 0x0081 carpet
7 257 0x0101 metal
8 513 0x0201 swamp
9 1025 0x0401 mud
10 2049 0x0801 leaves
11 4097 0x1001 water
12 8193 0x2001 puddles
I have remapped the material ids since max does not support values greater
than 1000. For backward compatibility, if the name starts with "0x" then
the old mechanism is used else I just use the values above.
Append _W to name to export a meshes as a WALK mesh.
Hook Points (HOOK):
Hook points are used to attach doors and accessories to a RIGD mesh.
Prefix name with "hp_" to export a hook point.
Hair Points (HAIR):
Hair points contain certain flags regarding behavior of the hair.
Prefix name with "*?_Hair" where ? is F for female hair and M for male.
You can set the HairFlag property on Node User Defined sheet. Set the value
HairFlag=# where # is a number from 0 to 2.
Hair Shortening flags are: Low(0), Short(1), Ponytail(2), None(3).
Helm Points (HELM):
Helm points contain certain flags regarding behavior of the helmets and hair.
Prefix name with "*_Helm" to make a point a Helm Point.
You can set the HairFlag property on Node User Defined sheet. Set the value
HelmFlag=# where # is a number from 0 to 3.
Helm Hiding flags are: None_Hidden(0), Hair_Hidden(1), Partial_Hair(2),
Head_Hidden(3) and Head_Hidden_with_Beard(4).
Terrain (TRRN):
Terrain are used in conjunction with TRN files that are created by the
Toolset editor. It holds the layout of the module areas.
Bones (GR2 Skeleton):
When SKIN meshes reference a GR2 skeleton the importer will automatically
load the gr2 skeleton. The mapping is currently guesswork but works for
most models.
GR2BoneIndex is set in the User Defined Properties to represent the bone
index in the GR2 this would not normally change and is just for information.
MDBBoneIndex is set in the User Defined Properties to represent the bone
index used in the MDB file. This is currently guesswork and is incomplete.
The Exporter uses this value as the BoneIndex when exporting weights for
SKIN meshes.
ap_* bones are attachment points for things like weapons, shields, visual
effects, etc. (LeAdderNoir)
f_* bones are related to facial features for head-type meshes.
Known Issues
------------
None
Change log
----------
2.3.0
-----
o All
- Add Max 2010 support.
- Improved Max x64 support
o Exporter
- Programmatically disable vertex welding for skinned meshes (to avoid indexing bug)
- Fix issues with skelfile vs skeleton when exporting skinned meshes
2.2.0
-----
o Importer
- Expand search for gr2 files in lod-merged zip files
2.1.1
-----
o All
- Recompile for Max 2009
2.0.1
-----
o Importer
- Fix bug with Max properties which caused crashes in releases less than Max 9
2.0
-----
o Importer
- Incorporate Expotron User Property Settings into import and export
- Introduce Scale factor for importing meshes
- Introduce Vertex Welding option on import
- Optionally add Normal under Bump map
o Exporter
- Incorporate Expotron User Property Settings into import and export
o Utility
- Introduce new "NWN2 MDB Utility" which is similar to Expotron Utility
for setting flags but will function with all versions of the tools.
Attachment | Size |
---|---|
![]() | 1.67 MB |
![]() | 2.29 MB |
![]() | 1.76 MB |
![]() | 353.4 KB |