Creating breakable door in several stages

Started by Cerberus, October 31, 2015, 06:16:49 PM

Previous topic - Next topic

Cerberus

Hello again, i'm trying to make a breakable door for Contagion.

The way the doors break are in several stages (like in L4D2) here is to see what I mean : http://imgur.com/a/XSBU7

This is what i'm modeling in 3DS max (not finished) : http://i.imgur.com/EkjHx8V.png

I've done a simple breakable teapot and that worked, but how do I do it so the doors transition to the next stages once broken ?

I've extracted the QC of the doors from the game :


This is for the base unbroken door :

// Created by Crowbar 0.24.0.0

$modelname "props_door\door06.mdl"

$bodygroup "studio"
{
studio "door06_reference.smd"
}


$opaque

$cdmaterials "models\props_door\"

$surfaceprop "wood"

$contents "solid"


// NOTE: The following commented-out $definebone lines might be needed, as is often the case for view models. When needed, simply remove the two slashes '//' from the start of each line.
// $definebone "Object002" "" 24.000919 0.961767 -44.019051 0 0 0 0 0 0 0 0 0




$sequence "idle" "door06_anims\idle.smd" {
fps 30
loop
}

$collisionmodel "door06_physics.smd"
{
$mass 6
$inertia 1
$damping 0
$rotdamping 0
$concave

}

$collisiontext
{
break
{
"model" "props_door\gibs\door06_gib01.mdl"
"fadetime" "55"
"fademindist" "800"
"debris" "1"
"fademaxdist" "1200"
}
break
{
"model" "props_door\gibs\door06_gib02.mdl"
"fadetime" "55"
"fademindist" "800"
"debris" "1"
"fademaxdist" "1200"
}
break
{
"model" "props_door\gibs\door06_gib03.mdl"
"fadetime" "55"
"fademindist" "800"
"debris" "1"
"fademaxdist" "1200"
}
}


$keyvalues
{
prop_data
{
"base" "Door.Standard"
"allowstatic" "1"
"blocklos" "0"
}
door_options
{
"defaults"
{
"surfaceprop" "wood"
"damage1" "props_door\door06_damage01"
"damage2" "props_door\door06_damage02"
"damage3" "props_door\door06_damage03"
}
}
}


This is for the first damage stage :

// Created by Crowbar 0.24.0.0

$modelname "props_door\door06_damage01.mdl"

$bodygroup "studio"
{
studio "door06_damage01_reference.smd"
}


$opaque

$cdmaterials "models\props_door\"

$surfaceprop "wood"

$contents "solid"


// NOTE: The following commented-out $definebone lines might be needed, as is often the case for view models. When needed, simply remove the two slashes '//' from the start of each line.
// $definebone "Object006" "" 24.000919 0.961767 -44.019051 0 0 0 0 0 0 0 0 0




$sequence "idle" "door06_damage01_anims\idle.smd" {
fps 30
loop
}

$collisionmodel "door06_damage01_physics.smd"
{
$mass 6
$inertia 1
$damping 0
$rotdamping 0
$concave

}

$collisiontext
{
break
{
"model" "props_door\gibs\door06_gib04.mdl"
"fadetime" "55"
"fademindist" "800"
"debris" "1"
"fademaxdist" "1200"
}
break
{
"model" "props_door\gibs\door06_gib05.mdl"
"fadetime" "55"
"fademindist" "800"
"debris" "1"
"fademaxdist" "1200"
}
}


$keyvalues
{
prop_data
{
"base" "Door.Standard"
"allowstatic" "1"
"blocklos" "0"
}
}


And this is from one of the gibs :

// Created by Crowbar 0.24.0.0

$modelname "props_door\gibs\door06_gib01.mdl"

$bodygroup "studio"
{
studio "door06_gib01_reference.smd"
}


$cdmaterials "models\props_door\"

$texturegroup "skinfamilies"
{
{
"door06.vmt"
}
{
"door06b.vmt"
}
{
"door06c.vmt"
}
}

$surfaceprop "wood"

$contents "solid"


// NOTE: The following commented-out $definebone lines might be needed, as is often the case for view models. When needed, simply remove the two slashes '//' from the start of each line.
// $definebone "Object025_001" "" 24.000919 0.961767 -44.019051 0 0 0 0 0 0 0 0 0




$sequence "idle" "door06_gib01_anims\idle.smd" {
fps 30
loop
}

$collisionmodel "door06_gib01_physics.smd"
{
$mass 20
$inertia 1
$damping 0
$rotdamping 0

}


$keyvalues
{
prop_data
{
"base" "Wooden.Small"
"health" "0"
}
}






wallworm

I've never done this myself. But based on the way the QCs look, I'd do this:

Set up 1 WWMT for each stage. This can include the gibs in each stage.

Once you've exported all stages and are done with the model, you'll want to open the main door model in WWMT and click the QC button. Then edit the keyvalues section (if you set the gibs up inside WW) and add this into the keyvalues block:


door_options
{
"defaults"
{
"surfaceprop" "wood"
"damage1" "props_door\mydoor_stage01"
"damage2" "props_door\mydoor_stage02"
"damage3" "props_door\mydoor_stage03"
}
}


EDIT: I changed the door names to be generic--they should be what the MDL's are named created by your WWMT models in the stages.

Now in WWMT for this WWMT Helper choose Lock QC so it won't get edited anymore when you export. Then re-export and compile the model.

If you are not setting up gibs inside WWMT and doing that manually, you can instead write out the entire keyvalues into the QCI instead of the QC--in which case you won't need to lock the QC.

These are just my best guesses on solving it.

Cerberus

I've had quite a lot of trouble setting this up but now, it finally works! Thanks so much.

wallworm

Great!

Could you shed some light on what the issues were and what your final solution was? And did the tips above help?

SMF spam blocked by CleanTalk