I don't expect anyone to actually know this but i suppose we need to work it out. Does anyone know how to import a walkmesh for editing (assuming that it is a sort-of 3D model). The most i have ever seen of a walkmesh is figures:

By the fact that it says "Verts" i would say that it is a 3D sort of model but how do you edit it, or create one?!?!

btw, i have been told: "we just dont have the tools to edit them" but theres nothing wrong with checking.
Maybe some one who has/is working at a video game company thing.. like Bioware knows...?

Help! lol

SithRevan

02-22-2007, 12:32 PM

I know Darth_InSidious would know more about this but from what I can understand walkmesh you have to edit in a hex editor. I could be wrong though.:D

glovemaster

02-22-2007, 12:37 PM

I think your right but i dont have a clue how to go about getting the figures

11.3294 15.1879 -1.2750
X Y Z ???

Also, im not a superbrain... much.. lol, i can't work out the verts of a shape in my head and write down all the coorinates, assuming there coordinates... Is there anyway to get 3ds max to tell you?

SithRevan

02-22-2007, 12:42 PM

There might be a way to dump all of the vert coords in 3ds max. I have never used the program though. So I would not be able to tell you.

I think the first step though to possibly figuring this put though would be to open up a walkmesh in the hex editor. That way you could see what exactly you have to work with. Good luck.;)

Edit:
Just out of curiosity a couple minutes ago I opened up an extracted walkmesh in my hex editor and it did not work. So I went back into KotorTool and double-clicked the walkmesh to extract it but this time instead of doing a simple extract I extracted it in ASCII mode then opened it up with the hex editor and this is what I saw...

I am not sure if that would be significant but that is what I get when I extract it in ASCII.

knightmare66

02-22-2007, 12:49 PM

I've observed that walkmeshes seem to have two components- one that controls where characters can move, and another that controls where the third-person camera can move (so it can't go through walls, etc). In 202TEL, if you can manage to move your party into normally inaccessible areas (intended for background NPCs), you'll see that the walkmeshes there don't have any limits on where the camera can move.

glovemaster

02-22-2007, 01:09 PM

Yes, i have extracted a few as ASCII and they show up like that, this certainly helps but we want still want to edit then easily so we need some sort of "Walkmesh Import/Export MaxScript" Maybe by looking at the information it gives us in ACSII format, we can work out how to import/export them...?

Darth InSidious

02-22-2007, 02:15 PM

If you're talking about .WOK files, forget it. You can't import them, and the strings of data are tricky at best to work out.

.PWK's and .DWK's are talked about in a couple of threads started not long ago here in Holowan. If you dig around, you can find an excellent post by oldflash on the subject...

glovemaster

02-22-2007, 02:21 PM

I'll do a bit of digging, but i arn't WOK, DWK and PWK files the same? look at these files:

These are 3 different file types that all look the same (talking about the layout and not the values... DUHHH... lol)

EDIT:
and can some one help me find this post!!! lol

glovemaster

02-22-2007, 02:36 PM

I GOT IT!

Let's see. You want a rectangle walkmesh.
Let's take a rectangle walkmesh, like one which is used for beds on telos station. Those beds are placeables and has walkmeshes and most important are rectangles.
So, start KotorTools and locate BIFs=>models.bif=>Praceable Object Walkmesh=>plc_bed1.pwk
Doubleclick on that. By doubleclicking you will start PWK/DWK Editor.
Hit File menu and select Save as ASCII....
A small window will prompt you for a custom file name but there just hit OK button.
Now start GMax (sorry, all tests are made under 3dsmax but shoud be the same for gmax), and under NWmax panel select plc_bed1.pwk (to see that file you need to select "All Files (*.*)" on "Files of type:").
Now look at This picture. I've marked with 1,2,3,4,5 and 6 the intrested areas.
One reclangle plane will be imported. Select that one(1) and in modify panel(2) hit "Build WOK Data" button(3). Some values will show up in "Boxes".
Lick on first row with values ans some infos will appear(5). Bring again PWK/DWK Editor and have a look to values on "Verts" section(6).
As you see on PWK Editor there are 3 columns. Focus on first two columns.
There are 4 values: 2 positive and 2 negative (6)
Also in gmax there are 4 values (5) pretty much like those from PWK Editor.
On "Editable mesh" select vertex and move to another possition.
Hit again on AuroraWalkmesh, hit "BuildWOK Data", select first values row from "Boxes" and read the new values showed on "BL:" and "TR:".
Open plc_bed1.pwk with notepad and go to "verts 4". Under that there ar 4 lines with floating values (originals) which need to be replaced with the new values (in my example I replace -1.46323 with -2.2788).
Save the file opened with notepad.
Open again PWK/PDK Editor window by doubleclicking plc_bed1.pwk (under KT).
Now in file menu select "Open ASCII PWK...", select the one which was edited with notepad and again in same menu select "Sy ave as Binary".
Now there just 2 more important steps:
1 rename pwk file to have same name with your placeable model
2 put renamed pwk in override directory (folder).
That is all.
I case you want to know what is relation between placeable and walkmesh import plc_bed1.mdl and plc_bed1.pwk in same gmax session.

