Author Topic: Tutorial: Rigging with fragMOTION  (Read 31401 times)

Offline fujiwara

  • Master
  • *****
  • Posts: 858
    • View Profile
Tutorial: Rigging with fragMOTION
« on: November 06, 2007, 09:07:55 PM »
Here I will going to demonstrate how to rig a mesh to a skeleton using fragMOTION, a shareware (really annoyware) rigging and animation tool. No, I'm not being paid :D

For this, you will need a fully textured mesh, ready for rigging. Like this:



You may note that I have all the modding tools on Quick Links: Blender, Wings, GIMP, Python, Map Editor, BRFEdit, along with links to my dev directory and the M&B directory, NetBeans (a full-featured Java IDE), Visual Basic Studio Express, Visual C# Studio Express, shortcuts to M&B v808 and v894, WinAMP (because making mods requires music), and Firefox. If you are serious about making mods, I recommend a similar setup, because double-clicking sucks.

Export the man_body.smd from Native with BRFEdit. You'll need the skeleton later.

fragMOTION, for some reason, won't import OBJ files. SO, export your mesh as a 3ds file. Make sure to set the export scale to 10.0 and check Swap Y and Z axes:



Close your modeling program. Open fragMOTION. You should see this:



As you can see, I have not registered yet. Take a few minutes to get familiar with the interface. Read the documentation. Throughly. To get started, import man_body.smd:




You should see this:



On right side is the Tool panel. Click 'Select Vertex' and hit Ctrl-A to select all the verts. Go to Edit -> Delete Mesh Selection-> All to delete the body mesh, which we don't need anyway. All we want is the skeleton:



Next, import the mesh you want to rig by going to File -> Merge, and selecting the 3ds file we created earlier:



This dialog will pop up:



The default settings are fine, so click OK.

Here is your mesh. Now the fun begins.



Hit Ctrl-B to bring up the Assign Vertices to Bones floating dialog. In the upper right corner is the Skeleton panel, showing the hierarchy with all the bones. Click each one and see it highlighted in the main panel. The bone names will also show up in the Assign Vertices to Bones dialog. Click a bone in the Skeleton panel to which you want to assign some vertices. With 'Select Vertices' selected in the Tools panel, select the vertices you want to assign to the bone, then enter a weight you wish to assign to the bone and click Set. I find a weight of 0.5 is a good starting point. A series of lines will connect the verts to the bone, indicating those verts have been assigned to that bone. Repeat until all the verts are assigned to a bone.



A fully rigged model:



Save you work, preferably many times along the way.

Next, go to Bones -> Validate Weights and Assignments and click OK. The console at the bottom will tell you how many weights and assignments were adjusted. This will prevent you from assigning a weight of more than 1.0 to a vertex.

Once the verts are assigned to your liking, export your rigged mesh to the SMD format. Go to File -> Export, and select SMD from the drop down menu. Make sure you export ONLY the mesh.



Save and Close. Open BRFEdit. Import your mesh, making sure to select Previous SMD and DESELECT Swap Y and Z axes (we did this before when we exported the mesh to 3ds).



This is your first sanity check. If the mesh is crazy here, it will likely be crazy in the game. Save that BRF file and add it to your module.ini file. Assign the mesh to an item in the module_items.py file (using the Module System), and compile your mod. To test it, make sure the player character has easy access to the newly meshed item (adding it to your inventory at the start is good). Start M&B, and run your mod. The item dutifully appears in your inventory:



Put it on, and voila! A fully rigged article of clothing, what all the stylish samurai are wearing this season:



A pose for effect:



Any questions? Remember, RTFM before getting started! :)

The horses tend to get their legs caught in the catapult rather than being properly launched.

Servitor

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #1 on: November 10, 2007, 04:18:01 PM »
Quote
Any questions?
Yea, Lets first hear why the model looks so bad! :lol:


Thanks for the tutorial, fujiwara!  :D I am going to try this out. Am I right in saying that Rigging is freaking easy but also incredibly time consuming?

Oh, And is this: http://www.fragmosoft.com/fragMOTION/download/index.php the correct download site?  :o
Servitor
« Last Edit: November 10, 2007, 04:20:14 PM by Servitor »

Yoshiboy

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #2 on: November 11, 2007, 02:58:29 AM »
It isn't that easy really. Dunno about in this ap. But sometimes it can take a few tries to get it right. Also isn't THAT time consuming, but takes a while if you have to keep going back and re-doing the rigging.

Albino

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #3 on: November 15, 2007, 10:32:17 PM »
Fujiwara, have you seen this autorig-script that just came out for blender. When I have time I will investigate it myself.

Highlander

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #4 on: November 16, 2007, 05:37:22 AM »
Fragmotion has an autorig function too. But honestly, that never turned out good for me.

Offline fujiwara

  • Master
  • *****
  • Posts: 858
    • View Profile
Re: Tutorial: Rigging with fragMOTION
« Reply #5 on: November 18, 2007, 11:00:32 PM »
That link seems to be dead. I'm not impressed with any of the auto-rig algorithms. Better to take the time and rig the mesh the way YOU want it, not how the software would have it.

The horses tend to get their legs caught in the catapult rather than being properly launched.

James

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #6 on: November 19, 2007, 04:19:22 PM »
I auto-rigged, and it turned out all wonky in-game, but the assignments weren't any different from what I would have done. I suppose I may just need to send off the models I want rigged.  :(

Offline fujiwara

  • Master
  • *****
  • Posts: 858
    • View Profile
