How to make MDL?!

Started by 1magus, January 21, 2012, 09:32:48 PM

Previous topic - Next topic

1magus

Ok so me and a friend are working on making a simple weapon for TF2, I finished it using 3DS Max 2011. It is perfect. Now we find out TF2 wants a MDL file! So I have to look all over hell to find this. Once I got it working for my model it made a .qc file, .smd file, and another .qci file named custom with our name.
How do I make a MDL file? I have a texture, I have a UV MAP made and I have a seperate model that is half the polygons for LOD. I worked so hard to get here and I just want my file in the game  :'(

1magus

I like all the tutorials from this site to Valves, but it would be nice for a complete tutorial from finished model in max to compiled and loaded into games for valve like Team Fortress 2.

wallworm

#2
As long as you have the Settings configured correctly according to this page, properly assigned a model to WWMT and have Steam running... your model will be in Source when you Click the Export Model button.

If not, it means that you have not set the correct paths, the correct bin directory, or Steam isn't running (or you turned off the compile model on export option in the settings).

1magus

I do not mean to get too into this but I was wondering if you could offer us extra help in the future via IM?

Skype: tyleraw2 is mine and I have others incase you do not use Skype.. I'm worried me and my friend will not be able to figure this out!

1magus

I finally got my model into the game (Team Fortress 2) and I select it as a weapon... it is floating above my head in the test area and the other NPC has it inside his body... did I do something wrong?

wallworm

There are a couple possibilities.

1) The object may need to be skinned to a Bone that is named that same as the bone or attachment that the prop is supposed to be attached to. You may need to create a Bone in 3ds and give it that name and use the SKin modifier on your prop ... and assign that bone to it.

OR

2) you need to use the option in WWMT that says Use Local Origin.

1magus

Aren't bones for characters though? I'm not really a character artist.

1magus

Also during the ITEM TEST it asked for .obj that I exported my models as.. I was wondering are they affected by the settings of ur plugin once they are .obj files or no??

wallworm

You may need to skin the object to a bone if it's an item that must be attached to a bone in game.

I've never used Itemtest. I compile straight from 3ds Max with WWMT. My tool currently exports only SMD files, not OBJ files. I may add OBJ support if that is something the standard studiomdl.exe is capable of now... but I haven't tested it.


1magus

Ya something is up, I can get your program to export my files into that format but not .obj which is what Team Fortress 2 Item tester needs in order to compile them to a .mdl, so what am I doing wrong with you're program??

wallworm

#10
If you are using Itemtest then really you're missing the whole point of my tool.

All you need to do when using Itemtest is to export your Model with the normal Max Export function... File > Export and choose OBJ. For simple things that is probably going to be all you really need. To use my tool requires that you understand a little more about various options in a Source model ... and explaining all that is way beyond the time I have available. If all you are trying to do is get a simple prop in that is an OBJ... just export the OBJ with Max and use that. Using my tool assumes you are not using Itemtest.

If you want to use all the things available in my tool, you will probably need to take some time reading various documents on Source models in general... learning the differences between the $body and $collisionmodel ... and what various QC commands are. My tool lets you control all those in the Max UI, saving out the QC and SMD files in the process and compiling them into MDL files.

It's all pretty straightforward and documented in the WW docs.

1magus

#11
Ok well quick question, if I'm just trying to make weapons, and armor for the game would I need your tool? I'm real sorry to cause trouble like this but I'm trying to make some cash lol for once on my 3D art and I'm excited to do this.

KevinLongtime

#12
As far as I know, the current ItemTest compiler doesn't let you compile to the weapon bone, only the head bone. So you would need to use Wallworm Model Tools for weapons.



For the weapon, I would suggest decompiling a weapon simular to yours, importing it into 3DS Max, and line it up simular to how the decompiled weapon model is (delete the decompiled weapon afterwards).

You would then skin your weapon to the weapon bone (The bone is called "weapon_bone") that came with the decompiled weapon (atleast, I think the bone comes with the weapon. If not, I can upload a scene with just the bone in it.)

To skin your weapon model to the bone, you:

- Select all pieces of your model

- click modifiers > animation > skin

- On the far right there will be a section that says "Bones: Add  Remove", click add and   select from the list the "weapon_bone" that you have in your scene. Your weapon is now skinned to the correct bone that you need for the weapon model to stay attached to the characters hand.

Now, you would then compile as you would normally with wallworm tools. All it comes down to now is compiling them to the right weapon directorys and such (if you are replacing a model as a mod to use in regular gameplay, compile it in the same location as the weapon you are replacing, and also the model named the same as the weapon you are replacing).

In the case of submitting it to valve, I would suggest compiling it in a way that replicates the folder structure that is generated with their itemtest tool, since they prefer that file structure as it makes it easy on them to quickly test submitted items.



As far as armor goes (for the torso/arms/legs?), I'm not very sure. That might require some sort of different bone rigging that I'm not familiar with. If you mean an armor helmet, that is just the head bone the itemtest compiler can compile to automatically - or you can compile it to the head bone the same way you did with the weapon bone with Wallworm Model Tools (meaing, decompiling a hat and using that head bone to skin to).

SMF spam blocked by CleanTalk