EDIT
This is great and works but the actual reason i set up this thread was so that we can get WOK files imported... The reason i actually want to be able to edit WOK files is because if we can (theoretically) we will be able to create custom areas... But we oviously can't do that if we are editing them by changing values... That would take literally years! Is there a tool that is capable of exporting PWK, DWK or WOK files quickly?

oldflash

02-23-2007, 09:33 AM

This is great and works but the actual reason i set up this thread was so that we can get WOK files imported... The reason i actually want to be able to edit WOK files is because if we can (theoretically) we will be able to create custom areas... But we oviously can't do that if we are editing them by changing values... That would take literally years! Is there a tool that is capable of exporting PWK, DWK or WOK files quickly?
Even if you manage to edit walkmesh you still need to set lightmap for that area. :(

glovemaster

02-23-2007, 09:57 AM

I know were a while off but lightmaps and the other things arn't as much of a problem as walkmeshes. Can some one please explain my post about 3 above^ this one with the file types all looking the same. I don't know why we can't import walkmeshes when they look exactly like DWK and PWK files. Also, is there a exporter capable to exporting DWK and PWK files, and even WOK files?

oldflash

02-23-2007, 10:02 AM

I know were a while off but lightmaps and the other things arn't as much of a problem as walkmeshes. Can some one please explain my post about 3 above^ this one with the file types all looking the same. I don't know why we can't import walkmeshes when they look exactly like DWK and PWK files. Also, is there a exporter capable to exporting DWK and PWK files, and even WOK files?
I will have a look on that files. Could be because PWK and DWK set restriction and not permission to walk.
BTW, lightmap IS a big problem (at least for me).

glovemaster

02-23-2007, 12:48 PM

Okay, thanks for lookin into it.
I've just had a look at lightmaps and it seems that there broke into the VIS file, TGA files and there TXI files. (thats looking at how KotOR Tool breaks them down)

Also, if its not too much trouble, can someone post how to create the PWK and DWK files showing the how the "verts" and "faces" are found, etc. (only if it isn't too much trouble)

btw, i have looked at 3ds max and it can export some information that looks like that of the "verts" via the listener. By selecting the PWK (or DWK) after import, manually applying the property "AuroraWalkmesh" and then clicking "Build WOK Data" and then "List AABB"

Darth InSidious

02-23-2007, 02:52 PM

Lightmaps are a pretty massive problem, actually ;)

Without lightmaps, it's just a big black void you're walking in...

Also, exporting room models from max doesn't work...

Furthermore, the WOK files are a problem largely because they are much more complex, as well as because we cannot import them...

oldflash

02-24-2007, 02:40 AM

I have loaded a walkmesh in 3dmax. For that I rename .wok to .pwk
Few other hints: Have a look at material and yes, you can use listener to copy vertex coord. but beware, tose are only vertex coord and not polys def.
Also have some pic (http://oldflash.125mb.com/wok/)
Horwever, what I test it wasn't work in game.

glovemaster

02-24-2007, 04:16 AM

Changing the name works well however, it is too much hastle to manually imput the data, especially if I haven't got a clue!
I've got a screenshot to the module file m01aa_01a with its model file and its walkmesh (WOK) file.

http://img96.imageshack.us/img96/6748/walkmeshnn0.jpg

(I have rendered the image to make it look clearer, the golden-yellow colour is the walkmesh (WOK renamed to PWK) file)

EDIT:

Also, exporting room models from max doesn't work...

Assuming you mean the .MDL file, i have imported a room model, re-exported it and imported the model i had just exported (lol, try to follow) and there was nothing wrong with it?

EDIT: (again to stop double posting)

I've looked at the way that the listener gives you the information (according to Oldflash, vertex coordinates) of the placeable plc_bed1.pwk
This is what i was given (im just showing how the coordinates are given and are probably given differently for other placeables)

http://img155.imageshack.us/img155/8546/plcbed1mv8.jpg

This might just be a load of rubbish though... But i am trying! lol :D