banner



How To Do The Cs Go Weapon Animation

Yous've fabricated an blitheness, but it's important to ensure information technology looks right in-game.

  • In the default folder, find mdldecompiler.qc and re-create and paste it to the tocompile binder.
  • Supercede the first line in the new mdldecompiler.qc with this:
$cd ".\"        

This tells the compiler to look in the current directory for the SMD files.

Note:
The idle animation is non as long as the other animations. For this reason y'all will demand to temporarily adjust the timing of the sounds so they do non play at a nonexistent frame.

Adjusting the Timing of the Sounds [edit | edit source]

  • Find a line that begins similar this:
{ event 5004        
  • After 5004 you volition see a number. Change the number to a number from 0 to 15 for each line. A number from 0 to fifteen is used considering the idle animation goes from frame 0 to frame fifteen.
  • Save the QC file. Do not close it yet.

Copying and Pasting Animations [edit | edit source]

  • Count how many times $sequence is typed in QC file.
  • Subtract one (for the idle blitheness.)
  • Copy and paste idle.smd that many times.
  • Rename the SMD files to whatsoever word comes later $sequence in the QC file. (e.g. shoot1, reload, draw)
  • Save the QC file. Practise not close it withal.

Converting the Textures to Targa Format [edit | edit source]

  • If your textures are already in TGA format skip this.
  • Open IrfanView.
  • Open each texture.
  • Go to File>Salve every bit and salvage equally a Targa (.TGA) file.
  • Put these Targa files in a binder called lr300.

Notation:
If you are animating a different weapon make the binder name meaningful.

  • Brand a .bat (text) file with the following code:
cd %sourcesdk% cd ..\ cd .\counter-strike source\cstrike\materials\models\weapons\v_models\ start .\        
  • Execute the batch file. At present you will meet your materials folder for showtime person view models. Go along this folder open for later.

Converting the Textures to VTF Format [edit | edit source]

  • Find vtex.exe. Is located in %sourcesdk%\bin\ep1\bin\
  • Make a new text file somewhere (with .bat at the end) and write the consummate location of vtex.exe in quotes in the first line of the batch file. At present edit it is similarly to the post-obit:
cd .\ "C:\Program Files\Steam\steamapps\username\sourcesdk\bin\ep1\bin\vtex.exe" -shader VertexLitGeneric .\*.tga        
  • Save it in the lr300 folder.
  • Motion the lr300 folder to
\your username\sourcesdk_content\cstrike\materialsrc\models\weapons\v_models\        
  • Double click the batch file and the window opened earlier should take a folder called lr300 with the textures and VMT files in information technology.

Finalizing the QC [edit | edit source]

  • Open the QC file if information technology is not open already.
  • Detect all of the lines that begin with $hbox. Delete them.
  • There should all the same be a line that says $hboxset "default". Proceed it. This lets the engine compile the hitboxes for you lot.
  • Discover a line offset with
$model "studio" "[something].smd"        
  • Rename [something].smd to the gun's smd file.
  • Add together a line after this line
$cdmaterials "models\weapons\v_models\hands\"        

with the following text:

$cdmaterials "models\weapons\v_models\lr300\"        
  • \lr300\ should be replaced with whatever binder proper name y'all gave the materials earlier.
  • Find all lines that begin with $attachment.
  • Replace the phrase in quotes (in the $zipper lines) with the proper noun of the bone of the weapon. (In this tutorial it would be ValveBiped.Frame.)
  • Save the QC and shut it.
  • Right click the QC and click Compile.
  • The QC should compile successfully.
Warning The QC may non compile successfully. Cheque any errors studiomdl.exe gives y'all and post them on the talk folio for help.

Testing Animations in the Game [edit | edit source]

  • Open Counter-Strike Source
  • Create a server.
  • Buy the weapon you are animative to exam it.
  • In that location are smoothing errors in sure lighting weather; we will set those afterward.
  • Turn on cheats using the console command sv_cheats i.
  • Here are a few cheats you can play with:
    • cl_drawhud 0 - disables HUD, skillful for recording videos and taking pictures
    • requite weapon_sg552 - give a weapon. sg552 can exist replaced with other weapon names
    • impulse 101 - refill ammo and money
  • Take some pictures by pressing F5. The pictures will end up in cstrike\screenshots\map_name####.jpg
  • Share these pictures and become some feedback! The idle animation should be perfected earlier starting any other animation.

Adjusting the Origin of the Animations [edit | edit source]

  • You tin brand a modest aligning to the model without editing the SMD files. It is called setting the origin.
  • To exercise this, open your QC file.
  • After the $cd line, add a new line.
  • Enter the post-obit:
$origin x y z        
  • Replace x y and z with numbers that depend on which mode you want the model to be first.
  • Refer to this picture to come across how origins work. Irresolute Origins

Source: https://en.wikibooks.org/wiki/Animating_Weapons_for_Counter-Strike_Source/Testing_Animations

Posted by: hallthosed.blogspot.com

0 Response to "How To Do The Cs Go Weapon Animation"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel