Difference between revisions of "How to make OC playermodels"

From Obsidian Conflict Wiki
Jump to: navigation, search
Line 39: Line 39:
  
  
 +
<pre>"VertexLitGeneric"
 +
{
 +
"$baseTexture" "Models/player/Mossman/mossman_sheet"
 +
"$envmap" "env_cubemap"
 +
                "$bumpmap" "models/player/Mossman/Mossman_normal"
 +
"$normalmapalphaenvmapmask" 1
 +
"$envmapcontrast" .20
 +
"$envmapsaturation"0.9
 +
"$envmaptint" "[ .36 .36 .36 ]"
 +
        "$halflambert" 1
 +
"$nodecal" "1"
 +
}</pre>
  
 +
Go to the "$baseTexture" line, and change "Models/player/Mossman/mossman_sheet" for the rute where is placed the textures of your model.
  
Go to
+
(Make sure that you write correctly the name and the rute, or you will see your model purple and black chequered)
  
 +
Once you modified all the .VMT files, you are ready to convert the model to be used in Obsidian Conflict.
 +
 +
 +
==Converting the model==
 +
 +
Go to the model files, and open the .MDL file with Notepad++. Go to the first line and search IDST0. If is the same, then is ok. If you found it as a IDST, , change it to IDST0. This will allow you decompile an Orange Box model.
 +
 +
 +
Open MDLDecompiler. Select the model that you want decompile and the folder where you want put the files. Wait until a pop-out window appears saying "(model) model decompiled".
  
  
 +
