konvix a PCK fix it all

Please post here for questions and discussion about unit modeling and general game modding. You can also post your new units and modifications here.

Moderator: EagleMountainDK

Post Reply
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

konvix a PCK fix it all

Post by Stridor »

Ok this is the first beta release of konvix. This is a command line utility which fixes PCK model lighting + normal problems.
It also allows you to convert to different X formats, by using the compressed format you can save ~80% disk space + load time c/w bin & txt formats which are the PCK defaults.

Code: Select all

 Usage:  konvix <options> <input filename> <output filename>
 
         <input file>    Input .x file
         <output file>   Output .x file (optional)
         /t              Convert to text format (default)
         /b              Convert to binary format
         /c              Convert to compressed format
         /n              Generate normals
         /o              Optimize mesh
         /x              Display mesh-flat bounding box
         /v              Verbose
         /r <#F|%S>      Simplify mesh #new-faces or %original-size
         /d <r,g,b,a>    Diffuse  color
         /s <r,g,b>      Specular color
         /e <r,g,b>      Emissive color
         /p <power>      Specular power
 
example:

konvix.exe /v /c /n /o /d "255,255,255,255" /p 1.0 /s "255,255,255" /e "0,0,0" myfile.x

would set the diffuse & specular lighting to white, specular power to 1.0, emissive to black (as it should be for most things), renormalize + optimize, be verbose and save in a compressed format by overwriting myfile.x

I have also included a batch filed called FixDX.bat which calls konvix.exe

If you place these two files at the root directory (eg PCK main dir) and run FixDX.bat, then the batch file will transverse the dir struture and perform the above operation on all *.X files (would take ~ 5 minutes). This will end up saving you loads of memory to boot.

Note: I suggest that you make a full backup before proceding! Obviously any bugs have the potential to destroy all your *.X files if you are in batch mode. It is for this reason that only people who know what they are doing should use this software at the moment. When it has been tested some more then it will be of benefit to all.

Note (2): The simplify mesh (/r) option doesn't work just now and is disabled (this is the auto LOD generator, to be enabled in the future)

The bounding box functionality should allow the MM to autodraw structure "red" around appropriate objects on the AI map in the future [;)], meaning there will then be no reason whatsoever to go into SE!

Note (3): I have included DX Viewer in the zip so you can quickly check out what your *.X files look like wthout loading them up in MS3D or SE or the game.

Note (4): konvix short for Kharkov cONVert and fIX. Also homage to good 'Stralan convict(s) stock.

Note (5): Whilst I found a huge amount of junk frames in the TCs using konvix (I was hoping this was going to be the root cause of the dead TC bug), it turns out that the bug remains even when the junk is cleaned up, so unfortuneatly no go from that perspective [:@]

Regards

S.
Attachments
konvix.zip
(479.03 KiB) Downloaded 33 times
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: konvix a PCK fix it all

Post by Mraah »

Stridor,

Sounds like a great program ... however, I couldn't get it to run last night.

I'm at work right now so can't send you the error but I'll do it right away when I get home.

We don't need the SDK installed do we? Not a problem if we do.

Also, I didn't try the BAT yet but I ran the commands from the DOS prompt using valid options with the EXE and the X in the same directory.

And, finally, not a bug but the DXviewer doesn't run, it displays an error telling me I need to reinstall the program because it's looking for a particular DLL... again, makes me think I need the whole SDK for all this to work properly.

Rob
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: konvix a PCK fix it all

Post by Stridor »

Rob,

What version of .Net redistributable do you have?

I think that PC uses 1.1 which is now way superceeded. I just compiled for the latest target which is 3.5 (which you can get for free from MS). I could also compile for 2.0, but given that even that is superceeded now I figure just compile for the latest.

Regards

S.
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: konvix a PCK fix it all

Post by Mraah »

ORIGINAL: Stridor

Rob,

What version of .Net redistributable do you have?

I think that PC uses 1.1 which is now way superceeded. I just compiled for the latest target which is 3.5 (which you can get for free from MS). I could also compile for 2.0, but given that even that is superceeded now I figure just compile for the latest.

Regards

S.

I'll get 3.5 now and let you know ... thanks.

And standby for the SS of the error ... I'll post that soon in another post ... (just in case).
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: konvix a PCK fix it all

Post by Mraah »

Although I have net 2.0 .... this was error I got ... just in case it wasn't an old net version ... (i'll d/l 3.5 now and try again)

Image
Attachments
konvixerror1.jpg
konvixerror1.jpg (47.12 KiB) Viewed 495 times
User avatar
junk2drive
Posts: 12856
Joined: Thu Jun 27, 2002 7:27 am
Location: Arizona West Coast

RE: konvix a PCK fix it all

Post by junk2drive »

args>
&nbsp;
It's those dang Pirates! Software Pirates maybe...
Conflict of Heroes "Most games are like checkers or chess and some have dice and cards involved too. This game plays like checkers but you think like chess and the dice and cards can change everything in real time."
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: konvix a PCK fix it all

Post by Mraah »

Stridor,

Actually, I found out I do have v3.5 ... I reinstalled anyway ...

The SS below is from running the BATCH file in a backup directory ... same error .... arggggg!

Image
Attachments
konvixerror11.jpg
konvixerror11.jpg (183.35 KiB) Viewed 495 times
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: konvix a PCK fix it all

Post by Stridor »

Hmmm,

It should work if you have DX distributable and .net 3.5 ???

It is complaining that it can't open your DX device (screen) for writing?

The only other thing I can suggest is that you need the SDK, which might be worthwhile getting (you can get it free from MS). Worth a shot, but I am not 100% sure that is the problem.

Konvix is a special tool anyway for hardcore modders. Erik should get it running and use it to fix up all the lighting problems on the models and then redistribute the fixes in a patch. It works fine for me. Getting mesh simplify to work is proving difficult however [:@]! That would give an auto LOD option which I think would be of a great benefit to all.

Regards

S.
User avatar
Stridor
Posts: 1391
Joined: Sat Sep 08, 2007 11:01 am

RE: konvix a PCK fix it all

Post by Stridor »

Rob,

I know this is a rather late post, but I needed to do a complete OS reinstall (Vista) on my machine and I downloaded konvix again from the distro above and without reinstalling the c# sdk it worked just fine with the stock install, so I am still unsure why you are having problems.

Regards

S.
Mraah
Posts: 1085
Joined: Wed Feb 20, 2008 6:11 am

RE: konvix a PCK fix it all

Post by Mraah »

Stridor,

Ok ... thanks for letting me know it works without the sdk.

I haven't messed with it since my last post in september and I'll take your suggestion about leaving this for more professional use.

Rob
Post Reply

Return to “Maps, Models and Mods”