Decompiling and recompiling a viewmodel HELP?

Modelling, Textures, Animating and other general engine asset topics.

Decompiling and recompiling a viewmodel HELP?

Postby nanoxax on Tue Nov 01, 2011 2:20 am

So I wanted to test my hand at some simple animation, I wanted to make a crowbar replacement baseball bat swipe across and hit the target instead of punching the bat at the enemy. I edited the animations and found it to be pretty easy and saved the animations and recompiled and the model could not be seen. While playing with viewmodel_fov I could see that my animation had worked but when viewmodel_fov is used the model is distorted and upside down. I was wondering if this is a common thing that I just couldn't find a fix for. I'm using Fragmotion v1.3 and I'm using the Cannonfodder's Studio Compiler to compile and decompile the models. Maybe there is just something that I didn't check mark that is needed for view models, but I really need help on this! :(
nanoxax
Member
Member
 
Joined: Tue Oct 18, 2011 8:14 pm

Re: Decompiling and recompiling a viewmodel HELP?

Postby Jordash on Tue Nov 01, 2011 6:47 am

There is a bug with the decompile tool which rotates all animations 90 degrees, so it is there, just appearing slightly off screen. add 'rotate -90' at the end of each sequence line in the QC and it will compile with the original rotation.

Before you do that, you could load the model in model viewer, where you could see the animations regardless of the rotation.
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Decompiling and recompiling a viewmodel HELP?

Postby nanoxax on Tue Nov 01, 2011 11:10 am

Here is the mdldecompiler.qc:
Code: Select all
$cd "C:\Program Files\Steam\steamapps\sourcemods\realdeal\models\weapons\crowbar\viewmodel2"
$modelname "Weapons/v_crowbar.mdl"
$model "studio" "bat_reference.smd"

$cdmaterials "models\Weapons\V_hand\"
$cdmaterials "models\Weapons\baseball_bat\"
$hboxset "default"
$hbox 0 "ValveBiped.Bip01_Spine4" 0.000  0.000  -1.938  2.033  1.001  0.000
$hbox 0 "ValveBiped.Bip01_R_UpperArm" -1.763  -2.283  -2.700  11.693  4.552  3.363
$hbox 0 "ValveBiped.Bip01_R_Forearm" -1.958  -3.135  -2.804  11.482  2.550  3.047
$hbox 0 "ValveBiped.Bip01_R_Hand" 0.000  -3.141  -28.731  7.028  0.794  5.355
$hbox 0 "ValveBiped.HandControlRotR" 0.000  -1.935  -15.150  11.123  0.000  0.000
$attachment "0" "ValveBiped.Tip" 0.00 0.00 0.00 rotate -0.00 -0.00 0.00
$surfaceprop "default"
$illumposition 25.227 -9.383 -9.078
$sequence idle01 "idle01" loop ACT_VM_IDLE 1 fps 30.00 rotate -90
$sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 rotate -90
$sequence misscenter1 "misscenter1" ACT_VM_MISSCENTER 1 fps 30.00 rotate -90
$sequence misscenter2 "misscenter2" ACT_VM_MISSCENTER 1 fps 30.00 rotate -90
$sequence hitcenter1 "hitcenter1" ACT_VM_HITCENTER 1 fps 30.00 rotate -90
$sequence hitcenter2 "hitcenter2" ACT_VM_HITCENTER 1 fps 30.00 rotate -90
$sequence hitcenter3 "hitcenter3" ACT_VM_HITCENTER 1 fps 30.00 rotate -90
$sequence hitkill1 "hitkill1" ACT_VM_HITKILL 1 fps 30.00 rotate -90
$sequence holster "holster" ACT_VM_HOLSTER 1 fps 30.00 rotate -90


It still doesn't work...

though I did add it to the reference qc file and compiled that but I only got a blue crowbar instead of the baseball bat I was hoping for...

bat_reference.qc:
Code: Select all
$modelname "crowbar\viewmodel2\v_crowbar"
$scale 1.00
$origin 0 0 68
$cdmaterials "models"

$body "Body" "bat_reference.smd"

$sequence "ACT_VM_IDLE 1" "C:\Program Files\Steam\steamapps\sourcemods\realdeal\models\weapons\crowbar\viewmodel2\idle01.smd" fps 30.000 loop rotate -90

$surfaceprop "metal"

$collisionmodel "C:\Program Files\Steam\steamapps\sourcemods\realdeal\models\weapons\crowbar\viewmodel2\bat_reference.smd" {
   $concave
   $mass 100.000
}
nanoxax
Member
Member
 
Joined: Tue Oct 18, 2011 8:14 pm

Re: Decompiling and recompiling a viewmodel HELP?

Postby Jordash on Tue Nov 01, 2011 11:45 am

I guess it is a problem with your animation. Do the idle animations still act normally? and for your new animations did you use the existing bones?
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Decompiling and recompiling a viewmodel HELP?

Postby nanoxax on Tue Nov 01, 2011 10:17 pm

Ok I found out the problem, rotate -90 doesn't work, but rotate 90 does. Thank you very much for your help!
nanoxax
Member
Member
 
Joined: Tue Oct 18, 2011 8:14 pm

Return to Art Creation

Who is online

Users browsing this forum: No registered users