Page 1 of 2

Playermodeling help

Posted: Mon Jan 03, 2011 11:36 am
by therunningdafini
I did follow that tutorial in the tutorials section... no offence to the creator of it, but it helps to a point...
I still don't know how to implement entirely new models in. for instance, I am creating some Sonic-based playermodels... I compiled them into the players folder, but one thing is confusing me... how do I recept the new model? I know you use a text file to indicate some of it, but not the model name itself...
Sorry if I have missed a particular point, but this has been getting to me for a while.

and yes, I did say I was going to make some models before... this just got in the way.

Re: Playermodeling help

Posted: Mon Jan 03, 2011 4:07 pm
by MaestraFénix
Emmm, ok i try to help you:

First you should test if the model that you want make a playermodel have a Valvebiped. skeleton (or HL2 default skeleton).

Second is obviously test if it have a good rig.

Third is compile to the player folder with the "male/female" anims.

Fourth is create the .vmt and .vtf files to can select in the game your model (note: the files must be called with the same name of the model, or it will not work).


And mainly that´s are all the steps to get work a model into a playermodel in OC.

Re: Playermodeling help

Posted: Thu Jan 27, 2011 5:16 pm
by AsG1Alligator
Hi. I have a bit differrent problem with playemodel i tried to remake from gmod ragdoll (I had to rig it to biped)... Model works (almost) because it crashes obsidian when i kill myself to see the ragdoll... (Im afraid i messed something up when rigging the model... it was pretty hard so there is such possibility)

PS: It's my first model i (re)made.

Re: Playermodeling help

Posted: Thu Jan 27, 2011 6:28 pm
by MaestraFénix
AsG1Alligator wrote:Hi. I have a bit differrent problem with playemodel i tried to remake from gmod ragdoll (I had to rig it to biped)... Model works (almost) because it crashes obsidian when i kill myself to see the ragdoll... (Im afraid i messed something up when rigging the model... it was pretty hard so there is such possibility)

PS: It's my first model i (re)made.

The game crash when you die? Sounds a problem with the ragdoll model (remember, "body" and phymodel in reference in 3DS Max, Ragdoll in secuence).

Re: Playermodeling help

Posted: Fri Jan 28, 2011 12:30 pm
by AsG1Alligator
I followed Mario's Guide to Ragdolling on Facepunch. I had to do some stuff in a bit different eay than there.

That's the model i tried to rig: http://www.garrysmod.org/downloads/?a=view&id=116525 (the last pic's model obviously)

It was hard because i had to put it in t-pose and manipulate vertices a lot... When i was testing rig in-editor i rotated a few bones from their original position (i rotated them back to original position... at least i think so...)

Re: Playermodeling help

Posted: Fri Jan 28, 2011 1:04 pm
by MaestraFénix
OMG THAT MODEL!? Basically the only thing that i can say you is "Continue trying". I had to rig some models incredible detallied/with a lot of polygons and no always is 100% perfect (see the Kit Ballard playermodel, i´m continue fixing it when i can).

Re: Playermodeling help

Posted: Fri Jan 28, 2011 1:18 pm
by AsG1Alligator
Heh... Now i cant compile model...

Studiomdl says:

Code: Select all

GUIStudioMDL 2.2/Source - © 2007 Neil 'Jed' Jedrzejewski - http://www.wunderboy.org/

Loaded QC file - "H:\models_rdy\ragdoll.qc"

Created command line: "E:\Program Files\Steam\steamapps\michalm9\sourcesdk\bin\ep1\bin\studiomdl.exe" -game "e:\program files\steam\steamapps\michalm9\half-life 2 deathmatch\hl2mp" -notxbox H:\models_rdy\ragdoll.qc

qdir:    "h:\models_rdy\"
gamedir: "e:\program files\steam\steamapps\michalm9\half-life 2 deathmatch\hl2mp\"
g_path:  "ragdoll"
Working on "ragdoll.qc"
SMD MODEL H:\models_rdy/ragdoll.smd
SMD MODEL H:\models_rdy/phymodel.smd
ERROR: cannot find bone valvebiped.bip01_head1 for bbox
ERROR: Aborted Processing on 'player\gojira2000costume.mdl'

And there IS bone called ValveBiped.Bip01_head1... I have no idea why it cant find it...

Re: Playermodeling help

Posted: Fri Jan 28, 2011 1:21 pm
by MaestraFénix
AsG1Alligator wrote:Heh... Now i cant compile model...

Studiomdl says:

Code: Select all

GUIStudioMDL 2.2/Source - © 2007 Neil 'Jed' Jedrzejewski - http://www.wunderboy.org/

