This is a new version (3.5) of CleanModels3 that has not been available anywhere before. It has more features and runs faster than versions 3.2 or 3.3 that you might have used previously. Please read the updated user guide thoroughly, because this version is different.
What this package does
CleanModels 3 is a stand-alone program for detecting and repairing commonplace faults (and some not-so-commonplace faults) automatically in batches of NWN models. It was originally developed specifically for tilesets but has since been broadened in scope to fixing all kinds of models.
It imports the models from a folder you specify, scans them for over a hundred known types of fault, applies fixing algorithms where it can and exports clean models into an output folder. At the same time, it writes log files in the output folder listing all the faults it has identified, the fixes it has done and things that remain unfixed. It can import both uncompiled (ascii) models and compiled (binary) models even if they are mixed up in the same folder but it always exports the models in ascii format notwithstanding.
The program is meant to be used in addition to all the other ways of checking and fixing models. It does not replace the sanity checks in NWMax nor the time-honoured procedure of running the models through a compiler to see if they break. Rather, it does things that they do not do. Everything it does could, of course, be done manually by any experienced modeller such as yourself; it just does it a lot faster and more reliably, thereby saving you time and trouble. It is especially good for fixing other people's models. Sometimes, though, it might even surprise you by fixing bugs in your own models that you didn't even know were bugs.
When it imports a binary model, it does so directly without decompiling it first. It can usually tell which compiler (Bioware or nwmmdlcomp) created the file and may be able to unravel errors already introduced into the model by bugs in that particular compiler. (Okay, there aren't many and they are fairly obscure but it's one less thing for you to have to think about). Thus, if you are working from compiled source models, it is better to let CM3 read them directly than to try to help by decompiling them with nwnmdlcomp (or NWMax or NWNExplorer which use nwnmdlcomp) and then let it try to fix them; too much subtle information may already have been lost.
When exporting models, it will try to ensure that the resulting files are compatible with the NWN Engine, the Bioware Model Compiler, the nwnmdlcomp compiler and NWMax. However, it knows the limitations of each of those and, if the model has any features that are not supported by one or more of them, it will warn you about it.
If you are fixing tilesets and you include any *_edge.2da files in the import folder, the program will read the 2da's to determine which tiles are listed there, so that it can strip out of those particular models any features that don't function in edge tiles (such as walkmeshes). Otherwise, when it exports a tile model, it also exports a .wok file for it. The walkmesh aabb data is rebuilt using a similar algorithm to the one in Joco's NWmax, that is in turn based on the Bioware one.
Installation
Unpack the download bundle to a convenient folder. The eight .dll files need to stay in the same folder as the .exe. Make a shortcut to the .exe and you're done. The executable is compiled as a 32-bit program but it will run on 64-bit Windows machines without needing any special compatibility settings.
The program is written in SWI-Prolog (available free from www.swi-prolog.org) but is packaged as a stand-alone executable. The eight dll files are a part of the SWI-Prolog package that can be redistributed freely with applications such as this. They are from version 6.2.6 of SWI-Prolog, which was the current version as of July 2013.
Note that, if you are updating from an earlier version of this program, you must use the dll files from the new package - the executable will not work with the older dll's.
A pdf user guide is included in the bundle. Please read it thoroughly. Twice.
This is unsupported software
This is the last version ever of CM3 and it will not be supported. If you find it useful, great. If it trashes your models, empties your bank account and runs off with your wife, there's no need to tell me - I won't be here.
Update: 2014-03-24
I'm making CM3 Version 3.5.2 available. It has better performance when welding verts and tverts in large meshes and there are some tweaks related to skin meshes, bones and robes. But it hasn't been very extensively tested so you might wish to install it in a separate folder from CM351 in case it breaks and you want to revert. The eight dll files have the same names as the ones in CM351 but they are different versions, so don't mix them up. There is a change list bundled in the CM352 download and the user guide pdf is included again for completeness but it's identical to the one in the CM351 download so you don't need to read it all again.
Changelist: cleanmodels351a to cleanmodels352
Attachment | Size |
---|---|
![]() | 1.9 MB |
![]() | 2 MB |
![]() | 84.07 KB |
*making grabby hands*
Want want want :-)
You have it. A week early.
At no extra charge. :)
OMB
Excellent!
I went ahead and updated the link on the community site. This is extra nice: updated program, all the needed files, and the documentation all in a single download!
Thanks, OldMansBeard!
And it works exactly as advertised ;-)
Voted, thankyouverymuch!
Also sent the pdf to my kindle for reference :-)
Thank you for stll enhancing this truly magnificent tool!
Thank you. I appreciate that you distributed this with the DLLs.
Does this fix screwed shadows in creature models and pieces of armor?
@Jedijax
Yes and no. It depends on what is causing the problem.
You can't shift the pivots around in creature models or armour parts because it would break all the animations, so you have to turn off repivoting for them. If you have a part that doesn't surround the pivot, it can't help you. (I've never seen one like that, though).
If the shadow problems are caused by a broken mesh, though, it may help because it fixes things like unwelded edges, unwelded vertices, null faces, degenerate faces and so on, which can certainly cause weird shadow artefacts.
If in doubt, run your models through it anyway. It may help.
OMB
Thanks for the quick reply, OMB! I will do it!
Download counts look like they're working again :-)
Yes, confirmed. I downloaded a file, refreshed the page in the browser and the count went up by one.
Woot!
(or is that "Loot!" ;-)
Maybe I can learn enough to incorporate this in the jNwN asset manager ;-)
There's a bug in CM352b.
I missed one string, converting the code to SWIPL 7.1 and it won't read walkmeshes properly from ascii files. I have uploaded CM352c which fixes it.
CM352d - bugfix
An obscure problem has been found whereby, if a model had three or more trimesh nodes all with exactly the same name but the middle one had a different bitmap to the other two, using the meshmerge-by-bitmap option would result in the middle node being malformed on output. Version 3.5.2d fixes this.
Just to re-iterate:
[quote]
This is unsupported software
This is the last version ever of CM3 and it will not be supported. If you find it useful, great. If it trashes your models, empties your bank account and runs off with your wife, there's no need to tell me - I won't be here.
[/quote]
I've turned off PMs in the Bioware Forum.
This tool has saved me hundreds of hours of head banging, trying to hunt down wackiness in different models.
Thanks OMB!
Invaluable!
This too is so friggin amazing!
Wonderful tool