compile toolkit - breakables

3

3dway

Guest
I'm having a problem compiling a model

I've made the smd for the model, the smd for the pieces it breaks into, the smd for the collision model with all the pieces in it, each with it's own smoothing group.

When I try to compile using the HL2 compile toolkit, it get an error "model has no sequences" it then fails to compile the model and writes nothing to the compiled folder.

What are the sequences it's refering to? Do my collision models have to be on frame 1 of the timeline?
 
C:\>set toolkit_dir=C:\HL2 Compile Toolkit
WORKING ON PROP MODEL
CREATING MODEL FOLDERS...
COPYING MODEL FILES...
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib3.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib4.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib5.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib1.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib2.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_phys.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_physB.smd
8 file(s) copied.
1 file(s) copied.
COMPILING MODEL...
c:\program files\valve\steam\steamapps\longrath\sourcesdk_content\hl2\modelsrc\u
rn\, C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\, path Urn
Working on "Urn.qc"
SMD MODEL Urn.smd
SMD MODEL Urn_physB.smd
ERROR: model has no sequences
ERROR: Aborted Processing on 'Urn\Urn'
The filename, directory name, or volume label syntax is incorrect.
MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO C:\HL2 Compile Toolkit/COMPILED_MODEL_FILES/Urn.
..
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\*
The system cannot find the file specified.
0 file(s) copied.
COPYING COMPILED MODEL FILES TO GAME DIRECTORY...
C:\Program Files\Valve\Steam\SteamApps\longrath/half-life 2/hl2
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\*.*
The system cannot find the file specified.
0 file(s) copied.
C:\HL2 Compile Toolkit\bin\temp files\props\materials\Urn\Urntex.vtf
C:\HL2 Compile Toolkit\bin\temp files\props\materials\Urn\Urntex.vmt
2 file(s) copied.
COMPILING COMPLETED!
Press any key to continue . . .
 
hot564231 said:
you forgot the animton all prop's need them you make it before you make a con* box, this will help click here to download but you need 3dmax 7 to understand this

I watched the video. The only animation related thing in there was adding bones. I didn't add bones but the tutorial here
http://www.*************/wiki/index.php/Creating_Breakable_Models
didn't mention bones in either the collision object tutorial or the breakable object tutorial.

***edit*** why the hell is h l 2 w o r l d . c o m censored here.

the link is http://w w w . h l 2 w o r l d . c o m /wiki/index.php/Creating_Breakable_Models
 
The QC file

$modelname "mymodels\Urn.mdl"
$cdmaterials "mymodels\"

$scale 1
$surfaceprop "default"


$body studio "Urn.smd"

$collisiontext {
break { "model" "Urn\Urn_gib1" "health" "0" "fadetime" "0" }
break { "model" "Urn\Urn_gib2" "health" "0" "fadetime" "0" }
break { "model" "Urn\Urn_gib3" "health" "0" "fadetime" "0" }
break { "model" "Urn\Urn_gib4" "health" "0" "fadetime" "0" }
break { "model" "Urn\Urn_gib5" "health" "0" "fadetime" "0" }
}

$collisionmodel "Urn_physB.smd" {
$mass 0
$concave
}
 
now that I look at it, the "mymodels" part of the path doesn't seem right.
 
Now the problem is that I can't see the model in the model viewer.

Ok, so I had a bad QC file. I was using the example from the HL2 wiki for breakable models. I was also trying to use one created by the HL2 compile toolkit. Neither worked.

I ended up using the qc file from a static model I made earlier, modified to suit a breakable.

Here's the text from the command prompt that the compile toolkit puts out.