(If for some reason crashes, try again 3-4 times. If still without work, try with [http://www.chaosincarnate.net/cannonfodder/cftools.htm StudioCompiler].
  
 +
Go to the folder where the new files are. You will see some files with the extension .SMD and a single file with the extension .QC called mdldecompiler. Open it with Wordpad.
  
  
Once you modified all the .VMT files, you are ready to convert the model to be used in Obsidian Conflict.
+
This file sets all the configuration of the model. This is an example:
 +
 
 +
<pre>$cd "C:\Users\Rafa\Desktop\Nueva carpeta (5)"
 +
$modelname "player\Flandre.mdl"
 +
$model "body" "ref.smd"
 +
$cdmaterials "models\player\Flandre\"
 +
$hboxset "default"
 +
// Model uses material "txFlanFace.vmt"
 +
// Model uses material "txFlandre.vmt"
 +
$includemodel "player/female_shared.mdl"
 +
$includemodel "player/female_ss.mdl"
 +
$includemodel "player/female_gestures.mdl"
 +
$includemodel "player/female_postures.mdl"
 +
$surfaceprop "flesh"
 +
$illumposition 0.016 0.578 34.522
 +
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
 +
$ikchain rhand ValveBiped.Bip01_R_Hand knee  0.707 0.707 0.000
 +
$ikchain lhand ValveBiped.Bip01_L_Hand knee  0.707 0.707 0.000
 +
$ikchain rfoot ValveBiped.Bip01_R_Foot knee  0.707 -0.707 0.000
 +
$ikchain lfoot ValveBiped.Bip01_L_Foot knee  0.707 -0.707 0.000
 +
$collisionjoints "phymodel.smd" {
 +
 
 +
$mass 60.0
 +
$inertia 10.00
 +
$damping 0.01
 +
$rotdamping 1.50
 +
$rootbone "valvebiped.bip01_pelvis"
 +
$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"
 +
 
 +
(more things)</pre>
 +
 
 +
 +
'''$cd''' indicates where the compiler must read the decompilated files (change it if after decompile the model you moved this files to another folder).
 +
 
 +
 
 +
'''$modelname''' indicates the path where will be created the model and their name. Change it for the path that the model will use and their name if you want rename it. For a playermodel the path is "player/nameofthemodel.mdl".
 +
 
 +
 
 +
'''$cdmaterials''' indicates the path where will be the textures of the model. Write right the path or you will see your model black and purple chequered.
 +
 
 +
 
 +
'''$includemodel''' indicates the path and the name of the animations of the model. For make a Obsidian Conflict playermodel you must put:
 +
 
  
 +
*For a male model:
  
==Converting the model==
+
<pre>$includemodel "player/male_shared.mdl"
 +
$includemodel "player/male_ss.mdl"
 +
$includemodel "player/male_gestures.mdl"
 +
$includemodel "player/male_postures.mdl"</pre>
  
Go to the model files, and open the 
 
  
 +
*For a female model:
  
 +
<pre>$includemodel "player/female_shared.mdl"
 +
$includemodel "player/female_ss.mdl"
 +
$includemodel "player/female_gestures.mdl"
 +
$includemodel "player/female_postures.mdl"</pre>
  
  
  
 
[[Category:Miscellaneous_Tutorials]]
 
[[Category:Miscellaneous_Tutorials]]

Revision as of 15:57, 7 April 2011

WIP.png This page is still a Work In Progress


Original tutorial written by Fug, with tips and tricks of Maestro Fénix.

In this tutorial you will learn about to make a playermodel for Obsidian Conflict.


You will need...

  • Source Development Kit (SDK): Available in your Steam->Games->Tools
  • A image editing program (Paint.net, Photoshop, Paint Shop...)


Preparing the model

First, you will have to create the folder of the new model that you want do. Go to Obsidian folder (remember: Steam/steamapps/sourcemods), and go to the following folder to create a new one:

Materials/models/player (here, create a folder using right-click->create new folder, and name it as the name of your model).


Go to the textures of the model, place them in this new folder, and open their .VMT files.

You will see somethink like this (example):


"VertexLitGeneric"
{
	"$baseTexture" "Models/player/Mossman/mossman_sheet"
	"$envmap" 			"env_cubemap"
                "$bumpmap" "models/player/Mossman/Mossman_normal"
	"$normalmapalphaenvmapmask" 1
	"$envmapcontrast" .20
	"$envmapsaturation"0.9
	"$envmaptint" "[ .36 .36 .36 ]"
        "$halflambert" 1
	"$nodecal" "1"
}

Go to the "$baseTexture" line, and change "Models/player/Mossman/mossman_sheet" for the rute where is placed the textures of your model.

(Make sure that you write correctly the name and the rute, or you will see your model purple and black chequered)

Once you modified all the .VMT files, you are ready to convert the model to be used in Obsidian Conflict.


Converting the model

Go to the model files, and open the .MDL file with Notepad++. Go to the first line and search IDST0. If is the same, then is ok. If you found it as a IDST, , change it to IDST0. This will allow you decompile an Orange Box model.


Open MDLDecompiler. Select the model that you want decompile and the folder where you want put the files. Wait until a pop-out window appears saying "(model) model decompiled".


(If for some reason crashes, try again 3-4 times. If still without work, try with StudioCompiler.

Go to the folder where the new files are. You will see some files with the extension .SMD and a single file with the extension .QC called mdldecompiler. Open it with Wordpad.


This file sets all the configuration of the model. This is an example:

$cd "C:\Users\Rafa\Desktop\Nueva carpeta (5)"
$modelname "player\Flandre.mdl"
$model "body" "ref.smd"
$cdmaterials "models\player\Flandre\"
$hboxset "default"
// Model uses material "txFlanFace.vmt"
// Model uses material "txFlandre.vmt"
$includemodel "player/female_shared.mdl"
$includemodel "player/female_ss.mdl"
$includemodel "player/female_gestures.mdl"
$includemodel "player/female_postures.mdl"
$surfaceprop "flesh"
$illumposition 0.016 0.578 34.522
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$ikchain rhand ValveBiped.Bip01_R_Hand knee  0.707 0.707 0.000
$ikchain lhand ValveBiped.Bip01_L_Hand knee  0.707 0.707 0.000
$ikchain rfoot ValveBiped.Bip01_R_Foot knee  0.707 -0.707 0.000
$ikchain lfoot ValveBiped.Bip01_L_Foot knee  0.707 -0.707 0.000
$collisionjoints "phymodel.smd" {

	$mass 60.0
	$inertia 10.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "valvebiped.bip01_pelvis"
	$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"

(more things)


$cd indicates where the compiler must read the decompilated files (change it if after decompile the model you moved this files to another folder).


$modelname indicates the path where will be created the model and their name. Change it for the path that the model will use and their name if you want rename it. For a playermodel the path is "player/nameofthemodel.mdl".


$cdmaterials indicates the path where will be the textures of the model. Write right the path or you will see your model black and purple chequered.


$includemodel indicates the path and the name of the animations of the model. For make a Obsidian Conflict playermodel you must put:


  • For a male model:
$includemodel "player/male_shared.mdl"
$includemodel "player/male_ss.mdl"
$includemodel "player/male_gestures.mdl"
$includemodel "player/male_postures.mdl"


  • For a female model:
$includemodel "player/female_shared.mdl"
$includemodel "player/female_ss.mdl"
$includemodel "player/female_gestures.mdl"
$includemodel "player/female_postures.mdl"