Difference between revisions of "How to Make Custom c arms for Custom Model"

From Sunrust Wiki
Jump to navigation Jump to search
m ([WIP][Editing])
m
Line 11: Line 11:
[https://steamcommunity.com/groups/CrowbarTool Crowbar]<br>
[https://steamcommunity.com/groups/CrowbarTool Crowbar]<br>
Unzip using 7zip.<br>
Unzip using 7zip.<br>
It is recommended to go through the tutorials on these addons before proceeding down this guide.
It is recommended to go through the tutorials on these addons before proceeding down this guide.<br>
[https://www.youtube.com/watch?v=8XyIYRW_2xk Blender Tutorial Video]


== Blender Setup ==
== Blender Setup ==
Line 25: Line 26:
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin\gmad.exe<br>
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin\gmad.exe<br>
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons<br>
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons<br>
Run gmad.exe and drag the .gma file into gmad.exe window. A new folder would be created.<br>
Run gmad.exe and drag the .gma file into gmad.exe window. A new folder would be created.[https://gist.github.com/BadgerCode/00600eab40556c6e8809590d263ea053#:~:text=C%3A%5CProgram%20Files%20(x86,GarrysMod%5Cbin%5Cgmad.exe][https://steamcommunity.com/sharedfiles/filedetails/?id=431638110]<br>
Open Crowbar > Decompile tab > In MDL input, Browse for .mdl in the recently created folder. In Output to, set the Work folder. > Click Decompile
Open Crowbar > Decompile tab > In MDL input, Browse for .mdl in the recently created folder. In Output to, set the Work folder. > Click Decompile



Revision as of 09:10, 18 May 2021

Step by Step Guide to Making a Custom c_arms for a Custom Model

By Clamcy

Installation - What you will need to have for this guide

Blender 2.79
Do make sure to check the Requirements
Blender Source Tools 2.10.2
There is no need to unzip this.
VTFEdit
c_arms Model
Crowbar
Unzip using 7zip.
It is recommended to go through the tutorials on these addons before proceeding down this guide.
Blender Tutorial Video

Blender Setup

Open Blender
Go to File > User Preferences... > Add-ons > Install Add-on from File...
Find and Click on Blender Source Tools 2.10.2
Tick the box, Save User Settings and Close Blender User Preferences

Getting the Model File from Addons

If you have not, Open Steam > Library > Garry's Mod > Workshop > Search for a Model > Subscribe to the Addons
https://www.youtube.com/watch?v=Oet1SJ3yhE0
Watch this video as a reference but it might be outdated or not the optimized way.
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\bin\gmad.exe
C:\Program Files (x86)\Steam\steamapps\common\GarrysMod\garrysmod\addons
Run gmad.exe and drag the .gma file into gmad.exe window. A new folder would be created.[1][2]
Open Crowbar > Decompile tab > In MDL input, Browse for .mdl in the recently created folder. In Output to, set the Work folder. > Click Decompile


Model Importation

Open Blender > File > Import > Source Engine > Go to the Work Folder path > Click on ref.smd file > Import SMD/VTA, DMX, QC

Amiya model

List of bones

Next is to delete some of the bones.

Here is the list of the bones that you shouldn’t delete:

Skeleton Example

Deleting the body

After that starts deleting the body but keeps the arms.

Example of hands model.

After that make sure the pose the arms if there are rigging issues

Miku Hands

Next, export your c_arms and then open the c_arms blend

If you see this text screen it’s found click the

text editor.

and then change it into 3d view

Miku hands and skeleton we will use.

As you can see there are the skeleton arms we will use for our custom c_arms

Posing and applying Miku's skeleton to custom arms

Pose your arms in the same pose as the miku_append_reference don’t worry to get a perfect size just pose it the same pose as the miku_append_reference arms model.
Amiya hands posing with Miku hands

After that, you need to apply the armature or change the object into to miku_append_reference skeleton

Armature modifier

And then select your custom skeleton and also the custom c_arms and then press space, search apply object transform this is to make sure to not make the model come back to their original position and check all the little box in your bottom left screen.

Object property

Select your mesh and go to edit, if it’s back to its original position then you need to redo the process of applying the object transform

After that delete the miku_append_reference mesh and also your custom skeleton, and then try to pose your arms to see if it’s a problem.

IMPORTANT pose your model before export.

To reset the rotation, scale, and position, press alt+r to reset the rotation, alt+g reset location, alt+s reset scale. Go to pose mode, select all press A, and then set the start frame to 0, end to 1, and current frame to 0. Press I and click LocRotScale go to the Miku skeleton that we just use and then rename it to idle.

Item property

Hit export

QC

	Next, open your qc and type this as the following.

$modelname "path_name\name_of_mdl.mdl"

$bodygroup "hands" { studio "Model_name.dmx/smd" }


$surfaceprop "flesh"

$contents "solid"

$cdmaterials "material_path"

$sequence "idle" "anims\idle.dmx" { fps 30 }

$includemodel "weapons/c_arms_animations.mdl"

Example:

$modelname "amiya\arknights\clancy\arms\amiya_arms.mdl"

$bodygroup "hands" { studio "Amiya_Arms.dmx" }


$surfaceprop "flesh"

$contents "solid"

$cdmaterials "model\amiya\arknights\clancy\"

$sequence "idle" "anims\idle.dmx" {

fps 30 }

$includemodel "weapons/c_arms_animations.mdl"

Crowbar

After that open crowbar go to compile Click Qc input, search your qc and done. And then Output change it to subfolder and compile

Crowbar

After compiling click Use in View and view your arms.

Compiling model with crowbar

After that click options and center view, next, go to sequence and change the animation that you prefer

Animation test in HLMV

Ok, almost there but we need to do some Lua so create a Lua file and copy this code in your Lua file

Lua

In the Lua file copy and paste this code to your Lua file and make sure to save it!

player_manager.AddValidHands( "Name your model what you want", "path/mdl_name.mdl", 0, "00000000" )

Example: player_manager.AddValidHands( "Arknights - Amiya", "models/amiya/arknights/clancy/arms/amiya_arms.mdl", 0, "00000000" )

Example folder path

After that you want to organize your folder something like this, make sure the folder is in the correct path otherwise the engine will not read it.

Folder example

Example:

$modelname "amiya\arknights\clancy\arms\amiya_arms.mdl"

Folder path example.

So the Lua folder is where is the Lua file located, the materials folder where is the textures and materials or Vtf and Vmt, and the models where is your model is located.

Run Gmod

Ok, copy your folder into the steam\steamapps\common\GarrysMod\garrysmod\addons and paste it run the game, and enjoy! ^-^