Loaded QC file - "H:\models_rdy\ragdoll.qc"

Created command line: "E:\Program Files\Steam\steamapps\michalm9\sourcesdk\bin\ep1\bin\studiomdl.exe" -game "e:\program files\steam\steamapps\michalm9\half-life 2 deathmatch\hl2mp" -notxbox H:\models_rdy\ragdoll.qc

qdir:    "h:\models_rdy\"
gamedir: "e:\program files\steam\steamapps\michalm9\half-life 2 deathmatch\hl2mp\"
g_path:  "ragdoll"
Working on "ragdoll.qc"
SMD MODEL H:\models_rdy/ragdoll.smd
SMD MODEL H:\models_rdy/phymodel.smd
ERROR: cannot find bone valvebiped.bip01_head1 for bbox
ERROR: Aborted Processing on 'player\gojira2000costume.mdl'

And there IS bone called ValveBiped.Bip01_head1... I have no idea why it cant find it...
Put the .qc file here. Also, where is the "reference model"?:

Code: Select all

->                                                <-and the model?
SMD MODEL H:\models_rdy/ragdoll.smd
SMD MODEL H:\models_rdy/phymodel.smd

Re: Playermodeling help

Posted: Fri Jan 28, 2011 1:22 pm
by AsG1Alligator
Damn... I didnt notice that it is missing...

Re: Playermodeling help

Posted: Fri Jan 28, 2011 1:32 pm
by AsG1Alligator
Again... If i load the model in hlmv it shows up... But if i put animation mdls into models/player dir (model currently is in hl2dm) and i try to load the model hlmv crashes:


Image

Re: Playermodeling help

Posted: Fri Jan 28, 2011 1:51 pm
by MaestraFénix
2 questions:

You compiled the model with the animations?

You rigged properly the model with the HL2 default skeleton?

Re: Playermodeling help

Posted: Fri Jan 28, 2011 6:16 pm
by AsG1Alligator
Yes I rigged it to HL2 biped bones (although ithey got rotated a bit when checking the rigging)

And yes i added $includemodel lines in qc.

(Physics model is a bit unfitted to the reference model but i dont think thats what causing that problems.)

Code: Select all

$cd "H:\models_rdy"
$surfaceprop "flesh"
$modelname "player\gojira2000costume.mdl"
$model "model" "reference.smd"


$cdmaterials "models\player\gojira2000\"

$hboxset "default"
$hbox 1 "valvebiped.bip01_head1" -1.250  -6.500  -3.190  8.250  3.500  3.310
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000  -2.750  -2.750  12.510  1.750  2.250
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.190  -2.380  13.000  1.810  1.620
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.060  -2.000  -1.500  4.060  1.000  2.500
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000  -3.000  -2.250  12.390  2.000  2.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500  -2.200  -1.550  12.500  1.800  2.450
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.060  -2.000  -2.500  4.060  1.000  1.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000  -3.510  -3.280  15.640  3.490  2.720
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.070  -2.000  -2.840  5.040  5.000  2.160
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000  -3.510  -2.820  15.640  3.490  3.180
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.060  -2.010  -2.280  5.050  4.990  2.720
$hbox 3 "ValveBiped.Bip01_Pelvis" -7.500  -5.500  -6.000  7.500  8.500  5.000
$hbox 2 "ValveBiped.Bip01_Spine2" -2.500  -2.500  -7.000  14.500  7.500  7.000


// Model uses material "body.vmt"
// Model uses material "eyeball_l.vmt"
// Model uses material "eyeball_r.vmt"


