Author Topic: [Tutorial] Creating SKM Models with Blender  (Read 22018 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
[Tutorial] Creating SKM Models with Blender
« on: October 20, 2012, 01:04:28 AM »
This tutorial is for Blender 2.64.  There's a high chance it won't work with other versions due to format changes.



Step 1 - Downloads:

Download blender: http://www.blender.org/download/get-blender/
 - If you need 2.64: http://download.blender.org/release/Blender2.64/

Download an SMD exporter: http://code.google.com/p/blender-smd/
 - Mirrored here: http://dplogin.com/files/tools/skm/io_smd_tools-1.5.2.zip


Edit: New smd exporter compatible with blender 2.92+ are available here: http://steamreview.org/BlenderSourceTools/

Download skelmod (SKM) converter: http://bfeared.com/library/quake/archive/quakedev/jalisko/index_files/skelmod.htm
 - Mirrored here: http://dplogin.com/files/tools/skm/skmodel2.03.zip



Step 2 - Installation:

Install & open Blender - should be self explanatory.

Unzip the smd tools. New tools you just keep in the zip file.

In blender, go to FIle -> User Preferences -> Addons -> Install Addon... and browse to the directory with the smd files you extracted zip you downloaded.

Select io_smd_tools.py.  It should display "Import-Export: SMD\DMX Tools".  Check the box to the right of that to enable the plugin.  Close the window.
Updated: Check the box next to "Improt-Export: Blender Source Tools" to enable it.



Step 3 - Export:

Note: before exporting, you must have at least one bone assigned to the mesh, and you probably need to set up materials and UV coordinates, otherwise the SKM converter will likely fail.  Also note that 1 unit in Quake 2 is really tiny, so you'll likely have to scale up your object about 10x's.

Go to File -> Export -> Source Engine (.smd, .vta, .dmx).  I just selected the first option, which created a .smd with the same name as my mesh (Cube.smd).

If you don't see the export option, make sure it's enabled by going to File->User Preferences->Addons->Import-Export and checking "Import-Export: ]SMD\DMX Tools  Blender Source Tools".



Step 4 - Convert:

The easiest way to do this is to extract skmodel.exe, run.bat, and model_definition.txt from the zip in step 1 into the directory with your skp file.

Open model_definition.txt.

Change the "model" and "export" lines to the name you want the model to be.

Replace the "scene" lines with the name(s) of the smd(s) you exported from blender.  You will probably just have one, unless you have multiple animations.

Double click run.bat.

If all goes well, you'll get a .skm, .skp, and .skin file.  You don't need the .skin file.  If you get errors, make sure you have a bone assigned to your mesh.

You may want to edit your run.bat to copy the skm and skp files into the appropriate paintball2 directories if you're frequently editing the same file.



Errors:

If you get some error about numinfluences being 0, that means you have some vertexes in your model that aren't assigned a weight to a bone or you don't have any bones in your model.
« Last Edit: December 17, 2022, 04:32:50 AM by jitspoe »

deadfroggy

  • Autococker
  • Posts: 562
Re: [Tutorial] Creating SKM Models with Blender
« Reply #1 on: October 20, 2012, 03:25:51 AM »
Make sticky please :P

gonass

  • 68 Carbine
  • Posts: 383
Re: [Tutorial] Creating SKM Models with Blender
« Reply #2 on: October 28, 2012, 02:59:57 PM »
There's also an old .bsp exporter for an older version of blender.  I think it was 2.5. You can make something in the new version and then open it in the old one and export it.

deadfroggy

  • Autococker
  • Posts: 562
Re: [Tutorial] Creating SKM Models with Blender
« Reply #3 on: November 22, 2012, 03:57:56 AM »
I get this error exporting to smd.

error inparsetriangles,expecting 'numinfluences', script like: 0 1.000000 -096
3327 -0.155337 1.000000 0.000000 0.000000 0.041082 0.076537 0
error processing script

??

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: [Tutorial] Creating SKM Models with Blender
« Reply #4 on: November 23, 2012, 05:28:14 PM »
You probably did not set up your skeleton correctly.  You must have at least one bone.

Makowiec

  • VM-68
  • Posts: 112
Re: [Tutorial] Creating SKM Models with Blender
« Reply #5 on: January 03, 2013, 02:06:04 PM »
What about textures that I'd like to use in my model? Can I just use uv texturing in blender?

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: [Tutorial] Creating SKM Models with Blender
« Reply #6 on: January 04, 2013, 02:44:16 AM »
Yeah, you use the UV's in blender.  I didn't really go into detail there, but it should be like creating a model for any other game.

Makowiec

  • VM-68
  • Posts: 112
Re: [Tutorial] Creating SKM Models with Blender
« Reply #7 on: January 04, 2013, 03:34:26 PM »
So I made a model, I textured it, then converted succesfully and.. it's completely transparent ;o. Have you got any idea why all my models are invisible? Thanks for help anyway ;)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: [Tutorial] Creating SKM Models with Blender
« Reply #8 on: January 04, 2013, 10:41:29 PM »
So I made a model, I textured it, then converted succesfully and.. it's completely transparent ;o. Have you got any idea why all my models are invisible? Thanks for help anyway ;)
Are you sure it's not just really tiny?  1 unit in quake is close to 1 inch; in Blender, I think it's 1m.

Makowiec

  • VM-68
  • Posts: 112
Re: [Tutorial] Creating SKM Models with Blender
« Reply #9 on: January 05, 2013, 02:10:11 PM »
Are you sure it's not just really tiny?  1 unit in quake is close to 1 inch; in Blender, I think it's 1m.
Yeah.. You're right. Thanks ;)

WarWulf

  • Autococker
  • Posts: 539
Re: [Tutorial] Creating SKM Models with Blender
« Reply #10 on: December 25, 2015, 10:12:21 AM »
nice

WarWulf

  • Autococker
  • Posts: 539
Re: [Tutorial] Creating SKM Models with Blender
« Reply #11 on: December 25, 2015, 12:09:27 PM »
getting the same error as deadfroggy and i do have a bone attached when i am in pose mode the bone moves the mesh around.

promarijan

  • VM-68
  • Posts: 182
Re: [Tutorial] Creating SKM Models with Blender
« Reply #12 on: March 04, 2016, 12:51:20 PM »
This Post is old but i guess we run out of models that are up to date and i am interested in testing with all the stuff but can't get it done, atm i am too inexperienced with blender.
May someone create a more into detail tutorial for how to create models that will work with the converter? I would also love to know how to create own playermodels (does the genderfunction work ingame? so i could create a female player for testing?).

WarWulf

  • Autococker
  • Posts: 539
Re: [Tutorial] Creating SKM Models with Blender
« Reply #13 on: May 17, 2018, 07:33:00 PM »
Ahh this is what I am looking for I'll be doing live streams on the weekend for this