Compiled model is screwed up

Got problems with your models? Struggling with textures? Get help with your custom assets.

Compiled model is screwed up

Postby Beerdude26 on Wed Apr 23, 2008 10:47 am

Hi everyone, I've got a bit of a problem, a model I decompiled and recompiled (to remove some animations) has been twisted around. Here's an image (HL Model Viewer):

Image

When it compiled, it created six files which I placed in the correct game folder.

QC File:
Code: Select all
$modelname "models\nf_scoutRifle2.mdl"
$model "studio" "reference.smd"
$cdmaterials "\"
$cdmaterials "models\scoutRifle2"
$cdmaterials "NF\Characters\"
$cdmaterials "NF\Weapons\v\"
$cdmaterials "NF\Characters\GI\"
$hboxset "default"
$hbox 0 "Bip01 L UpperArm" 0.000 -1.688 -2.592 13.095 2.250 2.172
$hbox 0 "Bip01 L Forearm" -3.285 -2.087 -2.592 13.871 2.177 1.990
$hbox 0 "Bip01 L Hand" -1.314 -1.232 -2.836 7.180 2.616 2.673
$hbox 0 "Bip01 L Finger0" -1.131 -1.085 -1.092 1.807 1.331 1.337
$hbox 0 "Bip01 L Finger01" -1.297 -0.560 -0.786 1.481 1.047 0.871
$hbox 0 "Bip01 L Finger02" -0.581 -0.606 -0.485 1.304 0.446 0.542
$hbox 0 "Bip01 L Finger1" -0.892 -0.480 -0.713 1.556 1.034 0.770
$hbox 0 "Bip01 L Finger2" -0.427 -0.557 -0.666 2.046 0.919 0.670
$hbox 0 "Bip01 L Finger3" -0.644 -0.541 -0.663 1.897 0.659 0.560
$hbox 0 "Bip01 L Finger4" -0.579 -0.397 -0.492 1.793 0.776 0.550
$hbox 0 "Bip01 R UpperArm" 0.000 -1.672 -2.172 13.087 2.264 2.592
$hbox 0 "Bip01 R Forearm" -3.251 -2.119 -1.990 13.924 2.204 2.592
$hbox 0 "Bip01 R Hand" -1.475 -1.256 -2.696 7.245 2.818 2.973
$hbox 0 "Bip01 R Finger0" -1.338 -0.880 -1.352 1.807 1.527 1.292
$hbox 0 "Bip01 R Finger01" -1.109 -0.557 -1.040 1.237 1.175 0.780
$hbox 0 "Bip01 R Finger02" -0.675 -0.569 -0.574 1.296 0.465 0.482
$hbox 0 "Bip01 R Finger1" -0.798 -0.426 -0.760 1.556 0.939 0.630
$hbox 0 "Bip01 R Finger2" -0.676 -0.612 -0.755 1.747 0.752 0.680
$hbox 0 "Bip01 R Finger3" -0.856 -0.621 -0.673 1.519 0.658 0.665
$hbox 0 "Bip01 R Finger4" -0.663 -0.447 -0.602 1.854 0.662 0.491
$hbox 0 "Magazine" -5.774 -0.787 -3.750 0.000 0.787 0.000
$hbox 0 "ScoutRifle" -25.029 -1.547 -6.281 15.111 1.197 2.578
$hbox 0 "BoltAction" -4.687 -0.488 -0.356 0.666 2.194 0.806
// Model uses material "nf_1p.vmt"
// Model uses material "nf_scoutRifle2.vmt"
// Model uses material "bullet.vmt"
// Model uses material "scopeGlass.vmt"
$attachment "MUZZLE" "MuzzleFlash" 0.00 -0.00 0.00 rotate -0.00 -90.00 -180.00
$surfaceprop "default"
$illumposition 6.100 0.300 -27.600
$sequence idle "idle" ACT_VM_IDLE 1 fps 30.00
$sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 {
{ event AE_CL_PLAYSOUND 3 "NF_scout.boltup" }
{ event AE_CL_PLAYSOUND 8 "NF_scout.ejectshell" }
{ event AE_CL_PLAYSOUND 33 "NF_50cal.clipout" }
{ event AE_CL_PLAYSOUND 62 "NF_50cal.clipin" }
{ event AE_CL_PLAYSOUND 90 "NF_scout.boltdown" }
}

$sequence draw "draw" ACT_VM_DRAW 1 fps 30.00
$sequence draw_empty "draw_empty" ACT_VM_DRAW_EMPTY 1 fps 30.00
$sequence shoot1 "shoot1" ACT_VM_PRIMARYATTACK 1 fps 25.00 {
{ event AE_MUZZLEFLASH 0 "357 MUZZLE" }
{ event AE_CL_PLAYSOUND 16 "NF_scout.boltup" }
{ event AE_CL_PLAYSOUND 20 "NF_scout.ejectshell" }
{ event AE_CL_PLAYSOUND 24 "NF_scout.boltdown" }
}