$includemodel "player/male_shared.mdl"
$includemodel "player/male_ss.mdl"
$includemodel "player/male_gestures.mdl"
$includemodel "player/male_postures.mdl"
$surfaceprop "flesh"
$eyeposition 0.000 0.000 70.000
$illumposition -22.077 -6.619 40.445
$sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00
$collisionjoints "phymodel.smd" {


	$mass 60.0
	$inertia 10.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "bone01"

	$jointconstrain "valvebiped.bip01_l_thigh" x limit -44.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" y limit -26.00 28.00 366.00
	$jointconstrain "valvebiped.bip01_l_thigh" z limit -70.00 32.00 0.00

	$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" z limit 0.00 61.00 0.00

	$jointconstrain "valvebiped.bip01_r_thigh" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" y limit -21.00 23.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" z limit -61.00 21.00 0.00

	$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" z limit 0.00 55.00 0.00

	$jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" y limit -26.00 30.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" z limit -35.00 44.00 0.00

	$jointconstrain "valvebiped.bip01_spine2" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" y limit -28.00 28.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" z limit -23.00 59.00 0.00

	$jointconstrain "valvebiped.bip01_l_upperarm" x limit -44.00 44.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" z limit -93.00 28.00 0.00

	$jointconstrain "valvebiped.bip01_l_forearm" x limit -39.00 21.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" y limit 1.00 73.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" z limit 0.00 0.00 0.00

	$jointconstrain "valvebiped.bip01_r_upperarm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" y limit -28.00 32.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" z limit -91.00 -26.00 0.00

	$jointconstrain "valvebiped.bip01_r_forearm" x limit -28.00 35.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" y limit -64.00 -21.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" z limit -39.00 50.00 0.00

	$jointconstrain "valvebiped.bip01_r_hand" x limit -26.00 23.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" y limit -21.00 31.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -37.00 78.00 0.00

	$jointconstrain "valvebiped.bip01_head1" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_head1" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_head1" z limit -3.00 17.00 0.00

	$jointconstrain "valvebiped.bip01_l_hand" x limit -28.00 26.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" y limit -30.00 48.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" z limit -39.00 74.00 0.00

	$jointconstrain "valvebiped.bip01_l_foot" x limit -28.00 30.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" y limit -41.00 64.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" z limit -41.00 97.00 0.00
}




Here's the qc file. It may be a bit messed up... i know.

Re: Playermodeling help

Posted: Fri Jan 28, 2011 7:29 pm
by MaestraFénix
Try compiling again without the animations and deleting the hbox set (left only the Hbox default).

Re: Playermodeling help

Posted: Fri Jan 28, 2011 9:27 pm
by AsG1Alligator
OK. It doesn't crash the game now... Collision model sucks and i cant tell if it has anims now but at least it doesnt crash.

EDIT: Correction... I checked the model in thirdperson... It hasn't got animations...

Re: Playermodeling help

Posted: Wed Feb 02, 2011 3:00 pm
by AsG1Alligator
God dammit! I need help with another player model! Again it crashes hlmv when loaded but this time it crashes it without animations as well.


Here's qc file for help:

Code: Select all

$cd "E:\Documents and Settings\110\My Documents\3dsMax\export\drake"
$modelname "player/drake.mdl"
$model "drake" "reference.smd"
	
$cdmaterials "models\player\drake"

