Portal 2 custom models: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (clean up, added underlinked tag)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=About=
{{Multiple issues|
I noticed that my SMD exporter exports in an much different way that studiomdl in the portal 2 folder doesn't reconize it.
{{Underlinked|date=January 2024}}
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)
{{orphan}}
{{cleanup}}
}}


=Refernce code=
== About ==
{{note|This article is not for the creation of custom models for [[Portal 2]]. [[:Category:Modeling|Click here]] to learn how to create models.}}


This is the .smd that the studiomdl in the portal 2 folder reconizes
Studiomdl does not recognize exports made by SMD Exporter. This guide will show the steps to allow Studiomdl to recognize these files.


== Reference Code ==


version 1
This is the .smd file that Studiomdl recognizes in the Portal 2 folder:
nodes
 
<source>
version 1
nodes
   0 "static_prop" -1
   0 "static_prop" -1
end
end
skeleton
 
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
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 then 0 "static_prop" -1 and (for props)
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):


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


<code>
<source>
  $cd "..."
  $cd "..."
  $modelname "Combine_Room\combine_wire001.mdl"
  $modelname "Combine_Room\combine_wire001.mdl"
Line 71: Line 79:
  $collisionmodel "phymodel.smd"  
  $collisionmodel "phymodel.smd"  
  {
  {
 
$concave
$concave
$mass 30.0
$mass 30.0
$inertia 1.00
$inertia 1.00
$damping 0.00
$damping 0.00
$rotdamping 0.00
$rotdamping 0.00
  }
  }


</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 92: Line 98:
  $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 [[Portal 2 Custom textures]] you know who you are and if you treated all new knowleage like what you did with [[Portal 2 Custom textures]] this wiki will no longer be a tool to mod creators
[[Category:Portal 2 Level Design]]

Latest revision as of 22:51, 21 January 2024

Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

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 Studiomdl recognizes in the Portal 2 folder:

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