Portal 2 custom models: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Major grammar improvements.)
Line 1: Line 1:
=About=
== About ==
This Doesn't talk about how create an actual model that can be found  [http://developer.valvesoftware.com/wiki/Category:Modeling here]
{{note|This article is not for the creation of custom models for [[Portal 2]]. [[:Category:Modeling|Click here]] to learn how to create models.}}


I noticed that my SMD exporter exports in an much different way that studiomdl in the portal 2 folder doesn't reconize it.  
Studiomdl does not recognize exports made by SMD Exporter. This guide will show the steps to allow Studiomdl to recognize these files.
This is an reference guide to make it so that the studiomdl reconizes it. (this deals with props I have yet to see the difference in NPC .qc in portal 2 and the .qc for other games, wanna find out use [[Gibbeds VPK Extractor]] on the portal 2 .vpk files found in Steam\steamapps\common\portal 2\portal2 folder)


=Refernce code=
== 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


version 1
skeleton
nodes
time 0
  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
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


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 then 0 "static_prop" -1 and (for props)


No nodes other than 0 "static_prop" -1 and (for props):


skeleton
<source>
time 0
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
end
</source>


Also 0 in the first column NEVER CHANGES
Here is the .qc file:


Here is the .qc file with also some key notes
<source>
 
<code>
  $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:


$lod and $hbox and $collisionmodel are unnessary
<source>
so here is the bare bones just to get your model into hammer
 
 
  $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''':


finally to get the model into hammer you need an .smd called idle.smd and this is it
<source>
 
version 1
 
  nodes
version 1
    0 "static_prop" -1
nodes
end
  0 "static_prop" -1
skeleton
end
  time 0
skeleton
    0 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
time 0
  time 1
  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
time 1
end
  0 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000000
</source>
end
 
 
Hopefully this allows for more custom props in portal 2 mods
please this is subject to frequent update so keep an eye out for changes


=End Note=
[[Category:Portal 2]]
don't butcher this like you did with [[Custom Portal 2 Textures]] you know who you are and if you treated all new knowleage like what you did with [[Custom Portal 2 Textures]] this wiki will no longer be a tool to mod creators
[[Category:Portal 2 Level Design]]

Revision as of 06:59, 15 October 2011

About

Note.pngNote:This article is not for the creation of custom models for Portal 2. 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.

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