Re: Tutorial: Rigging with fragMOTION
« Reply #7 on: November 19, 2007, 05:07:21 PM »
I tried auto-rig once also, and it seemed to invert all the normals in the process (!). That's why I don't trust the auto-rig. I don't know what else it's doing besides assigning verts to bones.

The horses tend to get their legs caught in the catapult rather than being properly launched.

Lazarus

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #8 on: February 13, 2008, 07:15:50 AM »
i get an error with brfedit when i click on my mesh after importing the smd file i rigged with fragMotion. saying something like

"invalid material"

what am i doing wrong?
the mesh seems to be intact except that the textures are missing.  :-\

edit: nvm, i was able to work that out thanks to yoshiboy's tutorial.

but one more question. how can you rig vertices using fragMotion so that they move more softly? for example, the edges of that kimono (the wide area for the arm) seemed a little too stiff.

i saw one of Highelf's tutorial rigging a mesh with soft wing-like apendage for 3dsmax. however i wasn't able to make that work in-game. (the mesh doesn't animate with the skeleton)

is there a way to do that with fragMotion?



« Last Edit: February 13, 2008, 09:54:20 AM by Lazarus »

Offline fujiwara

  • Master
  • *****
  • Posts: 858
    • View Profile
Re: Tutorial: Rigging with fragMOTION
« Reply #9 on: February 13, 2008, 02:07:07 PM »
Lazarus, if I understand what you're talking about (the large, rather stiff square sleeve), it would have to have it's own bone to 'hang' properly. I've given this a considerable amount of thought myself, but without being able to do a custom skeleton, I fear the large sleeves will have to be trimmed down to give a decent looking mesh.

The horses tend to get their legs caught in the catapult rather than being properly launched.

Lazarus

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #10 on: February 13, 2008, 04:49:50 PM »
Lazarus, if I understand what you're talking about (the large, rather stiff square sleeve), it would have to have it's own bone to 'hang' properly. I've given this a considerable amount of thought myself, but without being able to do a custom skeleton, I fear the large sleeves will have to be trimmed down to give a decent looking mesh.

oh ok.

i'm actually starting to get a hang of this. thanks for inspiring me.  :) i might also try starting my own mod or join existing ones, once i get more practice on texturing, and shading and bump maps..

i actually have no idea how to use bump maps, plus the metal armors i made doesn't look too shiny. i'm also having problems making semi-transparent textures. do you have tutorials about those too?

anyway, thanks for the excellent tutorial. cheers!

PS: can you also point me to good links where i can download free meshes (.obj) for reference? thanks.
« Last Edit: February 13, 2008, 04:55:22 PM by Lazarus »

?Wind?

  • Guest
Re: Tutorial: Rigging with fragMOTION
« Reply #11 on: February 17, 2008, 09:34:13 AM »
???????????????????????????????????????????????????

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Tutorial: Rigging with fragMOTION
« Reply #12 on: February 21, 2008, 11:28:19 PM »
Lazarus, if I understand what you're talking about (the large, rather stiff square sleeve), it would have to have it's own bone to 'hang' properly. I've given this a considerable amount of thought myself, but without being able to do a custom skeleton, I fear the large sleeves will have to be trimmed down to give a decent looking mesh.

oh ok.

i'm actually starting to get a hang of this. thanks for inspiring me.  :) i might also try starting my own mod or join existing ones, once i get more practice on texturing, and shading and bump maps..

i actually have no idea how to use bump maps, plus the metal armors i made doesn't look too shiny. i'm also having problems making semi-transparent textures. do you have tutorials about those too?

anyway, thanks for the excellent tutorial. cheers!

PS: can you also point me to good links where i can download free meshes (.obj) for reference? thanks.

The problems you describe are with the "materials" files, and their attached textures - not the model itself.  Shine and transparency are materials attributes, and you need to be reading up on texturing instead of rigging to deal with that.  (And I'm no expert - OnR is waiting on mtarini to bail us out of the texture mess I started with the cutouts in the sword guards.)

If you need good references, just pull them from any M&B .brf file - export as .OBJ from BRFEdit.  (Heck, pretty much everything I do, I start with something from Native and just start bending things.)


Offline Llew

  • Master
  • *****
  • Posts: 1399
  • TLD dev team
    • View Profile
Re: Tutorial: Rigging with fragMOTION
« Reply #13 on: April 23, 2008, 06:45:36 AM »
Can Blender be used to rig? It's what I use for modeling, so if I use it for rigging also that would be one less learning hump I'd have to get over.

Someone mentioned an auto-rig function for it, so I'm assuming rigging in general with it isn't completely out of the question... 

Offline Ron Losey

  • Master
  • *****
  • Posts: 4418
    • View Profile
Re: Tutorial: Rigging with fragMOTION
« Reply #14 on: April 23, 2008, 07:48:12 AM »
Can Blender be used to rig? It's what I use for modeling, so if I use it for rigging also that would be one less learning hump I'd have to get over.

Someone mentioned an auto-rig function for it, so I'm assuming rigging in general with it isn't completely out of the question... 

There are some tutorials around here somewhere on rigging with Blender (not sure if they were posted here or on Taleworlds)  ... some people love that program, and some people hate it, so good luck.  Seems it required some plug-ins or something ... but I'm sure some people were doing rigging with it, somehow.

Personally, I figure you're better off doing the models in Wings and the rigging with fragMotion here ... but I'm not much good at rigging, so my opinion doesn't really count for much.  (I'm not just great with the models either, but I've sure turned out a lot of them recently.)