Portal 2 custom models: Difference between revisions
Jump to navigation
Jump to search
Note:This article is not for the creation of custom models for Portal 2. Click here to learn how to create models.
Jamesbrown (talk | contribs) (→About) |
(Major grammar improvements.) |
||
Line 1: | Line 1: | ||
=About= | == About == | ||
This | {{note|This article is not for the creation of custom models for [[Portal 2]]. [[:Category:Modeling|Click here]] to learn how to create models.}} | ||
Studiomdl does not recognize exports made by SMD Exporter. This guide will show the steps to allow Studiomdl to recognize these files. | |||
This | |||
= | == Reference Code == | ||
This is the .smd that the studiomdl in the portal 2 folder reconizes | This is the .smd file that the studiomdl in the portal 2 folder reconizes | ||
<source> | |||
version 1 | |||
nodes | |||
0 "static_prop" -1 | |||
end | |||
skeleton | |||
time 0 | |||
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 | 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 | ||
end | |||
triangles | |||
combine_panel001.bmp | |||
0 58.059105 -108.627701 38.488201 0.072002 0.023401 0.997130 0.289500 -0.998100 | |||
0 52.870804 -94.276199 38.526199 0.072002 0.023401 0.997130 0.316600 -0.998100 | |||
0 45.461502 -78.973999 38.702400 0.072002 0.023401 0.997130 0.355300 -0.998100 | |||
combine_panel001.bmp | |||
0 73.021011 -99.157303 38.303902 -0.270688 -0.028099 0.962257 0.211300 -0.998100 | |||
0 74.424805 -114.241302 38.257702 -0.269592 0.002400 0.962972 0.203900 -0.998100 | |||
0 75.247810 -114.277496 38.488201 -0.275013 0.013601 0.961344 0.199600 -0.998100 | |||
combine_panel001.bmp | |||
... | |||
end | |||
</source> | |||
No nodes other than 0 "static_prop" -1 and (for props): | |||
<source> | |||
skeleton | |||
time 0 | |||
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 | 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 | ||
end | |||
</source> | |||
Here is the .qc file: | |||
<source> | |||
< | |||
$cd "..." | $cd "..." | ||
$modelname "Combine_Room\combine_wire001.mdl" | $modelname "Combine_Room\combine_wire001.mdl" | ||
Line 80: | Line 81: | ||
} | } | ||
</source> | |||
$lod and $hbox and $collisionmodel are unnecessary, so here are the bare-bones to get your model into Hammer: | |||
<source> | |||
$cd "..." | $cd "..." | ||
$modelname "Combine_Room\combine_wire001.mdl" | $modelname "Combine_Room\combine_wire001.mdl" | ||
Line 93: | Line 93: | ||
$illumposition 0.000 0.000 0.000 | $illumposition 0.000 0.000 0.000 | ||
$sequence idle "idle" fps 30.00 | $sequence idle "idle" fps 30.00 | ||
</source> | |||
Finally, to get the model into Hammer, you need the file called '''idle.smd''': | |||
<source> | |||
version 1 | |||
nodes | |||
0 "static_prop" -1 | |||
end | |||
skeleton | |||
time 0 | |||
0 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 | |||
time 1 | |||
0 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000 | |||
end | |||
</source> | |||
[[Category:Portal 2]] | |||
[[Category:Portal 2 Level Design]] |
Revision as of 06:59, 15 October 2011
About

Studiomdl does not recognize exports made by SMD Exporter. This guide will show the steps to allow Studiomdl to recognize these files.
Reference Code
This is the .smd file that the studiomdl in the portal 2 folder reconizes
version 1
nodes
0 "static_prop" -1
end
skeleton
time 0
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
end
triangles
combine_panel001.bmp
0 58.059105 -108.627701 38.488201 0.072002 0.023401 0.997130 0.289500 -0.998100
0 52.870804 -94.276199 38.526199 0.072002 0.023401 0.997130 0.316600 -0.998100
0 45.461502 -78.973999 38.702400 0.072002 0.023401 0.997130 0.355300 -0.998100
combine_panel001.bmp
0 73.021011 -99.157303 38.303902 -0.270688 -0.028099 0.962257 0.211300 -0.998100
0 74.424805 -114.241302 38.257702 -0.269592 0.002400 0.962972 0.203900 -0.998100
0 75.247810 -114.277496 38.488201 -0.275013 0.013601 0.961344 0.199600 -0.998100
combine_panel001.bmp
...
end
No nodes other than 0 "static_prop" -1 and (for props):
skeleton
time 0
0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
end
Here is the .qc file:
$cd "..."
$modelname "Combine_Room\combine_wire001.mdl"
$model "Body" "combine_wire001_reference.smd"
$lod 10
{
replacemodel "combine_wire001_reference" "lod1_combine_wire001_reference"
}
$lod 15
{
replacemodel "combine_wire001_reference" "lod2_combine_wire001_reference"
}
$lod 20
{
replacemodel "combine_wire001_reference" "lod3_combine_wire001_reference"
}
$lod 25
{
replacemodel "combine_wire001_reference" "lod4_combine_wire001_reference"
}
$cdmaterials "models\combine_room/"
$hboxset "default"
$hbox 0 "static_prop" -77.137 -173.657 -40.269 77.137 173.657 40.269
// Model uses material "combine_panel001.vmt"
$surfaceprop "metal"
$illumposition 0.000 0.000 0.000
$sequence idle "idle" fps 30.00
$collisionmodel "phymodel.smd"
{
$concave
$mass 30.0
$inertia 1.00
$damping 0.00
$rotdamping 0.00
}
$lod and $hbox and $collisionmodel are unnecessary, so here are the bare-bones to get your model into Hammer:
$cd "..."
$modelname "Combine_Room\combine_wire001.mdl"
$model "Body" "combine_wire001_reference.smd"
$cdmaterials "models\combine_room/"
$hboxset "default"
$surfaceprop "metal"
$illumposition 0.000 0.000 0.000
$sequence idle "idle" fps 30.00
Finally, to get the model into Hammer, you need the file called idle.smd:
version 1
nodes
0 "static_prop" -1
end
skeleton
time 0
0 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
time 1
0 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
end