cdg.net

CDG Forums
Your Ad Here
It is currently Sat Nov 25, 2017 8:38 am

All times are UTC [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 
Author Message
PostPosted: Tue Jan 25, 2005 12:03 am 
Offline
Sad
User avatar

Joined: Sat Nov 01, 2003 4:03 am
Posts: 7364
Location: Cali
Compiling for Counter-Strike Source.

First off, this is going to be going from the ground up using default animations and a custom weapon. The software I’ll be using is Milkshape 3d 1.7.3, cannonfodder’s HL2 model decompiler, stand alone vtex, tga2vtf and what’s included in the Source SDK.

The model I used for this tut can be found at: http://www.bullet-head.net/compilingtut/denusp.rar

Open the decompiler after placing it in the sourcesdk\bin folder, locate the default model files (I have all the GCF’s pre dumped on a backup hard drive).
Image

Locate the directory you wish to dump the files to.
Image

Hit extract

Go to the folder you dumped the files to

Open Milkshape 3d 1.7.3

MAKE SURE AUTO SMOOTH IS UNCHECKED
Image

Import the reference smd (for the usp it is usp_reference.smd)

Import the hands reference smd

Import the idle smd, you will be prompted for this:
Image
Click yes

Press the anim button at the bottom right area
Image

It will then look like this:
Image

Unclick the anim button

Now merge the USP you want to compile (File->Merge, select the USP ms3d file)

Align the usp model to match the scale (NEVER SCALE ON A SINGLE AXIS, EVER, EVER, EVER)
Image

Go to the Joints tab, find v_weapon.USP_Parent

Hit SelUnAssigned

Assign everything to that joint

Press the anim button at the bottom right area
Image

What it should look like now
Image

Unclick the anim button

The way I set this Ms3d file up is that I separated everything, so that they are in their own groups so you don’t have to worry about assigning the wrong vertex to the wrong bone. But I suggest you practice assigning everything manually (not just selecting the group).

Assign the slide to its respective joint

Assign the trigger to its respective joint

Assign the silencer to its respective joint

Assign the magazine to its respective joint

Assign the slide release to its respective joint

I personally never assign the hammer, so avoid that

Now hide the arms group, and import the reload smd, you will be prompted for this:
Image
Click yes

Press the anim button at the bottom right area
Image

And drag the bar to the right; watch the animation to make sure everything is setup correctly. It should look like this
Image

You now have everything assigned and practically ready for compile

Delete the pist_usp.bmp group

Delete the v_hands.bmp group

Export as Half life SMD

Save what you have in milkshape at this very moment, always, ALWAYS keep a back up in the programs proprietary format just for the sake of safety.

Close milkshape

Now to convert the textures to the required format, extract the VTEX archive somewhere on your hard drive. Place the required textures in vtex\hl2\materialsrc\sprays and convert them to TGA. Now, since the texture converting program (vtex.exe) requires the textures to be a power of two, you need to size them appropriately. Open the textures in your image editing program of choice, and change the dimensions (do [i]not[/b] constrain the proportions). Always go up in dimensions, don’t go down.

Change skin2 to 512x512

Change silencer to 1024x256

Change skin1 to 512x512

Now run tga2vtf.exe

Go to vtex\hl2\materials\sprays and delete everything in there

Now go to vtex\hl2\materialsrc\sprays and open the text files that are now present

Add this:
Code:
 "nomip" "1"


Now run tga2vtf.exe

Go to counter-strike source\cstrike\materials\models\weapons\v_models

Create a folder called denyru_usp

Take the textures you just converted from vtex\hl2\materials\sprays and place them in materials\models\weapons\v_models\denyru_usp

Now in the vmt files modify it so it will execute it ingame properly. (Open with notepad)

It should look like this:
Code:
 VertexLitGeneric
{
   "$basetexture"   "models\weapons\v_models\denyru_usp\silencer"
}

The last word (silencer) is the textures name, modify it accordingly

Now its time to edit the qc so it uses the custom folder name

Code:
 $cdmaterials "models\weapons\v_models\denyru_usp\"


Then to every animation line add the word snap to it, like so:
Code:
$sequence shoot1 "shoot1" ACT_VM_PRIMARYATTACK_SILENCED 1 snap fps 30.00 {
  { event 5001 0 "1" }
  { event AE_CLIENT_EFFECT_ATTACH 0 "EjectBrass_9mm 2 100" }
}

That makes it so the animation does not blend with the previous and/or next.

Now its time to compile

Go to the sourcesdk\bin folder

Go to start -> run

Type:
Code:
 C:\Program Files\Valve\Steam\SteamApps\YOUREMAILADDRESS\sourcesdk\bin

(If you right click in command prompt you can paste)

Then type this:
Code:
studiomdl -game "C:\Program Files\Valve\Steam\SteamApps\bullet_head@msn.com\counter-strike source\cstrike" "C:\CSS_Compiles\default.usp\mdldecompiler.qc"


Now test it ingame!

_________________
Image
My Flickr photostream.


Last edited by bullethead on Tue Jan 25, 2005 12:29 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 12:03 am 
Offline
Sad
User avatar

Joined: Sat Nov 01, 2003 4:03 am
Posts: 7364
Location: Cali
How to edit the attachments

Load up the SDK

Open HLMV

Go to the attachments tab

Click the “1â€Â

_________________
Image
My Flickr photostream.


Last edited by bullethead on Tue Jan 25, 2005 2:28 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 12:15 am 
Offline
Old School

Joined: Wed Mar 24, 2004 5:01 pm
Posts: 12839
Location: Around
Shit ... I spent most of this morning in a lecture typing this up on my laptop :(

Ah well, its a damn fine tut anyhoo ;)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 12:24 am 
Offline
Sad
User avatar

Joined: Thu May 06, 2004 8:40 pm
Posts: 6504
Location: "I can see Idaho from here", OR
Hail Bullet_head. I might compile for CSS after this...

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:00 am 
Offline
Old Timer

Joined: Tue Jun 29, 2004 12:45 am
Posts: 446
Location: Seattle, WA
Finally some one posted this. Too bad it needs milky.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:00 am 
Offline
Sad
User avatar

Joined: Sat Nov 01, 2003 4:03 am
Posts: 7364
Location: Cali
What else would it use? (besides the xsi deal)

_________________
Image
My Flickr photostream.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:01 am 
Offline
Old Timer

Joined: Tue Jun 29, 2004 12:45 am
Posts: 446
Location: Seattle, WA
I dunno I thought it magically had source hands on it. If you havent noticed Im an idiot.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:03 am 
Offline
Sad
User avatar

Joined: Thu May 06, 2004 8:40 pm
Posts: 6504
Location: "I can see Idaho from here", OR
bullethead wrote:
What else would it use? (besides the xsi deal)


I wonder if XSI is any good...

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:04 am 
Offline
Sad
User avatar

Joined: Sat Nov 01, 2003 4:03 am
Posts: 7364
Location: Cali
Used it before, I prefer milky.

_________________
Image
My Flickr photostream.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:36 am 
Offline
Clinically Dead
User avatar

Joined: Mon Mar 29, 2004 9:26 pm
Posts: 2266
Location: BROOKLYN, YOU AIN'T NOTHIN'.
Can you apply this tut to world models?

_________________
Image
Numb Rider wrote:
this thread sucks balls


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:38 am 
Offline
Sad
User avatar

Joined: Sat Nov 01, 2003 4:03 am
Posts: 7364
Location: Cali
DikFaic wrote:
Can you apply this tut to world models?
Technically yes, you just need to fiddle around and you can figure it out. In general its the same but you need to play around with the phymodel. I'll create another addition to this tut on how to do them

_________________
Image
My Flickr photostream.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:40 am 
Offline
Old Timer

Joined: Wed Oct 08, 2003 9:20 am
Posts: 610
Excellent work bh, please add to the tut how to make reflective maps. :)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 2:29 am 
Offline
Sad
User avatar

Joined: Sat Nov 01, 2003 4:03 am
Posts: 7364
Location: Cali
chimp_ wrote:
Excellent work bh, please add to the tut how to make reflective maps. :)
Added to the second post.

_________________
Image
My Flickr photostream.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 2:36 am 
Offline
Middle Aged

Joined: Mon Aug 16, 2004 9:52 pm
Posts: 321
uh, on my compile (I did the USP just to try), it said "Can't load C:\Program Files\Steam\SteamApps\s1lenced\sourcesdk\bin\filesystem_steam.dll".....And so, anyone know what went wrong? I checked there, and there is no filesystem_steam.dll......What went wrong? should I have that file?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 4:17 am 
Offline
Wise Old Man
User avatar

Joined: Sun Jan 02, 2005 1:45 am
Posts: 1736
Location: Texas, Everything's Bigger Here!
When i merge the custom weapon in........the custom is HUGE and the hands and default weapon drop way back....so small you cant see them.......how do i fix this so i can line them up....and go forward?

Thx for finally posting this man. I've been wanting to learn this so I dont have to ask people to do things for me anymore. AWesome man.

_________________
Real Men drink Ginger Ale!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Your Ad Here
Powered by phpBB® Forum Software © phpBB Group