p3dminf - p3dm mlod quick scan tool...
Moderators: Lone Wolf, Snake Man
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
p3dminf - p3dm mlod quick scan tool...
------------------------------------------------------------------------------------------------------------
p3dminf_v0.5.rar 13 Kilobytes (Link not 24/7)
p3dminf_v0.5.rar 13 Kilobytes from RKSL
------------------------------------------------------------------------------------------------------------
Usage.
p3dminf v0.5.0.0 Copyright Synide, 2008
Processes BIS p3dm mlod model files and outputs
specific information regarding the number of lods
and the number of points, faces, sections,
named selections and properties for each lod.
---------------------------------------------------------------------------
Usage: p3dminf [options] -p=[search pathname] -f=<filename>.p3d -o=[output filename]
---------------------------------------------------------------------------
[options] - optional parameter
'-s' - Also process subfolders.
[search pathname] - optional parameter
- If not present will process current folder.
- If present, it MUST be a fully qualified pathname.
- Eg. -p=P:\Synide
<filename>.p3d - required parameter
- Normal DOS wildcards maybe used in the filename.
Only files with the extension of .p3d will be processed.
[output filename] - optional parameter
- If not present the output filename will default to
'p3dminf.txt' in the current folder.
---------------------------------------------------------------------------
Example: p3dminf -f=*high*.p3d -o=high.txt
parse files in the current folder with a filename
matching *high*.p3d and place the text output
in high.txt in the current folder.
p3dminf -s -p=P:\AAW -f=*.p3d -o=P:\AAW\aaw.txt
parse files in the folder P:\AAW with filename
matching *.p3d, also process all subfolders and place
the text output in the file aaw.txt in the current
folder.
------------------------------------------------------------------------------------------------------------
Output.
p3dminf v0.4.0.0 Copyright © Synide, 2008
ProcessSubfolders=True
SearchPathspec=P:\Synide
SearchFilespec=*.p3d
OutputFilespec=C:\Documents and Settings\Synide\My Documents\Visual Studio 2005\Projects\p3dminf\bin\Debug\p3dminf.txt
<Filename> <NoOfLods>
<Lod> - <NoOfPoints>/<NoOfFaces>/<NoOfTris>/<NoOfQuads>/<NoOfSections> - <Resolution>
\synWeapons\synM136.p3d NoOfLods=9
LodNo=00 - 1296/1364/465/899/3 - 1.5
LodNo=01 - 673/721/359/362/3 - 2.3
LodNo=02 - 346/392/234/158/3 - 3.4
LodNo=03 - 73/58/10/48/1 - 5.1
LodNo=04 - 2416/2452/398/2054/3 - View Pilot
LodNo=05 - 169/302/302/0/1 - Stencil Shadow
LodNo=06 - 36/48/48/0/1 - Stencil Shadow 2
LodNo=07 - 60/58/8/50/1 - Geometry
LodNo=08 - 3/0/0/0/0 - Memory
\synWeapons\synM16A4GL.p3d NoOfLods=1
LodNo=00 - 5133/5152/1066/4086/5 - View Pilot
------------------------------------------------------------------------------------------------------------
Changelog:
30-May-2008 - v0.2 - Fix parsing of commandline parameters. Now if present must use -s, -p=, -f= & -o=...
9-June-2008 - v0.3 - Fixed parsing of commandline parameters.
24-June-2008 - v0.4 - Added output to .csv file also.. (Comma Seperated Value) format. For loading into eg. MS Excel.
22-August-2008 - v0.5 - Added highlighting of .p3ds that are in SP3X format.
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
Type at the command prompt...
>path=<PathToWhereP3DMINFLives>
Then type for instance...
>p3dminf -s p:\aaw *hole*.p3d p:\aaw\p3dminf.txt
The above will produce a text file called 'p3dminf.txt' in the p:\aaw folder.
The program will process the folder p:\aaw looking for p3dm mlods that have a matching filename to '*hole*.p3d' and also process all subfolders.
Cheers, Sy.
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC

