In this tutorial I show you how to attach model parts of one model to another model that is animated. For example you can attach with this method ultralisk parts to a high templar:
I recommend that you do at least the first part of my
Coin Tutorial if you haven't used my m3addon yet. For questions about the m3addon please have a look at my my m3addon FAQ first.
Important background information
Model (Mesh) aniamtions in m3 files are realized with so called bones. A bone is an invisible object that has a rotation, location and scale. Each bone influences to a certain degree a mesh (= a bunch of triangles of which each model is made). In m3 files only the bones are aniamted and they animate through their influence the mesh.
Blender can animate models also via bones. When you import an existing SC2 model you will get an animated bone strucucture called armature and one or multiple meshes that are influenced by it. The relationship between mesh objects and armature will be created for you by the importer.
When you add meshes you typically want them to move according to the existing bones. So you need to tell Blender that your added mesh should also be influenced by the armature. The quick way to do that I will show below. The slow "manual" way would be to add a Armature Modifier to the mesh object. To add the armature manually you would select the mesh object and then add add the armature modifer as shown in the following screenshot:
Since an armature has multiple bones Blender needs to know which bone affects which part of the mesh. This is done via so called vertex groups. A vertex (point of a triangle) can belong to up to 4 vertex groups (m3 format limitation) to a certain degree. e.g. 80% to the vertex group A and 20% to the vertex group B. If a vertex group has the same name as a bone then Blender will assume that the vertex group is controlled by the bone. So in the above example the position of the vertex would come to 80% from bone A and to 20% from bone B.
Since it is a lot of work to assign each vertex indifidually to multiple vertex groups it isn't ususally done manually. Instead you can tell Blender will a single command, that Blender should create a modifer and vertex groups for you, based on the position of the bones and meshes. This works often extremly well. Sometimes you need to fine adjust. In the last section I show you how to do such fine adjustment.
A way of importing that saves you work later
M3 files contain a lot of meta data. With meta data I mean for example invisible hit boxes, that are used to determine if you have selected a model. If you just want to take one part of a model, those hit boxes are totally unfitting and thus worthless. Deleting unwanted meta data is a lot of work. If you are interested only in the mesh with its materials, you can set the import option shown in the screenshot:
Once you have set the option, simply import the model from which you want to take some static parts. Before you import the model that should stay animated, you need to set it back to "Everything".
Cutting out parts of the models
How to edit meshes is shown in a lot of Blender tutorials. Here is a collection of Operators/Hotkeys that are expecally usefull when cominging models:
With [ctrl] + [l] you can expect the current selection to everything that is connected with the current selection.
With [ctrl] + [+] you can extend the current selection. This is a nice way to select a part of a model.
When you press [p] in edit mode you get a menu. This menu you can use to put the currently selected vertices into their own new mesh object. That way you can more easily move it around in object mode.
With the hotkey [p] in edit mode you can also let Blender automatically split up a mesh object by loose parts.
You can join two meshes with [ctrl] + [j] that way you don't have to move them around separatly.
via the 3D view menu Object -> Transform -> Origin to Geometry you can let Blender put the "Origin" of all selected meshes to its actual center. The origin determines around what objects rotate and is also the position of its label. By replacing the origin you can more easily rotate the differnt parts.
With the hotkey [b] you can perform a box selection.
With the hotkey [c] you get a circle which you can use like a brush to select vertices. By scrolling with the mouse wheel you can make the circle larger and smaller
Almost not noteworth but with [r], [g] and [s] you can rotate, move and scale objects or parts of a mesh in edit mode.
Making the new parts move with the existing animated model
1. Firstly you want the bones to be displayed in the rest position. That is the position in which they are attached to the mesh. The following screenshot shows you how to do so. Also good is the X/Rays options which allows you to see bones through the mesh.
2. Position your mesh parts at the positions where you want them
3. Select all your added mesh parts and the armature. Select the armature last so that it is active. Per default you can select objects in the 3D View with a right click. If you hold shift you add an object to the selection. It should then look like that(notice how the bones have a differnt border):
Alternativly you can shift + left click in the outliner to select the objects:
4. Once your meshes are selcted and the armature is active press [ctrl] + [P] and select the option marked in the next screenshot:
5. To watch the model animations in blender, you have to disable the setting again, that the bones are locked in their rest positions:
Ways to fine adjust how the added parts get animated
One way to adjust a vertex group is via weight painting. In a special weight paint mode you can paint on the mesh to increase the influence of a selected vertex group / bone on it. The weight painting looks then like this:
The red parts belong very strong to the current vertex group. The green ones partly. The blue ones a little. The black ones not at all. Via the hotkey [t] you can open a toolbar to adjust the brush.
It is also possible to set the selected vertices to a certain weight if you are in edit mode. The following screenshot shows how to do it:
If you are interested in finding out to which vertex groups / bones a vertex belongs, then you can use the properties bar in the 3D view (hotkey N) to find out:
Can you upload a screenshot of how your "M3 Import" panel looks like? Note: It is per default not at the top. Panels can be reordered (I show that in the first part of my coin tutorial) and I did that.
Try to remove the addon and start Blender again. If the m3addon is still there then it is another m3addon version from a different directory.
Blender looks at least 2 directories for the addon. The version specific place I describe in my coin tutorial and the place where the addons are that come with blender are.
@println: Go Ok, I found the problem. It seems that unlike previous versions extracting this one from the zip file gave me a folder inside another one and it caused trouble. Probably because I'm using Windows 8 right now and I did something different to extract it.
When importing warp in models for Warpgate protoss units they get all bugged, some meshes get stretched, some textures go crazy, like the little hexagon things. I also noticed that a lot of models get moved in all 3 axis in this last version, specially if imported after another model, and it appears that its always to the same position.
About the mesh streching: I checked the Zealot Warp In model. The stretched textuers come from an exotic propably 3ds max specific way of bone transformation(A bind maxtrix which does more than a rotaiton, scale and translation). It would be possible to work around it in Blender but that would require a change that would propably break existing blend files with imported models. So I am not sure if it is worth it.
About the "textures going crazy": Can you be more specific: What model is affected? Which part is wrong? How does it look and what should it look like?
About the position of imported models: Imported models get placed at the position of your 3d cursor in blender. With [shift] + [s] you can open a menu to set the "cursor to center".
@println: Go I should have added a screenshot. I'm not sure what the issue is but it seems that A: the textures (possibly just alpha) get moved, and B: the particles don't get created in the same position as before. Here you can see Stalker warp in on the left, and my edited version on the right.
Can't reproduce your problem. The initial particles are screwed up due to the transformation that is not importable to Blender. The rings look fine however.
But this time from a real blender remodelled design.
However I get stuck-ish....
The thing you say where I can make the stalker a parent works.. but not for the entire mesh of the void seeker.
For instance, the long tendrils to the front and back do not move.. what can I do to correct it?
I've tried addign in more constraints on either the mesh or the armature but it doesn't work.
Without investing a lot of time in order to figure out what you may or may not have done wrong it is hard to help you.
Maybe this background information may help you to figure it out by yourself:
You animate the pose position of armature bones and exactly one armature modifier on the mesh tells m3addon that they belong together. If an amature and mesh is linked that way the transformation of a bone of that amature will move all vertices ofthe mesh that belongs to a vertex group that has the same name as the bone.
I am not sure what you mean with constraints but none get exported.
Now I understand what it was.
I never realized how the entire paint weighting thing was about. Just did some tests with it now and I finally understand :D
This all makes things a WHOLE lot better!
In this tutorial I show you how to attach model parts of one model to another model that is animated. For example you can attach with this method ultralisk parts to a high templar:
I recommend that you do at least the first part of my Coin Tutorial if you haven't used my m3addon yet. For questions about the m3addon please have a look at my my m3addon FAQ first.
Important background information
Model (Mesh) aniamtions in m3 files are realized with so called bones. A bone is an invisible object that has a rotation, location and scale. Each bone influences to a certain degree a mesh (= a bunch of triangles of which each model is made). In m3 files only the bones are aniamted and they animate through their influence the mesh.
Blender can animate models also via bones. When you import an existing SC2 model you will get an animated bone strucucture called armature and one or multiple meshes that are influenced by it. The relationship between mesh objects and armature will be created for you by the importer.
When you add meshes you typically want them to move according to the existing bones. So you need to tell Blender that your added mesh should also be influenced by the armature. The quick way to do that I will show below. The slow "manual" way would be to add a Armature Modifier to the mesh object. To add the armature manually you would select the mesh object and then add add the armature modifer as shown in the following screenshot:
Since an armature has multiple bones Blender needs to know which bone affects which part of the mesh. This is done via so called vertex groups. A vertex (point of a triangle) can belong to up to 4 vertex groups (m3 format limitation) to a certain degree. e.g. 80% to the vertex group A and 20% to the vertex group B. If a vertex group has the same name as a bone then Blender will assume that the vertex group is controlled by the bone. So in the above example the position of the vertex would come to 80% from bone A and to 20% from bone B.
Since it is a lot of work to assign each vertex indifidually to multiple vertex groups it isn't ususally done manually. Instead you can tell Blender will a single command, that Blender should create a modifer and vertex groups for you, based on the position of the bones and meshes. This works often extremly well. Sometimes you need to fine adjust. In the last section I show you how to do such fine adjustment.
A way of importing that saves you work later
M3 files contain a lot of meta data. With meta data I mean for example invisible hit boxes, that are used to determine if you have selected a model. If you just want to take one part of a model, those hit boxes are totally unfitting and thus worthless. Deleting unwanted meta data is a lot of work. If you are interested only in the mesh with its materials, you can set the import option shown in the screenshot:
Once you have set the option, simply import the model from which you want to take some static parts. Before you import the model that should stay animated, you need to set it back to "Everything".
Cutting out parts of the models
How to edit meshes is shown in a lot of Blender tutorials. Here is a collection of Operators/Hotkeys that are expecally usefull when cominging models:
Making the new parts move with the existing animated model
1. Firstly you want the bones to be displayed in the rest position. That is the position in which they are attached to the mesh. The following screenshot shows you how to do so. Also good is the X/Rays options which allows you to see bones through the mesh.
2. Position your mesh parts at the positions where you want them
3. Select all your added mesh parts and the armature. Select the armature last so that it is active. Per default you can select objects in the 3D View with a right click. If you hold shift you add an object to the selection. It should then look like that(notice how the bones have a differnt border):
Alternativly you can shift + left click in the outliner to select the objects:
4. Once your meshes are selcted and the armature is active press [ctrl] + [P] and select the option marked in the next screenshot:
5. To watch the model animations in blender, you have to disable the setting again, that the bones are locked in their rest positions:
Ways to fine adjust how the added parts get animated
One way to adjust a vertex group is via weight painting. In a special weight paint mode you can paint on the mesh to increase the influence of a selected vertex group / bone on it. The weight painting looks then like this:
The red parts belong very strong to the current vertex group. The green ones partly. The blue ones a little. The black ones not at all. Via the hotkey [t] you can open a toolbar to adjust the brush.
It is also possible to set the selected vertices to a certain weight if you are in edit mode. The following screenshot shows how to do it:
If you are interested in finding out to which vertex groups / bones a vertex belongs, then you can use the properties bar in the 3D view (hotkey N) to find out:
@println: Go
I love how you constantly build and support your addon. To me that's i.e of the biggest things that makes it so useful. That and it's ease of use.
I added two sections to the tutorial
@println: Go Hey PrintIn, I just downloaded the addon, but the import section doesn`t show that "mesh with materials only" field.
@SoulFilcher: Go
Did you downloaded https://github.com/flo/m3addon/archive/master.zip ?
Can you upload a screenshot of how your "M3 Import" panel looks like? Note: It is per default not at the top. Panels can be reordered (I show that in the first part of my coin tutorial) and I did that.
@println: Go I downloaded it again from the link you provided just to be sure, but nothing changed. Here is the printscreen.
@SoulFilcher: Go
Odd I downloaded the same thing and it works fine for me.
@SoulFilcher: Go
Try to remove the addon and start Blender again. If the m3addon is still there then it is another m3addon version from a different directory.
Blender looks at least 2 directories for the addon. The version specific place I describe in my coin tutorial and the place where the addons are that come with blender are.
@println: Go Ok, I found the problem. It seems that unlike previous versions extracting this one from the zip file gave me a folder inside another one and it caused trouble. Probably because I'm using Windows 8 right now and I did something different to extract it.
@SoulFilcher: Go
That's how it has always worked for me. It's always been a folder inside a folder.
When importing warp in models for Warpgate protoss units they get all bugged, some meshes get stretched, some textures go crazy, like the little hexagon things. I also noticed that a lot of models get moved in all 3 axis in this last version, specially if imported after another model, and it appears that its always to the same position.
@SoulFilcher: Go
About the mesh streching: I checked the Zealot Warp In model. The stretched textuers come from an exotic propably 3ds max specific way of bone transformation(A bind maxtrix which does more than a rotaiton, scale and translation). It would be possible to work around it in Blender but that would require a change that would propably break existing blend files with imported models. So I am not sure if it is worth it.
About the "textures going crazy": Can you be more specific: What model is affected? Which part is wrong? How does it look and what should it look like?
About the position of imported models: Imported models get placed at the position of your 3d cursor in blender. With [shift] + [s] you can open a menu to set the "cursor to center".
@println: Go I should have added a screenshot. I'm not sure what the issue is but it seems that A: the textures (possibly just alpha) get moved, and B: the particles don't get created in the same position as before. Here you can see Stalker warp in on the left, and my edited version on the right.
@SoulFilcher: Go
Can't reproduce your problem. The initial particles are screwed up due to the transformation that is not importable to Blender. The rings look fine however.
This may sound really dump. but "CRTL +P" doesn't do anything for me?
Custom Campaign Initiative
@WingedArchon: Go
Maybe the cursor was over the wrong window or you didn't have the objects properly selected.
Its fixed. Thanks man!!
tested it out to make my Paladin Unit:
But this time from a real blender remodelled design. However I get stuck-ish.... The thing you say where I can make the stalker a parent works.. but not for the entire mesh of the void seeker. For instance, the long tendrils to the front and back do not move.. what can I do to correct it? I've tried addign in more constraints on either the mesh or the armature but it doesn't work.
Custom Campaign Initiative
@WingedArchon: Go
Without investing a lot of time in order to figure out what you may or may not have done wrong it is hard to help you.
Maybe this background information may help you to figure it out by yourself:
You animate the pose position of armature bones and exactly one armature modifier on the mesh tells m3addon that they belong together. If an amature and mesh is linked that way the transformation of a bone of that amature will move all vertices ofthe mesh that belongs to a vertex group that has the same name as the bone.
I am not sure what you mean with constraints but none get exported.
Now I understand what it was. I never realized how the entire paint weighting thing was about. Just did some tests with it now and I finally understand :D This all makes things a WHOLE lot better!
Custom Campaign Initiative
Oh wow, hadn't seen this post before. Very cool. If only there were enough time to get awesome at everything in map making xD