$hboxset "default"
$hbox 1 "ValveBiped.Bip01_Head1" -1.250  -6.500  -3.190  8.250  3.500  3.310
$hbox 4 "ValveBiped.Bip01_L_UpperArm" 0.000  -2.750  -2.750  12.510  1.750  2.250
$hbox 4 "ValveBiped.Bip01_L_Forearm" 0.000  -2.190  -2.380  13.000  1.810  1.620
$hbox 4 "ValveBiped.Bip01_L_Hand" 0.060  -2.000  -1.500  4.060  1.000  2.500
$hbox 5 "ValveBiped.Bip01_R_UpperArm" 0.000  -3.000  -2.250  12.390  2.000  2.750
$hbox 5 "ValveBiped.Bip01_R_Forearm" -0.500  -2.200  -1.550  12.500  1.800  2.450
$hbox 5 "ValveBiped.Bip01_R_Hand" 0.060  -2.000  -2.500  4.060  1.000  1.500
$hbox 6 "ValveBiped.Bip01_L_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 6 "ValveBiped.Bip01_L_Calf" 0.000  -3.510  -3.280  15.640  3.490  2.720
$hbox 6 "ValveBiped.Bip01_L_Foot" -1.070  -2.000  -2.840  5.040  5.000  2.160
$hbox 6 "ValveBiped.Bip01_L_Toe0" -0.500  -3.000  -2.190  2.500  0.000  2.460
$hbox 7 "ValveBiped.Bip01_R_Thigh" 0.000  -3.750  -3.250  17.850  3.750  3.250
$hbox 7 "ValveBiped.Bip01_R_Calf" 0.000  -3.510  -2.820  15.640  3.490  3.180
$hbox 7 "ValveBiped.Bip01_R_Foot" -1.060  -2.010  -2.280  5.050  4.990  2.720
$hbox 7 "ValveBiped.Bip01_R_Toe0" -0.500  -3.000  -2.600  2.500  0.000  2.100
$hbox 3 "ValveBiped.Bip01_Pelvis" -7.500  -5.500  -6.000  7.500  8.500  5.000
$hbox 2 "ValveBiped.Bip01_Spine2" -2.500  -2.500  -7.000  14.500  7.500  7.000
// Model uses material "cn_bdy_hdra_0d.vmt"
// Model uses material "cn_wng_hdra_0d.vmt"
// Model uses material "cn_hed_hdra_0d.vmt"
// Model uses material "eyeball_l.vmt"
// Model uses material "eyeball_r.vmt"
// Model uses material "cn_eye_hdra_0d.vmt"
// Model uses material "cn_wng2_hdra_0d.vmt"
// Model uses material "citizen_sheet.vmt"
// Model uses material "glint.vmt"
$attachment "eyes" "ValveBiped.Bip01_Head1" 3.67 -4.32 0.00 rotate 0.00 -80.10 -90.00
$attachment "mouth" "ValveBiped.Bip01_Head1" 1.00 -6.50 -0.00 rotate 0.00 -80.00 -90.00
$attachment "chest" "ValveBiped.Bip01_Spine2" 5.00 4.00 -0.00 rotate -0.00 90.00 90.00
$attachment "forward" "ValveBiped.forward" 0.00 0.00 0.00 rotate 0.00 0.00 -0.00
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" -0.00 -0.00 -0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" -0.00 -0.00 0.00 rotate -90.00 -90.00 0.00
$attachment "anim_attachment_head" "ValveBiped.Bip01_Head1" -0.00 0.00 0.00 rotate -90.00 -90.00 0.00
$includemodel "player/male_shared.mdl"
$includemodel "player/male_ss.mdl"
$includemodel "player/male_gestures.mdl"
$includemodel "player/male_postures.mdl"
$surfaceprop "flesh"
$eyeposition 0.000 0.000 70.000
$illumposition 0.654 0.000 36.127
$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 90.0
	$inertia 10.00
	$damping 0.01
	$rotdamping 1.50
	$rootbone "valvebiped.bip01_pelvis"
	$jointmerge "ValveBiped.Bip01_Pelvis" "ValveBiped.Bip01_Spine1"

	$jointconstrain "valvebiped.bip01_spine2" x limit -48.00 48.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" y limit -25.00 25.00 0.00
	$jointconstrain "valvebiped.bip01_spine2" z limit -25.00 50.00 0.00

	$jointconstrain "valvebiped.bip01_r_upperarm" x limit -39.00 39.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" y limit -79.00 95.00 0.00
	$jointconstrain "valvebiped.bip01_r_upperarm" z limit -93.00 23.00 0.00

	$jointconstrain "valvebiped.bip01_l_upperarm" x limit -30.00 30.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" y limit -95.00 84.00 0.00
	$jointconstrain "valvebiped.bip01_l_upperarm" z limit -86.00 26.00 0.00

	$jointconstrain "valvebiped.bip01_l_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_forearm" z limit -149.00 4.00 0.00

	$jointconstrain "valvebiped.bip01_l_hand" x limit -37.00 37.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_hand" z limit -57.00 59.00 0.00

	$jointconstrain "valvebiped.bip01_r_forearm" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_forearm" z limit -149.00 4.00 0.00

	$jointconstrain "valvebiped.bip01_r_hand" x limit -60.00 60.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_hand" z limit -57.00 70.00 0.00

	$jointconstrain "valvebiped.bip01_r_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" y limit -8.00 75.00 0.00
	$jointconstrain "valvebiped.bip01_r_thigh" z limit -97.00 32.00 0.00

	$jointconstrain "valvebiped.bip01_r_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_calf" z limit -12.00 126.00 0.00

	$jointconstrain "valvebiped.bip01_head1" x limit -20.00 20.00 0.00
	$jointconstrain "valvebiped.bip01_head1" y limit -25.00 25.00 0.00
	$jointconstrain "valvebiped.bip01_head1" z limit -13.00 30.00 0.00

	$jointconstrain "valvebiped.bip01_l_thigh" x limit -12.00 12.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" y limit -73.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_l_thigh" z limit -93.00 30.00 0.00

	$jointconstrain "valvebiped.bip01_l_calf" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" y limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_calf" z limit -8.00 126.00 0.00

	$jointconstrain "valvebiped.bip01_l_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" y limit -19.00 19.00 0.00
	$jointconstrain "valvebiped.bip01_l_foot" z limit -15.00 35.00 0.00

	$jointconstrain "valvebiped.bip01_r_foot" x limit 0.00 0.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" y limit -25.00 6.00 0.00
	$jointconstrain "valvebiped.bip01_r_foot" z limit -15.00 35.00 0.00
	$animatedfriction 1.000 400.000 0.500 0.300 0.000
}
Oh and when compiling it studiomdl spends most time on generating .sw.vtx file