Turning viewmodels to c_models (NOT SWEPS)

Making a c_model out of a viewmodel for a swep is okay, but I’m not making a lua swep, I’m not even making an all-new weapon.

What I want to do is convert the Cinematic Mod weapons, which are all v_models, into c_models, for viewmodel hands. Since a) some of the CM weapons are radically different from the vanilla, and b) these are not sweps, I’m not sure how much the existing documentation (which regards lua sweps) holds up. How did Garry turn the hl2 weapons from v/w models to c/w models? Is it going to be harder for me than the typical swep? What do I need?

It’s a bit tricky depending on the model. You should be able to just delete the hands mesh and be done with it. if you got flipped fingers and such, then it’s a bit more tricky.

You don’t need c_models for sweps. although it’s nice to have.

What programs are often used to remove the arms then? And did Garry just remove the arms for the hl2 weapons and almost “be done with it”?

you can actually do it with a text editing program.

Assuming you used crowbar to decompile the model, open it up in wordpad and find something like this.


armtexturenamehere.tga
 12   4.8591  70.8289   3.4629   0.1868   0.7012   0.6881   0.2386   0.6260 1 12 1.000
 12   3.9251  70.8605   3.6168   0.1659   0.2156   0.9623   0.3921   0.6667 1 12 1.000
 12   3.6016  69.8393   3.9014   0.3065  -0.0520   0.9505   0.4266   0.4346 1 12 1.000

You simply find all instances of the mesh with the arm texture name, and delete all that. It should keep the rigging or the rest of the model, but ditch the arms.

Okay, I’ll see about that.

P.S. Not removing the arms first would create some freakish hybrid of their arms and mine, right?

Yeah, it renders both models at the same time :stuck_out_tongue:

Hiho!
First my english is bad. I’m sorry.

The easiest way is to replace the hands texture with a, lets say nodraw texture. After that give it the same name/s as the original/s texture/s and put then in the same materal folder to overwrite them.

If you won’t overwrite the original files, create a hexed model with a new materail path and use the nodraw texture.

To create a hexed model make a copy of the model (all 6 files) and save it with a new name. After that open the mdl file and go far to the right and look for the material path.
Change the name of the material folder in what you want BUT use the same amount of letters as the original like:

“models\weapons\rifle” to --> “models\weapons\rfgun”
rifle = 5 letters
rfgun = 5 letters

Now create that material folder and put all textures in there + your nodraw texture that overwrite the original hands mesh.

And here is a thread where i helped to create c_models maybe that can help to:
http://forum.facepunch.com/showthread.php?t=1390722

Ok i think thats all. I hope i could help here, if you have some more question about that stuff, i will try to help. :slight_smile:

Here’s one I did, I think I literally just deleted the mesh except the bones and put my model where i wanted it.

http://puu.sh/8TdLz.jpg

I have a different problem now; while trying to test in advance whether turning one of the CM v_models into a c_model would work, using Crowbar, I found that when I tried to see them in Gmod, there was only the default hl2 weapons, yet when I try to poke through with hlmv, the CM weapon model is there and fine.

I remembered that Shell (who made the CM 12 pack for Gmod) had a similar problem, where the CM weapon models didn’t actually show up in the game after an update back in 2013.

Oh, and I just replaced every v in the v_model qc files and related with a c. What do you think (I haven’t gotten to actually removing the arms, I’ll get there after I get everything else going smoothly)?

the default content is most likely overriding your custom content.

Crap. If I can’t find any workaround, then my efforts will just get thrown out the window…

Hiho!

If you create the folder structure in the main directory of your game than it overwrite the default content always. Only in some game like Portal2 you need to create a vpk but in gmod you can ovwrite ALL content if you did that.

Well the good news is it works offline… I’ll see about ONline…

EDIT: works online too… how the hell? I’ll try and bring the rest in to make sure it’s not an aberration. Gonna take some time though.

Also, I earlier tried to stick the models in the custom folder like I would in the Valve games, but then switched to the main ones.

Alright, now that I got it working, now let’s get to the arms…

EDIT: I don’t know what rigging FakeFactory used, but it’s all completely unorthodox, and invalidates using gmod arms without intensive re-rigging (that is beyond me). Oh well, I suppose metal fisticuffs will do. At least I managed to get some CM weapons onto my Gmod…

another hacky way to do it without decompiling is edit the hands texture and add either


$no_draw 1

or


$nodraw 1

I forget which one it was specifically.

You can actually quickly convert things into c_models by renaming some bones and then forcing the c_hands model to draw for all non-SWEP weapons.