View model at wrong angle after recompile

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

View model at wrong angle after recompile

Postby Gary on Tue Nov 16, 2010 12:12 am

Okay, I needed to recompile the Ar2 model with some edits to the .qc, my edits don't appear to be the problem, it seems to do this even without modification to the .qc

Anyway, it seems that the reason my model doesn't show up in game or in the model viewer's "view model" mode is because the model somehow moved is now out of the camera's view. I can see it fine when in the "Center model" mode in the model viewer.

QC
Code: Select all
$cd "C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile"
$modelname "weapons/v_IRifle.mdl"
$model "studio" "IRifle_reference.smd"
$poseparameter VentPoses 0.00 1.00
$cdmaterials "models\Weapons\V_hand\"
$cdmaterials "models\Weapons\V_irifle\"
$hboxset "default"
$hbox 0 "Base" -6.133  -9.432  -8.556  5.653  5.246  26.734
$hbox 0 "Shell1" -0.614  -0.613  -1.121  0.613  0.615  0.727
$hbox 0 "Shell2" -0.605  -0.624  -1.123  0.622  0.604  0.725
// Model uses material "V_IRifle.vmt"
// Model uses material "v_hand_sheet.vmt"
// Model uses material "V_IRifle_core.vmt"
$attachment "muzzle" "Base" 0.00 0.00 20.00 rotate -90.00 0.00 0.00
$attachment "1" "Shell1" 0.00 0.00 0.00 rotate 0.00 0.00 0.00
$surfaceprop "default"
$illumposition 20.728 -6.084 -7.257
$sequence IR_idle "IR_idle" loop ACT_VM_IDLE 1 fps 30.00 node Ready
$sequence IR_fire "IR_fire" ACT_VM_PRIMARYATTACK 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "COMBINE MUZZLE" }
}

$sequence fire2 "fire2" ACT_VM_RECOIL1 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "COMBINE MUZZLE" }
}

$sequence fire3 "fire3" ACT_VM_RECOIL2 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "COMBINE MUZZLE" }
}

$sequence fire4 "fire4" ACT_VM_RECOIL3 1 fps 30.00 node Fire {
  { event AE_MUZZLEFLASH 0 "COMBINE MUZZLE" }
}

$sequence IR_fire2 "IR_fire2" ACT_VM_SECONDARYATTACK 1 fps 30.00 {
  { event AE_MUZZLEFLASH 0 "COMBINE MUZZLE" }
}

$sequence IR_reload "IR_reload" ACT_VM_RELOAD 1 fps 60.00 node Ready {
  { event AE_CL_PLAYSOUND 1 "Weapon_AR2.Reload_Rotate" }
  { event AE_CL_PLAYSOUND 19 "Weapon_AR2.Reload_Push" }
  { event 6001 5 "3" }
}

$sequence IR_draw "IR_draw" ACT_VM_DRAW 1 fps 30.00 node Ready
$sequence IR_holster "IR_holster" ACT_VM_HOLSTER 1 fps 30.00 node Ready
$sequence idletolow "idletolow" ACT_VM_LOWERED_TO_IDLE 1 fps 30.00 transition Ready Low
$sequence lowtoidle "lowtoidle" ACT_VM_IDLE_TO_LOWERED 1 fps 30.00 transition Low Ready
$sequence lowidle "lowidle" loop ACT_VM_IDLE_LOWERED 1 fps 30.00 node Low
$sequence shake "shake" loop ACT_VM_FIDGET 1 fps 30.00 node Fire
$animation mdldecompiler_delta.smd "mdldecompiler_delta.smd" fps 30
$animation a_vent_open "a_vent_open" fps 30.000000 subtract mdldecompiler_delta.smd 0

$animation a_vent_closed "a_vent_closed" fps 30.000000 subtract mdldecompiler_delta.smd 0

$sequence VentPoses "a_vent_open" fps 30.00 {
  blendwidth 2
  blend VentPoses 0.000000 1.000000
  delta
  autoplay
 a_vent_closed
}



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

Created command line: "C:\Program Files\Steam\SteamApps\gjsdeath\sourcesdk\bin\source2007\bin\studiomdl.exe" -game "c:\program files\steam\steamapps\SourceMods\shadow_map_fix" -verbose -notxbox "C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile\mdldecompiler.qc"

WARNING: AppFramework : Unable to load module p4lib.dll!
qdir:    "c:\program files\steam\steamapps\sourcemods\garysmodbase\models\weapons\decomp\irfile\"
gamedir: "c:\program files\steam\steamapps\SourceMods\shadow_map_fix\"
g_path:  "C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile\mdldecompiler.qc"
Building binary model files...
Working on "mdldecompiler.qc"
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IRifle_reference.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IR_idle.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IR_fire.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/fire2.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/fire3.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/fire4.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IR_fire2.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IR_reload.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IR_draw.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/IR_holster.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/idletolow.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/lowtoidle.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/lowidle.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/shake.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/mdldecompiler_delta.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/a_vent_open.smd
SMD MODEL C:\Program Files\Steam\SteamApps\sourcemods\garysmodbase\models\weapons\decomp\irfile/a_vent_closed.smd
---------------------
writing c:\program files\steam\steamapps\SourceMods\shadow_map_fix\models/weapons/v_IRifle.mdl:
bones         3236 bytes (10)
   animation       x       y       ips    angle
    @IR_idle    0.00    0.00 :    0.00 (  90.00) 5.0
    @IR_fire    0.00    0.00 :    0.00 (  90.00) 0.2
      @fire2    0.00    0.00 :    0.00 (  90.00) 0.2
      @fire3    0.00    0.00 :    0.00 (  90.00) 0.2
      @fire4    0.00    0.00 :    0.00 (  90.00) 0.2
   @IR_fire2    0.00    0.00 :    0.00 (  90.00) 0.7
  @IR_reload    0.00    0.00 :    0.00 (  90.00) 0.8
    @IR_draw    0.00    0.00 :    0.00 (  90.00) 0.9
 @IR_holster    0.00    0.00 :    0.00 (  90.00) 0.3
  @idletolow    0.00    0.00 :    0.00 (  90.00) 0.6
  @lowtoidle    0.00    0.00 :    0.00 (  90.00) 0.6
    @lowidle    0.00    0.00 :    0.00 (  90.00) 2.0
      @shake    0.00    0.00 :    0.00 (  90.00) 1.0
