• MdlDecompiler issues?
    20 replies, posted
Before I enter the world of modelling, I need to sort this issue out. If I take a Valve model, say pistol of the engineer. Use MdlDecompile on it. Then WITHOUT touching any of the files, I use GUIStudio to make the files a MDL again and view it in the model viewer, nothing is there. And When I compiled it in the first place, all I got these errors: [CODE]WARNING: @draw : bounding box out of range : -131025 -130525 -114628 : -9999 -9999 -9999 WARNING: @idle : bounding box out of range : -131023 -130525 -114628 : -9999 -9999 -9999 WARNING: @fire : bounding box out of range : -131023 -130525 -114629 : -9999 -9999 -9999[/CODE]This is before I've even edited the file. I don't stand a chance of modelling weapons if I can't get past this stage. Any ideas?
Did you hex the first line in the MDL from "IDST0" to "IDST," before trying to decompile it?
Yeah. Thats the first thing I do. Maybe this is now it is, but I still don't know how to fix it. I spent hours the other day modifying a gun only to trace back why it didnt show up. I can't seem to get past this first stage.
which engine version did you use? (ep1 2009, orangbox 2007, ect)
Orange box, TF2. The only setting which is defaulted in orange box which is checked is: No Perforce
Wait that error is talking about BBoxes try deleting all hitbox stuff from the qc before compiling it (as its just put there by the decompiler you don't actually need it there, its an automatic thing the compiler does).
I've removed those and here is my QC currently. [CODE]$cd "C:\Users\Redonkulous\Desktop\Pistole\out" $modelname "weapons\v_models\v_pistol_engineer.mdl" $model "v_pistol" "v_pistol_engineer.dmx.smd" $cdmaterials "" $texturegroup skinfamilies { {"models/player/engineer/engineer_red.vmt" "models/player/engineer/engineer_handL.vmt" "models/player/engineer/engineer_handR_red.vmt" } {"models/player/engineer/engineer_blue.vmt" "models/player/engineer/engineer_handL.vmt" "models/player/engineer/engineer_handR_red.vmt" } } $hboxset "default" // Model uses material "models/player/engineer/engineer_red.vmt" // Model uses material "models/player/engineer/engineer_handL.vmt" // Model uses material "models/player/engineer/engineer_handR_red.vmt" // Model uses material "models/weapons/v_pistol/v_pistol.vmt" // Model uses material "models/player/engineer/engineer_blue.vmt" $attachment "weapon_bone" "bip_hand_R" 36.95 23.24 11.64 rotate 10.27 -25.96 -159.94 $attachment "eject_brass" "Gun" 1.01 6.19 3.46 rotate 0.00 44.89 -180.00 $attachment "muzzle" "Gun" 0.00 5.96 9.19 rotate -90.00 -0.00 0.00 $surfaceprop "default" $illumposition 24.039 2.688 -15.444 $sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 node raised { { event 5004 1 "Weapon_Pistol.Draw" } { event 5004 1 "Weapon_Pistol.Draw2" } } $sequence idle "idle" loop ACT_VM_IDLE 1 fps 30.00 node raised $sequence fire "fire" ACT_VM_PRIMARYATTACK 1 fps 30.00 node raised $sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 { { event 5004 14 "Weapon_Pistol.ClipIn" } } [/CODE] After compiling, its still invisible in the model viewer. I've tried centering views, zooming, panning. Its not there, yet I can hear its anims etc.
humm, sounds like a similar problem i've been having with a v_model I decompiled/recompiled, one which unfortunately I have no idea how to fix >.< Also you don't need this stuff: [code]$hboxset "default" // Model uses material "models/player/engineer/engineer_red.vmt" // Model uses material "models/player/engineer/engineer_handL.vmt" // Model uses material "models/player/engineer/engineer_handR_red.vmt" // Model uses material "models/weapons/v_pistol/v_pistol.vmt" // Model uses material "models/player/engineer/engineer_blue.vmt" [/code]
your $cdmaterials isn't pointing anywhere. :v:
I;ve re-done the QC file as you pointed out with the materials. Still empty in model viewer. Not even a model with checkerboxes. I could handle that. Very puzzling & very annoying.
[QUOTE=Naelstrom;24412262]your $cdmaterials isn't pointing anywhere. :v:[/QUOTE] Yea I did notice that but i thought the skins thig might fix it, but now i'm not so sure. Try moving the paths before the materials to the $cdmaterials instead. Edit: Like this [code]$cdmaterials "models/player/engineer/" $cdmaterials "models/weapons/v_pistol/" $texturegroup skinfamilies { { "engineer_red" } { "engineer_blue" } } [/code] (Also fixed some other stuff that was pointless being there.)
Heres my current QC [CODE]$cd "C:\Users\Redonkulous\Desktop\Pistole\out" $modelname "weapons\v_models\v_pistol_engineer.mdl" $model "v_pistol" "v_pistol_engineer.dmx.smd" $cdmaterials "models/player/engineer/" $cdmaterials "models/weapons/v_pistol/" $texturegroup skinfamilies { { "engineer_red" } { "engineer_blue" } } $hboxset "default" // Model uses material "models/player/engineer/engineer_red.vmt" // Model uses material "models/player/engineer/engineer_handL.vmt" // Model uses material "models/player/engineer/engineer_handR_red.vmt" // Model uses material "models/weapons/v_pistol/v_pistol.vmt" // Model uses material "models/player/engineer/engineer_blue.vmt" $attachment "weapon_bone" "bip_hand_R" 36.95 23.24 11.64 rotate 10.27 -25.96 -159.94 $attachment "eject_brass" "Gun" 1.01 6.19 3.46 rotate 0.00 44.89 -180.00 $attachment "muzzle" "Gun" 0.00 5.96 9.19 rotate -90.00 -0.00 0.00 $surfaceprop "default" $illumposition 24.039 2.688 -15.444 $sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 node raised { { event 5004 1 "Weapon_Pistol.Draw" } { event 5004 1 "Weapon_Pistol.Draw2" } } $sequence idle "idle" loop ACT_VM_IDLE 1 fps 30.00 node raised $sequence fire "fire" ACT_VM_PRIMARYATTACK 1 fps 30.00 node raised $sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 { { event 5004 14 "Weapon_Pistol.ClipIn" } } [/CODE] Im going looking into everything I can and I can't work it out.
Try this: [code]$modelname "weapons\v_models\v_pistol_engineer.mdl" $model "v_pistol" "v_pistol_engineer.dmx.smd" $cdmaterials "models/player/engineer/" $cdmaterials "models/weapons/v_pistol/" $texturegroup skinfamilies { { "engineer_red" } { "engineer_blue" } } $attachment "weapon_bone" "bip_hand_R" 36.95 23.24 11.64 rotate 10.27 -25.96 -159.94 $attachment "eject_brass" "Gun" 1.01 6.19 3.46 rotate 0.00 44.89 -180.00 $attachment "muzzle" "Gun" 0.00 5.96 9.19 rotate -90.00 -0.00 0.00 $surfaceprop "default" $illumposition 24.039 2.688 -15.444 $sequence draw "draw" ACT_VM_DRAW 1 fps 30.00 node raised { { event 5004 1 "Weapon_Pistol.Draw" } { event 5004 1 "Weapon_Pistol.Draw2" } } $sequence idle "idle" loop ACT_VM_IDLE 1 fps 30.00 node raised $sequence fire "fire" ACT_VM_PRIMARYATTACK 1 fps 30.00 node raised $sequence reload "reload" ACT_VM_RELOAD 1 fps 30.00 { { event 5004 14 "Weapon_Pistol.ClipIn" } }[/code] If that doesn't work PM me the smds and other files and i'll try and compile it and see what happens.
Im starting to get mad at those threads. Remember the tutorial I posted on your other thread, read it damnit! [URL="http://www.fpsbanana.com/tuts/7316"]Tutorial[/URL]! Decompiling Team Fortress 2 .mdl's that include animations get fucked up. EVERYTIME. No exceptions! You need to copy the .mdl file of the original weapon (here v_pistol_engineer.mdl) rename it to something different and include the animations via $includemodel. More detailed informations in the tutorial.
[QUOTE=murphy7;24413073]Im starting to get mad at those threads. Remember the tutorial I posted on your other thread, read it damnit! [URL="http://www.fpsbanana.com/tuts/7316"]Tutorial[/URL]! Decompiling Team Fortress 2 .mdl's that include animations get fucked up. EVERYTIME. No exceptions! You need to copy the .mdl file of the original weapon (here v_pistol_engineer.mdl) rename it to something different and include the animations via $includemodel. More detailed informations in the tutorial.[/QUOTE] That tutorial looks pretty helpful ^^ But i've not seen it before so I didn't know to link to it :P
I saw that toturial. I can get the model to appear now, but the textures, no. It turns out I had to go into the v_pistol_engineer.smd, find all occurances of [CODE]models/player/engineer/engineer_handL.bmp[/CODE] and replace it with [CODE]engineer_handL.bmp[/CODE] Just to get the arms and hand to show. The gun itself has no texture, just purple checkers. I've modified the smd to point to v_pistol.bmp but that hasn't helped.
Right, I've solved the mystery, to a point. This is what I had to do to get the sniper rifle to work. The tutorial was helpful, but it missed out a point. Every tutorial I've read, it states in the qc file you must add [CODE]$cdmaterials "models/player/sniper/" $cdmaterials "models/weapons/v_sniperrifle/"[/CODE] instead of leaving this empty. And it was only today when I thought about it logically, that its wrong. The SMD contains the location of the texture. [CODE]models/weapons/v_sniperrifle/sniper_handL_red.bmp[/CODE] But by modifying the qc file as EVERYONE has to told me I must do, it works out the model is looking in: [CODE]models/weapons/v_sniperrifle/models/weapons/v_sniperrifle/sniper_handL_red.bmp[/CODE] Which of course is wrong. I'm just pointing this out to show other people if they get in the same issue as me. I think that tutorial could go into more depth. You only need v_sniperrifle_sniper.dmx.smd & mdldecompiler.qc to compile it if your referencing another file. Not the other 20. Also, remember, if you are deleing scopes etc, you must remove the bone and not leave it there. Although when I tested in game the scope was gone, it left a weird stretch effect to the gun. Hope this helps someone. I'm about to try this on other weapons to get it down right.
Ok this is driving me insane. I've got a new issue. Say I have the frontier justice model. If I create anything, box, sphere, whatever and hover it above the gun, how can I get that to appear in game? I've tried linking, using bones, using skins. The only way of doing it is editing the mesh and attaching my gun to the object. But thats not an option as it severely screws up my UVW map. 5 hours ive spent trying to solve this now and I've all but given up hope.
assign a skin modifier to your sphere, assign the bone you want it to follow to it.
I found the problem but have no solution. thanks for the tip btw, I did try it before im sure but it worked..however. Is it possible for a weapon model to refer to not one but 2 vtfs? So the gun would be th standard c_frontierjustice01.vmt and my addon would be another? I've been trying for hours. I made the model point to my new vtf. But soon as I place a vtf in the c_items directory and refresh the model viewer, my attachment (which had no texture pink checkers on it before) VANISHES! I'm at a loss.
Chnage the shader from whatever it is to "VertexLitGeneric" in the VMT, that usually fixes the inivisible problem.
Sorry, you need to Log In to post a reply to this thread.