C:\>set toolkit_dir=C:\HL2 Compile Toolkit
WORKING ON PROP MODEL
CREATING MODEL FOLDERS...
COPYING MODEL FILES...
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib3.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib4.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib5.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib1.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_gib2.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_phys.smd
C:\HL2 Compile Toolkit\model_compiling_files\Urn\Urn_physB.smd
8 file(s) copied.
1 file(s) copied.
COMPILING MODEL...
c:\program files\valve\steam\steamapps\longrath\sourcesdk_content\hl2\modelsrc\u
rn\, C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\, path Urn
Working on "Urn.qc"
SMD MODEL ./Urn.smd
SMD MODEL Urn.smd
SMD MODEL Urn_phys.smd
Collision model completed.
---------------------
writing C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models/Urn
\Urn.mdl:
bones 420 bytes (0)
animations 104 bytes (1 anims) (1 frames) [0:01]
sequences 216 bytes (1 seq)
ik/pose 164 bytes
eyeballs 0 bytes (0 eyeballs)
flexes 0 bytes (0 flexes)
textures 8 bytes
keyvalues 0 bytes
collision 0 bytes
total 944
---------------------
writing C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models/Urn
\Urn.vvd:
vertices 0 bytes (0 vertices)
tangents 0 bytes (0 vertices)
total 64 bytes
---------------------
Generating optimized mesh "C:\Program Files\Valve\Steam\SteamApps\longrath\sourc
esdk\hl2\models/Urn\Urn.sw.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 0 bytes
strip groups: 0 bytes
strips: 0 bytes
verts: 0 bytes
indices: 0 bytes
bone changes: 8 bytes
everything: 72 bytes
---------------------
Generating optimized mesh "C:\Program Files\Valve\Steam\SteamApps\longrath\sourc
esdk\hl2\models/Urn\Urn.dx80.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 0 bytes
strip groups: 0 bytes
strips: 0 bytes
verts: 0 bytes
indices: 0 bytes
bone changes: 8 bytes
everything: 72 bytes
---------------------
Generating optimized mesh "C:\Program Files\Valve\Steam\SteamApps\longrath\sourc
esdk\hl2\models/Urn\Urn.dx90.vtx":
body parts: 8 bytes
models: 20 bytes
model LODs: 12 bytes
meshes: 0 bytes
strip groups: 0 bytes
strips: 0 bytes
verts: 0 bytes
indices: 0 bytes
bone changes: 8 bytes
everything: 72 bytes

Completed "Urn.qc"
Memory leak: mempool blocks left in memory: 48
C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models\Urn\urn.mdl

C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models\Urn\urn.vvd

C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models\Urn\Urn.sw.
vtx
C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models\Urn\Urn.dx8
0.vtx
C:\Program Files\Valve\Steam\SteamApps\longrath\sourcesdk\hl2\models\Urn\Urn.dx9
0.vtx
MODEL COMPILING COMPLETE
COPYING COMPILED MODEL FILES TO C:\HL2 Compile Toolkit/COMPILED_MODEL_FILES/Urn.
..
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\urn.mdl
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\urn.vvd
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\Urn.sw.vtx
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\Urn.dx80.vtx
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\Urn.dx90.vtx
5 file(s) copied.
COPYING COMPILED MODEL FILES TO GAME DIRECTORY...
C:\Program Files\Valve\Steam\SteamApps\longrath/half-life 2/hl2
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\urn.mdl
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\urn.vvd
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\Urn.sw.vtx
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\Urn.dx80.vtx
C:\HL2 Compile Toolkit\bin\temp files\props\models\Urn\Urn.dx90.vtx
5 file(s) copied.
C:\HL2 Compile Toolkit\bin\temp files\props\materials\Urn\Urntex.vtf
C:\HL2 Compile Toolkit\bin\temp files\props\materials\Urn\Urntex.vmt
2 file(s) copied.
COMPILING COMPLETED!
Press any key to continue . . .



Here's the QC file

$modelname "Urn\Urn"
$cdmaterials "Urn\"
$cdmaterials "Urn\"
// Output .MDL

$scale 1.0

// it's just ./(name of model)
$body studio "./Urn"

$sequence idle "Urn" fps 1

