I've released the first version of the walkmesh utility program. You can find it here:
KAuroraEditor (
http://www.starwarsknights.com/tools.php#skmo)
Please understand this is an alpha and as such, it's bound to have problems [for example, I've already noticed that if you try and replace m27aa_01c (the room in the Manaan Sith Embassy, where you can't really go, which is only used to visualize the commander and the droids coming to get you once the "Sith receptionist" gives the alarm) the script breaks as it looks like the NPCs can't cross the room boundary... even if you can].
The README gives all the necessary info. I'm just going to point out that you will need .NET Framework 2.0 and the redistributable of DirectX SDK Update February 2005 (or later), both of which can be freely downloaded from Microsoft. If you lack both, install the framework first, as otherwise the SDK setup could skip the installation of some necessary libraries.
Another thing: to work on the exported ascii walkmeshes I used Gmax 1.2 with NWMax 0.7. It looks like there's some problem in the algorithm used by NWMax to generate the walkmesh's AABB tree; at the very least, it uses a huge amount of memory. To allow Gmax to work with some of the more complex ones, I had to comment out the AABB tree generation code (the utility doesn't need that info as it generates its own AABB tree, using the Kotor algorithm which is different from the one used in the scripts).
If you have problems while importing/exporting the meshes from Gmax, try the following:
- go into the scripts\NWmax\nw_ie_inc directory under Gmax
- locate the aurora_fn_export.ms file
- open it (it's a text file, so you can use notepad, wordpad etc.)
- locate the following function:
fn WriteAABBTree node verbose:false =
(
-- From Waylands original script
local facemids =#()
local facelist = #()
local aabbData = #()
if ((mod node.mesh.numfaces 2) == 1) then
(
--MessageBox("Odd number of faces in AABB tree. Expect problems.");
)
for i=1 to node.mesh.numfaces do
(
v3 = getface node.mesh i
p1 = getvert node.mesh v3.x
p2 = getvert node.mesh v3.y
p3 = getvert node.mesh v3.z
mid = (p1+p2+p3) / 3
append faceMids mid
append facelist i
)
if verbose then format " aabb " to:g_strBuffer -- no newline here, NWN chokes if the data doesn't start on the same line
BuildAABBTreeNode node faceMids facelist 0 aabbData verbose
return aabbData
)
and change it to look like this:
fn WriteAABBTree node verbose:false =
(
-- From Waylands original script
local facemids =#()
local facelist = #()
local aabbData = #(" ")
if ((mod node.mesh.numfaces 2) == 1) then
(
--MessageBox("Odd number of faces in AABB tree. Expect problems.");
)
/*
for i=1 to node.mesh.numfaces do
(
v3 = getface node.mesh i
p1 = getvert node.mesh v3.x
p2 = getvert node.mesh v3.y
p3 = getvert node.mesh v3.z
mid = (p1+p2+p3) / 3
append faceMids mid
append facelist i
)
*/
if verbose then format " aabb " to:g_strBuffer -- no newline here, NWN chokes if the data doesn't start on the same line
/* BuildAABBTreeNode node faceMids facelist 0 aabbData verbose */
return aabbData
)
This will effectively comment out the creation of the whole AABB tree from the exported model.
I'll use this thread to keep track of any request or problems you might have.