But I do remember that by just running it: p3dminf.exe *.p3d report.txt does not work for me, it gives some error.
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
ok, let me know... you probably have .net installed as you have been using other tools of mine... so it's probably something else...Snake Man wrote:I wrote some notes when testing it, will post them when I remember to bring them with me next time on internet cafe
But I do remember that by just running it: p3dminf.exe *.p3d report.txt does not work for me, it gives some error.
@Gnat... have you tried it? does it work for you? any comments? And, you're in Aus right? I'm just across the tasman sea from you in Wellington.
-
- Recruit
- Posts: 18
- Joined: 2005-07-15 14:36:41
andE:\downloads\p3dminf>p3dminf.exe Akat02S.p3d
p3dminf v0.1.0.0 Copyright © Synide, 2008
Error: <filename>.p3d is a required parameter.
Hope it helps.E:\downloads\p3dminf>p3dminf.exe -s E:\Games\ArmA\@PROPER_VegetationReplacement\addons\plants\ Akat02S.p3d
p3dminf v0.1.0.0 Copyright © Synide, 2008
Unbehandelte Ausnahme: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
bei p3dminf.p3dminf.ParseFile(FileInfo fi, Int32 i)
bei p3dminf.p3dminf.Process()
bei p3dminf.p3dminf..ctor()
bei p3dminf.Program.Main(String[] args)
.net 2.0, .net 2.0 SP1, .net 3.0 SP1, .net 3.5 installed.
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
When I run it, it really is not working with "p3dminf.exe *.p3d text.txt" command line for me, it gives error:
Code: Select all
D:\stuff\VTE_objects>G:\ArmA.edit\Tools\lxo2p3dm\p3dminf *.p3d report.txt
p3dminf v0.1.0.0 Copyright c Synide, 2008
Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part
of the path 'D:\stuff\VTE_objects\report.txt'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String user
PathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, S
earchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern, SearchOption search
Option)
at p3dminf.p3dminf..ctor()
at p3dminf.Program.Main(String[] args)
Code: Select all
D:\stuff\VTE_objects>G:\ArmA.edit\Tools\lxo2p3dm\p3dminf -s d:\stuff\VTE_objects
\ VTE_*.p3d x_report.txt
p3dminf v0.1.0.0 Copyright c Synide, 2008
Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
at p3dminf.p3dminf.ParseFile(FileInfo fi, Int32 i)
at p3dminf.p3dminf.Process()
at p3dminf.p3dminf..ctor()
at p3dminf.Program.Main(String[] args)
Then the actual output...
VTE_afbgplate.p3d NoOfLods=6
LodNo=00 - 18/16/0/16/1
LodNo=01 - 9/4/0/4/1
LodNo=02 - 9/4/0/4/1
LodNo=03 - 0/0/0/0/0 - Geometry
LodNo=04 - 9/4/0/4/1 - Roadway
LodNo=05 - 9/4/0/4/1 - Paths
Thats one example I'm reading and to me, the most interesting information is the number of LODs, meaning _resolution_ LODs, not geometrys and certainly not Paths

So it would be awesome if it would list the real LOD names as they are in O2, like
VTE_afbgplate.p3d NoOfLODs = 3
LOD 1.000 - ...
LOD 2.000 - ...
LOD 3.000 - ...
Geometry - ...
Roadway - ...
Paths - ...
Because what I wanted the tool to do is to immediately tell me "MODEL X HAS ONLY ONE RES LOD, AND MODEL Y HAS 25 SECTIONS, EEK, DO SOMETHING!"

Right now the tool kind of tells me that hey no problem this model has 6 LODs, even though it really has only 3 resolution LODs and rest are the other stuff. I know I know, this is already great to have it output 400 p3d's into one text file, but minor tweaks it would be much more easily readable for the important (lod count, sections) information.
I'm also thinking how we could parse the text file so we first would process the 400 p3ds with p3dminf, then use editpadpro rexegbuddy or something to produce clear small text file listing perhaps top-10 baddest models... or something like that. My goal from the start was to click a button and find out which of my models suck

IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
Code: Select all
d:\stuff\CATintro>G:\ArmA.edit\Tools\lxo2p3dm\p3dminf -s -p=d:\stuff\catintro\ -f=*.p3d -o=x_report.txt
p3dminf v0.2.0.0 Copyright c Synide, 2008
ProcessSubfolders=True
SearchPathspec=d:\stuff\catintro\
SearchFilespec=*.p3d
OutputFilespec=
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: path
at System.IO.File.CreateText(String path)
at p3dminf.p3dminf.Process()
at p3dminf.p3dminf..ctor()
at p3dminf.Program.Main(String[] args)
I would be completely happy if the tool would just read all p3d files in the current dir and output "report.txt" file, no need for any fancy input/output paths.
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC

