Author Topic: Tutorial: Using gmax to import and export SMDs  (Read 6094 times)

0 Members and 1 Guest are viewing this topic.

Thorgrim

  • Cartographic Conquistador
  • Knight at Arms
  • *
    • View Profile
Tutorial: Using gmax to import and export SMDs
« on: June 26, 2006, 06:54:21 am »
Using gmax to import and export SMDs

When creating mods for Mount and Blade, you will often want to modify, or even create whole new sets of armour, mounts for players to use, or even monsters for players to fight.  These meshes are slightly more complex than your standard weapon or scene props, in that they are "rigged" to a

Highelfwarrior has a tutorial on rigging, however this tutorial will cover the step by step details for using gmax.  For more details on performing the actual rigging, see his thread.

In this tutorial, we will import an SMD (that has been exported from BRFEdit) into gmax, then export it back out.  This may seem completely pointless, and it is! However you should of course do any modifications you wish to make to the mesh before exporting it, or if you prefer, create a whole new mesh and bind it to the imported skeleton.

If you do not already have gmax and the required plugins, you can get them from the BRFEdit thread.  You will require:

gmax (you need to register to download it)
SMD Importer (gmax / 3ds Max)
SMD Exporter (gmax)


Place these plugins in Gmax\scripts\startup



Part 1: Getting an animated mesh from BRFEdit, into gmax

Step 1: Open a file in BRF that contains an animated mesh, such as armour in item_meshes1.brf.  Select an item that has the "Skeletal Animation" checkbox ticked, then select export, and export it as an SMD.

Step 2: Open gmax, and select the utilities tab from the right hand menu.
Then click the MAXScript button, and it should then display a section with a dropdown box containing the plugins you have placed in the startup folder.



Select the Half-Life SMD Import option.

You should then see a new panel similar to this:



Click the Import SMD button, then select the SMD you wish to import.


You should now have the SMD in gmax, which you can modify all you like.

Wasn't that easy?





Part 2: Getting an animated mesh from gmax, into BRFEdit

Step 1:  Open up the utilities tab again, and this time select the SMD Exporter option.



Click the Pick Model button, then select your mesh



The button should now have the name of your mesh.

Now click the Export SMD button.  You will not see anything happen: this is to be expected so don't worry  :)

Right click in the text box in the bottom left corner of the screen, and then select open listener window.



Now run GMaxSLGRAB.exe (included with the SMD exporter plugin) and click Grab.



Save as a filename, ending in .SMD, such as armor.smd.

Then open up notepad, and drag this file you just saved into it.

Remove the top and bottom sections highlighted below:





Then save it, and open it with BRFEdit.

You should now see your mesh in the mesh resource list, and should be able to select and view it.


If you still have any problems let me know :)


Leodan Flamelock

  • Knight at Arms
  • *
    • View Profile
  • Faction: Neutral
Re: Tutorial: Using gmax to import and export SMDs
« Reply #1 on: June 26, 2006, 08:08:18 am »
Kwel
[16:06] * TehGherkin is now known as TupacsGhost
[16:06] <TupacsGhost> WASSUP VANILLAFACE
[16:06] *Flamelock is now known as BIGG1E
[16:06] <BIGG1E> TIME TO DIE MUHFUCKA
[16:06] <TupacsGhost> OH DA FUCK NO

fisheye

  • Back in Black
  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Tutorial: Using gmax to import and export SMDs
« Reply #2 on: June 26, 2006, 02:02:17 pm »
Oh wow! Thanks Thorgrim!

Is this thing linked to from a sticky anywhere?

SigniferOne

  • Sergeant
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #3 on: June 26, 2006, 02:12:48 pm »
Oh sweet, a workaround to make GMax be able to save or export stuff. Nice tutorial and find, Thorgrim!

Thorgrim

  • Cartographic Conquistador
  • Knight at Arms
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #4 on: June 26, 2006, 04:03:03 pm »
Oh wow! Thanks Thorgrim!

Is this thing linked to from a sticky anywhere?


I just added it to the Q&A thread, but that thing is getting a bit messy, and I'm sure its missing a fair few threads.

What we really need is a website with nicely organised tutorials, in html format, with all the info from all these threads in 1 place.  I've talked about it before, but now I've got a little more time I might try get onto something.

I'm not really great at web design stuff though, so once ive got it roughed out I might try find someone to make it all look nice :)

If anyone else wants to help, let me know.  I think most of the info is here though, we just need to put it all together.

