maybe this batch file i wrote to help build art will shed some light?
makegeo.bat
Code: Select all
@echo off
rem %1 base file name (no path or extention)
rem %2 mdl build action (see template if's below)
rem %3 frame number (mostly 1)
rem %4 set to 1 to skip progressive mesh and flatten convex hulls
If Not Exist %1_static.x copy %1.x %1_static.x
If not %2 == 4 xmunge -flatten %3 %1_static.x %1flat.x
if not "%4" == "1" goto makepm
:backfrompm
If %2 == 0 goto dolowtemplate
If %2 == 1 goto doregtemplate
If %2 == 2 goto dostatictemplate
If %2 == 3 goto donolodtemplate
If %2 == 4 goto dotextonly
:backfromtemplate
mdlc -optimize %1source %1
if not "%4" == "1" (goto extractpm) else (goto flatcvh)
:bounds
xmunge -bound %3 %1_bound.x %1
cvh -bound %1
:done
@echo finished %1
goto quit
:dolowtemplate
echo > %1source.mdl use "effect"; frame = ModifiableNumber(%3); object = LODGeo(ImportXFile("%1.x", frame),[ (64, ImportXFile("%1_static", frame)),(32, ImportXFile("%1_a", frame)),(8, ImportXFile("%1-low", frame)) ]);
goto :backfromtemplate
:doregtemplate
echo > %1source.mdl use "effect"; frame = ModifiableNumber(%3); object = LODGeo(ImportXFile("%1.x", frame),[ (64, ImportXFile("%1_static", frame)),(32, ImportXFile("%1_a", frame)),(8, ImportXFile("%1_b", frame)) ]);
goto :backfromtemplate
:dostatictemplate
echo > %1source.mdl use "effect"; frame = ModifiableNumber(%3); object = LODGeo(ImportXFile("%1.x", frame),[ (64, ImportXFile("%1_static", frame)) ]);
goto :backfromtemplate
:donolodtemplate
echo > %1source.mdl use "effect"; frame = ModifiableNumber(%3); object = ImportXFile("%1.x", frame);
goto :backfromtemplate
:dotextonly
if %1 == lens (mdlc %1text %1.mdl) else (mdlc -optimize %1text %1)
goto :done
:makepm
call convpm %1flat
xmunge -reduce 0.5 %1flat_pm.x %1_a.x
xmunge -reduce 0.01 %1flat_pm.x %1_b.x
goto :backfrompm
:extractpm
xmunge -extract %3 %1.x %1
If Exist %1_bound.x goto bounds
cvh -extract %1
goto done
:flatcvh
cvh -flatten %1
goto :done
:quit
here is a list of "original" geos, suitable for passing to geo2mdl (see below)
geo.txt
CODEacs02 2 1
acs05 2 1
acs08 2 1
acs19 1 1
bgrnd03 0 1
bgrnd05 0 1
bgrnd50 0 1
bgrnd51 0 1
bgrnd52 0 1
bgrnd53 0 1
bgrnd54 0 1
bgrnd55 0 1
bgrnd56 0 1
bgrnd57 0 1
bom01a 1 44
bom01b 1 32
bom03 1 20
bom04 1 60
bom05 1 95
bom05b 1 95
bom07 1 60
bom07b 1 60
bom20 1 1
bom30 1 1
cap01 1 60
cap02a 1 1
cap03 1 1
cap04 1 1
cap05 2 1
cap06a 1 1
cap500 2 1
cap501 2 1
cap502 2 1
cap503 2 1
cap504 2 1
cap07 1 1
cap08 1 1
cap09 1 1
cap20 1 1
cap100 1 1
cap101 1 1
cap102 1 1
cap103 1 1
cap300 1 1
cap301 1 1
cap302 1 1
cap303 1 1
cap21 1 1
fig01 1 40
fig02 0 76
fig03 0 30
fig04 0 57
fig05 0 61
fig07 1 58
fig08 1 59
fig09 1 59
fig11 1 59
fig12 0 47
fig13 1 60
fig16 1 60
fig15 1 60
fig17 1 60
fig20 1 1
fig21 1 1
fig22 1 1
fig23 1 1
fig24 1 1
fig25 1 1
fig30 1 1
fig31 1 1
fig32 1 1
fig33 1 1
fig34 1 1
mis12 1 15
ss01 2 1
ss06 2 1
ss18 2 1
ss19a 2 1
ss21a 2 1
ss22 2 1
ss23 2 1
ss24a 2 1
ss27 2 1
ss28 2 1
ss90 2 1
ss92 2 1
ss93 2 1
ss94 2 1
ss95 2 1
ss96 2 1
ss97 2 1
ss98 2 1
ss99 2 1
ss100 2 1
ss101 2 1
ss102 2 1
ss103 2 1
ss104 2 1
ss105 2 1
ss106 2 1
ss107 2 1
ss300 2 1
ss301 2 1
ss302 2 1
ss303 2 1
ss304 2 1
ss305 2 1
ss306 2 1
ss307 2 1
utl01b 1 1
utl02 1 1
utl04 1 1
utl06 1 1
utl07 1 1
utl17a 1 1
utl18a 1 1
utl19 0 1
utl20 2 1
utl27a 1 49
utl27b 1 49
utl28a 1 1
utl94 1 1
utl95 1 1
utl103 1 1
utl104 1 1
utl105 1 1
utl200 1 1
utl201 1 1
utl202 1 1
utl203 1 1
utl204 1 1
utl205 1 1
fig02ops1 1 1
fig05ops1 1 1
fig07ops1 1 1
fig11ops1 1 1
utl92a 1 1
artifact 3 1 1
aleph_sphere 3 1 1
belters_flagplat 3 1 1
biosplat 3 1 1
flag 3 1 1
giga_flagplat 3 1 1
ic_flagplat 3 1 1
rix_flagplat 3 1 1
acs14 3 1 1
utl22 3 1 1
utl93b 3 1 1
utl91 3 1 1
utl90 3 1 1
utl74 3 1 1
utl666 3 1 1
acs01 3 75 1
acs04 3 1 1
acs29 3 1 1
acs30 3 1 1
acs34 3 1 1
acs36 3 1 1
acs38 3 1 1
acs39 3 1 1
acs40 3 1 1
acs41 3 1 1
acs42 3 1 1
acs46 3 1 1
acs48 3 1 1
acs56 3 1 1
acs57 3 1 1
acs63 3 1 1
acs64 3 1 1
mis01 3 1 1
mis02 3 1 1
mis03 3 1 1
mis05 3 1 1
mis06 3 1 1
mis07 3 1 1
mis08 3 1 1
mis09 3 1 1
mis10 3 1 1
mis11 3 1 1
mis13 3 15 1
mis14 3 15 1
muzzle 3 15 1
ops1 3 1 1
ops2 3 1 1
ss02 3 1 1
ss04 3 1 1
ss05 3 1 1
ss08 3 1 1
ss20 3 1 1
utl01 3 1 1
utl10 3 1 1
debris 3 1 1
utl11 3 1 1
utl14a 3 1 1
utl23 3 1 1
utl23f 3 1 1
utl24 3 1 1
utl25 3 1 1
utl99 3 1 1
utl100 3 1 1
utl101 3 1 1
utl102 3 1 1
wep01 3 1 1
wep02 3 1 1
wep03 3 1 1
wep04 3 1 1
wep05 3 1 1
wep06 3 1 1
wep07 3 1 1
wep08 3 1 1
wep09 3 1 1
wep10 3 1 1
wep11 3 1 1
wep12 3 1 1
wep13 3 1 1
wep16 3 1 1
wep17 3 1 1
wep18 3 1 1
wep19 3 1 1
wep90 3 1 1
wep91 3 1 1
wep92 3 1 1
utl05 3 1 1
pointer 4 0 1
cube 4 0 1
sphere 4 0 1
circle 4 0 1
globe 4 0 1
globe1 4 0 1
globe2 4 0 1
globe3 4 0 1
globe4 4 0 1
globe5 4 0 1
globe6 4 0 1
globe7 4 0 1
globe8 4 0 1
globe9 4 0 1
globe10 4 0 1
lens 4 0 1
geo2mdl.bat
Code: Select all
FOR /F "tokens=1,3* delims=," %%G IN (geo.txt) DO @makegeo %%G
EDIT beware: the echo commands for template generation appear to have wrapped in the code tags
also be advised you need a "custom" cvh.exe that uses the CWD (not artbuild) as well as all the usual suspects:
xtobm.exe
xmunge.exe
rlines.exe
qhull.exe
pmxtox.exe
meshimp.exe
mdlc.exe
fprog.exe
fmesh.exe
above all need to be in CWD
convpm.bat changed slightly to remove the fedroot stuff
CODE@echo off
rem Usage: convpm rootname
rem For example. If you have a file mesh.x run as "convpm mesh"
if not exist %1.x goto error_nofile
rem Option: merge faces topologically based on vertex geometry (-gmerge)
set filteropt1=
set filteropt1=-gmerge -genus
rem Option: regenerate normals based on dihedral angles between faces
set filteropt2=
rem Option: speed up simplification by including fewer edges in initial priority queue
set simpopt1=
rem Option: improve simplification fidelity, specify number of points (default= #vertices)
set simpopt2=
set filter1=-genus -triangulate -genus %filteropt1% -fixvertices -fixfaces
set filter2=-rmcomp 0 -renormalizenor -genus -nice %filteropt2%
rem Start of the conversion process
echo Converting X File to Internal mesh format
xtobm.exe %1.x
if errorlevel 1 goto error_xtobm
echo Filtering internal mesh format file
fmesh.exe %1.m %filter1% %filter2% > %1.nice.m
if errorlevel 1 goto error_filtermesh
echo .
echo Simplifying mesh to a base mesh and a set of vertex splits
meshsimp.exe %1.nice.m -prog %1.prog %simpopt1% %simpopt2% -simplify >%1.base.m
if errorlevel 1 goto error_simplify
rlines.exe %1.prog >%1.rprog
if errorlevel 1 goto error_reverse
echo .
echo Converting Base Mesh and Vsplits to .X file
fprog.exe -fbase %1.base.m -fprog %1.rprog -pm >%1.pm
if errorlevel 1 goto error_filterprog
pmtopmx.exe %1.pm
if errorlevel 1 goto error_pmtopmx
echo .
pmxtox.exe %1.pmx
if errorlevel 1 goto error_pmxtox
echo All Done!
goto exit
:error_nofile
echo %1.x doesn't exist. Usage convpm base_filename
goto exit
:error_xtobm
echo Converting the X File to Internal mesh format failed
goto exit
:error_filtermesh
echo .
echo Filtering the internal mesh failed
goto exit
:error_simplify
echo .
echo Simplifying the mesh failed
goto exit
:error_reverse
echo .
echo Reverselines failed
goto exit
:error_filterprog
echo .
echo Creating the PM file failed
goto exit
:error_pmtopmx
echo .
echo Converting the PM to PMX file format failed
goto exit
:error_pmxtox
echo .
echo Converting the PMX file to an X File failed
goto exit
:exit