The v0.2 output is much better for tracking down the high poly count last res LODs.
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
Any news about the parameters fix as its now quite difficult/strange to run the tool?
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
The model has only the mentioned one LOD, 4 points, 2 faces, 1 texture... nothing more.
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
I think a feature would be nice where you give p3dminf a parameter and then it would only list models that have last Res LOD over 100 points and/or more than 1 sections.
Of course I'm not sure if the section counting would work, I mean if there is proxys and stuff. We want to have last LOD with 1 section only... a section which actually is a texture. The proxys and junk as sections dont matter heh.
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
Bugger, rgr, i'll have a squizzy tomorrow...Snake Man wrote:When I run the p3dminf v0.3 on object that does not have anything else except LOD 0.0, no geometry, no nothing, the util crashes.
The model has only the mentioned one LOD, 4 points, 2 faces, 1 texture... nothing more.
Regarding, outputing other bits of information regarding the .p3d's.. i'll have a think about that... should be easy enough to accomodate as I'm parsing the entire .p3d into various struct's before writing out the current info.
Also... a word of warning...

Edit:
Hmmm... I re-read your above 'crash' problem with v0.3... and it's a little confusing... you say it crashes when trying to process a p3dm mlod that has 1 lod with a resolution of 0.0 and this lod has no geometry, that is no points, faces or anything else... I couldn't get v0.3 to replicate this at my end - that is it seems to process this p3dm without crashing.
Then, in the same sentence you indicate that the file does have geometry... confused...
Also, I've altered the memory management slightly and with v0.4 you could quite happily process thousands of p3dm's.
Still working on your 'filtering' mechanism request...
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
Do you have Microsoft Excel?Snake Man wrote:Was thinking about a new feature... hmm does the code read and write data on the fly, or does it read whole p3d into memory and then sort out the stuff into text file?
I think a feature would be nice where you give p3dminf a parameter and then it would only list models that have last Res LOD over 100 points and/or more than 1 sections.
Of course I'm not sure if the section counting would work, I mean if there is proxys and stuff. We want to have last LOD with 1 section only... a section which actually is a texture. The proxys and junk as sections dont matter heh.
If so then I can change the output from a 'report' to a 'comma seperated value' file (.csv) and you can open it in Excel and sort/filter whatever you like with the info... would save me having to code for your requirements and give you more flexibility... much better I think... what do you think?
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
What I mean is that the vte_sleaf1.p3d has ONLY 0.0 LOD. In this 0.0 LOD there is 4 points, two faces, the model is just a leaf of a tree which is launched by scripts to simulate falling leafs.you say it crashes when trying to process a p3dm mlod that has 1 lod with a resolution of 0.0 and this lod has no geometry, that is no points, faces or anything else... I couldn't get v0.3 to replicate this at my end - that is it seems to process this p3dm without crashing.
Then, in the same sentence you indicate that the file does have geometry... confused...
The p3d model has no geometry, fire geometry, view geometry, memory, hitpoints or any other LODs.
Well yes, but please dont change the output, but add it as extra. So far I like it fine on text format (especially as my excel/word is broken heh).I can change the output from a 'report' to a 'comma seperated value' file (.csv) and you can open it in Excel and sort/filter whatever you like with the info
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
I'll have the tool output both the text report file AND the .csv file.
You can then 'filter/sort' to your hearts content in Excel... even though you don't have it 'cause it's 'broken'... if you want filtering etc. you'll have to get Excel or get it working somehow... 'cause it's too much hassle for me to do the same thing.
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
Crashes and produces only report.txt with header:
Code: Select all
G:\ArmA.edit\Tools\lxo2p3dm\p3dminf.exe -p=d:\armatools\armawork\vte_land\ -f=VTE*.p3d -o=report.txt
Code: Select all
G:\ArmA.edit\Tools\lxo2p3dm\p3dminf.exe -f=VTE*.p3d
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".
-
- 2nd Lt
- Posts: 76
- Joined: 2003-11-18 19:14:51
- Location: Wgtn, New Zealand
I don't know why it would be crashing with your above parameters... The only way of finding out is for you to send over the entire contents of the folder you are trying to process.
I have modified p3dminf to v0.5 so it highlights to you which (if any) of the .p3d's it is trying to process are sp3x... maybe this is the problem... I really cannot be sure unless I run it in debug mode while it processes what you are trying to feed it...
-
- Commander-In-Chief
- Posts: 9832
- Joined: 2000-07-31 22:01:01
- Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
- Editing Interests: All, I (try) to edit everything.
- Location: PMC
IF YOU WANT TO KEEP USING PMC WEBSITES INCLUDING THIS FORUM, DOWNLOAD ADDONS, READ TUTORIALS, ETC, PLEASE HELP BY SUPPORTING PMC.
Support PMC
Please help to keep PMC websites online, if domains are let to expire then it will be "game over, man!".