Highelf

  • Iyum Farer
  • Grandmaster Knight
  • *
  • I feel naked without my Christmas hat. :[
    • View Profile
  • Faction: Neutral
  • MP nick: irc://Stoned_elf!
Re: Tutorial: Using gmax to import and export SMDs
« Reply #5 on: June 26, 2006, 04:12:35 pm »
Dont know what I'm doing wrong but I still get the "this file type cannot be imported" error in BRFedit when importing the XML file (with .smd behind the name)

Did everything as clean as possible..

Thorgrim

  • Cartographic Conquistador
  • Knight at Arms
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #6 on: June 27, 2006, 05:24:17 am »
Send me the file and I'll take a look...

By the sound of the error it does not have a .SMD extension.

Are you sure its extension is .SMD (not .smd.xml or something?)

And incase you haven't already... make windows explorer show file extension types.  How you could live without that I will never know.

Highelf

  • Iyum Farer
  • Grandmaster Knight
  • *
  • I feel naked without my Christmas hat. :[
    • View Profile
  • Faction: Neutral
  • MP nick: irc://Stoned_elf!
Re: Tutorial: Using gmax to import and export SMDs
« Reply #7 on: June 27, 2006, 02:07:19 pm »
It happens with any model that I try, I'll give it another few shots this afternoon

I just saved the file (XML file) as test.smd (as a name)

imported it in brfedit and got the error.

Quote
And incase you haven't already... make windows explorer show file extension types.  How you could live without that I will never know.


How do I go about that?

Janus

  • *spicy* *camper*
  • Administrator
  • *
    • View Profile
    • Mount&Blade Unofficial File Repository
  • Faction: Rhodok
Re: Tutorial: Using gmax to import and export SMDs
« Reply #8 on: June 28, 2006, 03:02:20 am »
Quote
And incase you haven't already... make windows explorer show file extension types.  How you could live without that I will never know.


How do I go about that?

Open a folder, then choose "Tools->Folder Options" in the top menu. In the new Folder Options dialog window, click the View tab, look for the "Hide extensions for known file types" option in the list, and uncheck it.
Tomas asked Dolgan, "What place is this?"
The dwarf puffed on his pipe. "It is a glory hole, laddie. When my people mined this area, we fashioned many such areas."
     - Raymond E. Feist, Magician: Apprentice  (Riftwar Saga)

James MacAdams

  • Recruit
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #9 on: September 04, 2006, 06:40:39 am »
"The button should now have the name of your mesh.

Now click the Export SMD button.  You will not see anything happen: this is to be expected so don't worry  "

Hi there Thorgrim,

I'm a beginning modder and I tried all these things out but I've run into a few problems. When I push the button in GMAX it doesn't have the name of the mesh on it. I can't even select anything while the button is 'pressed' (selected), I have to select first and then push the button.

The Export SMD button does nothing and when I open up the script listener it only says No Bones Selected or something. I'm probably doing something wrong somewhere but I'm not sure where.

When you're making a hat do you select just the hat or the big skeleton model?

Thanks!
Jamie

Thorgrim

  • Cartographic Conquistador
  • Knight at Arms
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #10 on: September 04, 2006, 12:03:42 pm »
Hey Jamie,

If you are just making a hat, you do not need to do any rigging or anything that is covered in this tutorial, simply export as an obj.  Hats cannot be animated anyway.

However if you want to make an animated body mesh, you will need to "rig" the mesh to the bones (It sounds like you haven't done that yet).  If you want to try do that, there are a number of rigging tutorials here (the 3ds Max ones, should be pretty much the same for gmax), or any generally 3ds max / gmax rigging tutorial should teach you what you need to know too.

Matheus

  • Knight
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #11 on: September 05, 2006, 05:33:23 pm »
Man, that was great!
I was in a fight against this @$&%*!@ program. Maybe now things will be easier.

Deahran

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Tutorial: Using gmax to import and export SMDs
« Reply #12 on: September 05, 2006, 05:46:30 pm »
Thorgim

Can I translate that tutorial to Turkish?

Thorgrim

  • Cartographic Conquistador
  • Knight at Arms
  • *
    • View Profile
Re: Tutorial: Using gmax to import and export SMDs
« Reply #13 on: September 05, 2006, 07:25:17 pm »
Hi Caravan,

Sure, that would be great.  I'd be more than happy if you did :)

Deahran

  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Tutorial: Using gmax to import and export SMDs
« Reply #14 on: September 05, 2006, 07:31:30 pm »
Very thanks Thorgim!