mdldecompiler_delta.smd    0.00    0.00 :    0.00 (  90.00) 0.0
 a_vent_open    0.00    0.00 :    0.00 (  90.00) 0.0
a_veD #}Y@nt_closed    0.00    0.00 :    0.00 (  90.00) 0.0
animations    6172 bytes (16 anims) (426 frames) [0:13]
sequences     3740 bytes (14 seq)
ik/pose        184 bytes
eyeballs         0 bytes (0 eyeballs)
flexes           0 bytes (0 flexes)
textures       208 bytes
keyvalues        0 bytes
bone transforms     1424 bytes
collision        0 bytes
total        16040
---------------------
writing c:\program files\steam\steamapps\SourceMods\shadow_map_fix\models/weapons/v_IRifle.vvd:
vertices    100080 bytes (2085 vertices)
tangents     33360 bytes (2085 vertices)
total       133504 bytes
---------------------
Generating optimized mesh "c:\program files\steam\steamapps\SourceMods\shadow_map_fix\models/weapons/v_IRifle.sw.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:            27 bytes
strip groups:      75 bytes
strips:            81 bytes
verts:          18765 bytes
indices:        11700 bytes
bone changes:       8 bytes
everything:     30720 bytes
---------------------
Generating optimized mesh "c:\program files\steam\steamapps\SourceMods\shadow_map_fix\models/weapons/v_IRifle.dx80.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:            27 bytes
strip groups:      75 bytes
strips:            81 bytes
verts:          18765 bytes
indices:        11700 bytes
bone changes:     104 bytes
everything:     30816 bytes
---------------------
Generating optimized mesh "c:\program files\steam\steamapps\SourceMods\shadow_map_fix\models/weapons/v_IRifle.dx90.vtx":
body parts:         8 bytes
models:            20 bytes
model LODs:        12 bytes
meshes:            27 bytes
strip groups:      75 bytes
strips:            81 bytes
verts:          18765 bytes
indices:        11700 bytes
bone changes:     104 bytes
everything:     30816 bytes

Completed "mdldecompiler.qc"



Hopefully someone here can help.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: View model at wrong angle after recompile

Postby crazycarl on Tue Nov 16, 2010 3:07 am

MDLDecompiler likes to move and rotate models. You may just need to reposition each animation so that it sits in the right place.
crazycarl
Been Here A While
Been Here A While
 
Joined: Tue Jan 12, 2010 9:12 pm

Re: View model at wrong angle after recompile

Postby Gary on Tue Nov 16, 2010 3:09 am

Say what... please say I can do the rotation changes with a text editor...
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: View model at wrong angle after recompile

Postby Jike on Tue Nov 16, 2010 2:11 pm

you can. just add rotate to the $sequence options

Code: Select all
$sequence fuck "bitch.smd" rotate 0 0 90
-Jike
Image
Image
Jike
1337 p0st3r
1337 p0st3r
 
Joined: Mon Feb 08, 2010 6:58 pm

Re: View model at wrong angle after recompile

Postby Gary on Tue Nov 16, 2010 3:38 pm

Thanks, I'll try that when I get home.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: View model at wrong angle after recompile

Postby Gary on Tue Nov 16, 2010 10:20 pm

Got it to work in game. Though, because it has been rotated, it's kinda off, it needs to be moved slightly forward and to the right to avoid seeing the missing faces. Any commands to do this in the QC?
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: View model at wrong angle after recompile

Postby Jike on Wed Nov 17, 2010 2:36 pm

uh; I wouldn't know how to do that :/

must be the root of the animation... so either theres some command I dont know about or youll have to edit the animation...
-Jike
Image
Image
Jike
1337 p0st3r
1337 p0st3r
 
Joined: Mon Feb 08, 2010 6:58 pm

Re: View model at wrong angle after recompile

Postby Gary on Wed Nov 17, 2010 5:02 pm

I'll look into it some more, thanks for your help.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: View model at wrong angle after recompile

Postby Mr. Happy on Sat Nov 20, 2010 2:49 pm

$origin "x y z"

will shift the origin in local space.
Image
-You've just been happified!?
User avatar
Mr. Happy
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sat Dec 30, 2006 9:20 am
Location: Flyin' thru "da cloud" in the MotherShip

Re: View model at wrong angle after recompile

Postby Gary on Sat Nov 20, 2010 6:45 pm

Thanks!
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: View model at wrong angle after recompile

Postby Gary on Sat Nov 20, 2010 11:59 pm

"Line is incomplete"

I look it up and saw that this was it's syntax:

Code: Select all
$origin <x> <y> <-z> [z rotation]


What value do I put for z rotation?
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users

cron