$sequence shoot2 "shoot2" ACT_VM_PRIMARYATTACK 1 fps 25.00 {
{ event AE_MUZZLEFLASH 0 "357 MUZZLE" }
{ event AE_CL_PLAYSOUND 16 "NF_scout.boltup" }
{ event AE_CL_PLAYSOUND 20 "NF_scout.ejectshell" }
{ event AE_CL_PLAYSOUND 24 "NF_scout.boltdown" }
}

$sequence shoot3 "shoot3" ACT_VM_PRIMARYATTACK 1 fps 25.00 {
{ event AE_MUZZLEFLASH 0 "357 MUZZLE" }
{ event AE_CL_PLAYSOUND 16 "NF_scout.boltup" }
{ event AE_CL_PLAYSOUND 20 "NF_scout.ejectshell" }
{ event AE_CL_PLAYSOUND 24 "NF_scout.boltdown" }
}
// [b]Note: this is the animation I wanted gone[/b]
//$sequence chamber_round "chamber_round" ACT_VM_DRYFIRE 1 fps 25.00 {
// { event AE_CL_PLAYSOUND 16 "NF_scout.boltup" }
// { event AE_CL_PLAYSOUND 20 "NF_scout.ejectshell" }
// { event AE_CL_PLAYSOUND 24 "NF_scout.boltdown" }
//}

$sequence iron_idle "iron_idle" ACT_VM_IDLE_1 1 fps 30.00
$sequence to_iron "to_iron" ACT_VM_ATTACH_SILENCER 1 fps 40.00
$sequence from_iron "from_iron" ACT_VM_DETACH_SILENCER 1 fps 40.00
$sequence shoot1_iron "shoot1_iron" ACT_VM_SECONDARYATTACK 1 fps 30.00 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "SHELLEJECT" }
}

$sequence shoot2_iron "shoot2_iron" ACT_VM_SECONDARYATTACK 1 fps 30.00 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "SHELLEJECT" }
}

$sequence shoot3_iron "shoot3_iron" ACT_VM_SECONDARYATTACK 1 fps 30.00 {
{ event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
{ event 6001 0 "SHELLEJECT" }
}


Anyone know why it's been twisted 90°?

EDIT: This guy appears to have had the same problem, but none of the suggestions worked for me:
viewtopic.php?f=14&t=23498

I have the same problem as the original poster in that thread; it just stops compiling because it thinks the rotational values are files.

Code: Select all
qdir:    "c:\games\steam\steamapps\beerdude26@hotmail.com\sourcesdk_content\hl2\modelsrc\weapons\scoutrifle2\"
gamedir: "c:\games\steam\steamapps\beerdude26@hotmail.com\half-life 2\hl2\"
g_path:  "mdldecompiler"
Working on "mdldecompiler.qc"
SMD MODEL reference.smd
SMD MODEL idle.smd
SMD MODEL reload.smd
SMD MODEL draw.smd
ERROR: c:\games\steam\steamapps\beerdude26@hotmail.com\sourcesdk_content\hl2\modelsrc\weapons\scoutrifle2\mdldecompiler.qc(48): - could not load file '-90.00'
ERROR: Aborted Processing on 'models\nf_scoutRifle2.mdl'


EDIT 2: Ok, it is possible to use the rotate command, but only on one axis; if you put for example "rotate 90", it'll work, but if you put "rotate 90 0 0", it won't. Rather annoying.

Add to that the fact that the entire viewmodel is rotating, including the hands. I just want to rotate the rifle.

EDIT 3: Ingame I also get the following error:

[SNIP]
Spawn Server emp_escort
This map is not final!! Needs to be rebuilt without -keepstalezip and without -onlyents
Begin loading faces (loads materials)
End loading faces (loads materials)
L 04/24/2008 - 15:25:48: Started map "emp_escort" (CRC "-1535134890")
couldn't exec skill1.cfg
Executing listen server config file
Error Vertex File for 'models\nf_scoutRifle2.mdl' not found
couldn't exec listenserver.cfg
[SNIP]

Anyone know how this error is caused?
EDIT: Well, this problem was caused by a wrongly-typed folder in the QC file.

EDIT: This is now fixed. Using Cannonfodder's decompiler, it had "Do not fix rotations" off by default. That had to be on.
Beerdude26
Dumpling
Dumpling
 
Joined: Sun Jul 16, 2006 4:21 pm

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users