$collisiontext {
break { "model" "models\Urn\Urn_gib1.smd" "health" "1" "fadetime" "0" }
break { "model" "models\Urn\Urn_gib2.smd" "health" "1" "fadetime" "0" }
break { "model" "models\Urn\Urn_gib3.smd" "health" "1" "fadetime" "0" }
break { "model" "models\Urn\Urn_gib4.smd" "health" "1" "fadetime" "0" }
break { "model" "models\Urn\Urn_gib5.smd" "health" "1" "fadetime" "0" }
}

// you can make a seperate model for colisions if it's a realy complicated model and put name of it here
// otherwise just use the same model
$collisionmodel "Urn_phys.smd"
{
// Mass in kilograms for when model is used as a prop_phys
$Mass 70
$concave
}


// refers to "D:\Program Files\Valve\Steam\SteamApps\mixroman3d\sourcesdk_content\cstrike\materialsrc\"
// this will be saying where yer texture is and in it should be in "sourcesdk_content\cstrike\materialsrc\models\
 
u havnt specifyed i phys model u can use ur reference smd.
 
what's the syntax to specify a physics model. I have the following smds

-the clay urn all in one piece
-the clay urn in five pieces each with it's own smoothing group
-one with five low res pieces for the bits it breaks into, each with it's own smoothing group.

Is that right?
 
this IS the physics model.

Code:
$collisionmodel "Urn_phys.smd"
{
// Mass in kilograms for when model is used as a prop_phys
$Mass 70
$concave
}


As far as the breakables are concerted each should be ONE peice (Unless you want two peices to stay together). Make a model for each peice and name them

models\Urn\Urn_gib1.mdl
models\Urn\Urn_gib2.mdl
models\Urn\Urn_gib3.mdl
...

Compile each one separately.

Reference the MDL's for the peices in the .qc for the main model, not SMD's
 
Hey Cannonfodder.

Actually thanks to your tools, specifically the mdl decompiler I was able to take a reasonable look at how the breakables are done in HL2. I looked specifically at the mug in /props/junk.

From doing that I learned that you need an mdl for each individual piece.

I was also able to take a look at a typical QC file for a breakable. What I'm wondering is, in the qc files that the decompiler writes it writes in coordinates for collision models. I assume that this derrived from a model that valve would have used when compiling, but there's now way to get that info when decompiling. I'm just trying to understand that bit of the QC's that your decompiler writes.

Thanks again Cannonfodder. You're doing a great service to the community. Would you be interested in attending an IRC session with our team?
 
I'm not sure what coord's you are referring too. Could you show an example ?
 
CannonFodder said:
I'm not sure what coord's you are referring too. Could you show an example ?

sorry i guess it was hitbox, not collision model. Do we need a hit box model for props too?

$cd "C:\Documents and Settings\mdg\Desktop\test"
$modelname "props_junk/garbage_coffeemug001a.mdl"
$model "Body" "garbage_coffeemug001a_reference.smd"
$lod 30
{
replacemodel "garbage_coffeemug001a_reference" "lod1_garbage_coffeemug001a_reference"
}
$cdmaterials "models\props_junk/"
$hboxset "default"
$hbox 0 "static_prop" -2.344 -3.237 -2.891 2.344 3.333 2.660
// Model uses material "garbage003a_01.vmt"
$surfaceprop "pottery"
$keyvalues { prop_data { "base" "pottery.Small" } }
$illumposition 0.000 0.048 -0.115
$sequence idle "idle" fps 30.00
$collisionmodel "phymodel.smd" {

$concave
$mass 1.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}
$collisiontext {
break { "model" "props_junk/garbage_coffeemug001a_chunk01" "health" "10" "fadetime" "5"}
break { "model" "props_junk/garbage_coffeemug001a_chunk02" "health" "10" "fadetime" "5"}
break { "model" "props_junk/garbage_coffeemug001a_chunk03" "health" "10" "fadetime" "5"}
}
 
Back
Top