Thanks for the trick. Here what i mean, when i save a model with many sequences animation and close blender and reopen, i can only play the animations where i saved. The message console :
Warning: The action AttackArmature was referenced by name but does no longer exi
st
Warning: The action DEFAULTS_FOR_Armature Object was referenced by name but does
no longer exist
Warning: The action DEFAULTS_FOR_MeshObject.002 was referenced by name but does
no longer exist
Warning: The action DEFAULTS_FOR_MeshObject.001 was referenced by name but does
no longer exist
Warning: The action DEFAULTS_FOR_MeshObject was referenced by name but does no l
onger exist
Warning: The action DEFAULTS_FOR_Lamp was referenced by name but does no longer
exist
Warning: The action DEFAULTS_FOR_Camera was referenced by name but does no longe
r exist
Warning: The action DEFAULTS_FOR_Scene was referenced by name but does no longer
exist
Is it the same for you? or it s something i haven't done well?
I can't seem to get the exporter to work, I have imported all the files in the correct location. When I go to addons in Blender I am able to select the m3import addon but the m3export is not shown anywhere. I'm using Blender 2.66, am I missing something?
The space ship contains subdivision modifiers. You can't export the model without applying the modifiers first. If you apply however the modifers then you will obtain a model with a lot of triangles which is bad. Ideally would need to create a low poly version of the model first and then bake textures using the high polygon model. Also you need to add some meta data before exporting. For example each mesh needs to have a M3 Material assigned and the model should have at least one animation. Adding hit boxes is also necessary when the unit should be selectable. How this meta data can be added is shown in the videos of this tutorial.
It's just one addon which is called "Import-Export: Importer and exporter for Blizzard's Starcraft 2 model files (*.m3)" in the UI. It will only show up if you placed the m3addon files at the correct location. See the tutorial and the m3addon readme file for more information.
Alright, thanks. I got it working now. I have a quick question though, if someone wants to answer. If I import a doodad and paint textures on it in blender, will those textures export along with it? A doodad wall I want to retexture doesn't seem to have any options to add a separate texture file in the SC2 data editor so I assumed the texture is built in or something?
M3 models don't contain textures. They reference the textuers with a game relative path. You can reference either one of the existing textures or you can reference textures which you have imported in your map.
How you specify for a m3 model which texture should be referenced I show in the second video of this tutorial (3rd minute till end).
How you properly import a model and it's textures into SC2 is shown in another tutorial which is somewhere in this tutorial section.
Hi, animation are not imported anymore, when i create animation (toggle + >Walk). Then i exported, there are error messages. However i found a way to exporte, importing first a m3 model then deleting it, after i make my mesh and add animation and the animation can be exported. It would be cool the bug is fixed.
I ve got some issues, are there meshs for m3 ribbon, can i apply a texture with uv, can i see the render in blender?
How m3 rigid bodies and m3 physic shape can be used? m3 physic mesh is used with m3 with physic shape?
I don't understand the question "qre there meshs for m3 ribbon". Ribbons can have a cylinder/cone like shape if that is your question. You can look at the corrupter model or the zealot hair for an example(both are textured). I haven't added proper visualization of ribbons within Blender yet. Till now there has been little interest in that area.
There is also a ribbon type which isn't supported yet: Ribbons with end points.
To use rigid bodies you need to create first a bone. That bone will then represent the phsical object. You can assign a mesh the usual way to it to visualize the phsical object. In the M3 ridid bodies panel you need to type in the name of that bone. Then you need to add a physical shape to the rigid body via the M3 Physical Shapes panel. Physical shapes can be primitives like boxes or cylinders, or they can reference a mesh which will then be used as physical shape.
In the cutscene editor of SC2 you can visualize the physical shapes of objects. The most usefull purpose of those physics seem to be the ability to create objects on which untis can walk on. Except for that the complete physic simulation is purly for visual effects. They have no effect on gameplay.
There is a new improved and quite different way of storing phsyial objects introduced in patch 2.0. There are how many field which I haven't figured out yet and there are field of a unknown type.
To summarize it up, the addon has quite room for improvement, but I am just one person with spare free time. Should someone want to help out feel free to ask how to get started.
I improved the exporter. It is now able to export animations that use IK constraints. Animations based on other constraints and drivers should now export properly too.
Ok i'll try that. Sorry I express myself badly, i wanted to say : can i make a mesh in edit mode and modeling (for exemple hairs like goku) and make it a ribbon? but i think it s not possilble like this. I know i can make that with keys animation (like the hair KerriganGhost model) but i wanted live animation. Is there a way to put a force on a modeling mesh and simulate ribbon? cause cloth or rigid bodies modifier don t work.
I think i m not very gifted for programming language i m more a artist. Thank for your reply and your work on the m3 addon.
There is a structure called PHYJ in some death animations m3 files. I could imagine that it stands for physical joint and is used to connect rigid bodies.
If that is so it might be possible to create that hair with custom mesh. Forces can also be defined in m3 files, but currently I only know how to make them effect particle systems.
Another way to archive a similar effect would be to have global loop animations for the hair and have actors trigger them in certain situations. Global loop animations can run concurrent with other animations. That way you could animate the hair while the usual animation continues. Blizzard used that techinice for energy lines on protoss buildings and for the rotors of the banshee.. If you are interested in that topic I can explain further how to archive that effect or you can learn from the existing Blizzard models.
There are also other ways to speed up the m3addon development without writing code. For example I am spending also a lot of times on making tutorials for the m3addon and figuring out how Blender works (Just watched an IK tutorial a few days ago). Good tutorials increase the fanbase and might interested someone else to write code for the m3addon.
There are a lot of Blender and m3addon features, for which I haven't been able to write a tutorial yet. Just to name a few:
With Blender it's possible to bake normal maps. Starcraft 2 supports normal maps too, but need them in a slightly different format. A tutorial which shows all the steps from a high polygon model to a low polygon model with textures would be great. Once the manual steps are clear, I might extend the m3addon to automate the process.
You where the first who reported that exporting IK based animations does not work. My coin tutorial gives the wrong impression that it is very hard to animate a human body with Blender. A tutorial would be great that shows for example the "X-Rays" option, the way to automatically weight bones, how to use the rigify addon and how to apply IK constrains. Also showing the "Auto IK" option in a tutorial would be a good thing to do.
There are a lot of different material types. There is for example a displacement material which can be used for cloak, heat, water or glass effects.
There are also a lot of data structures which haven't been shown of in a tutorial yet. For example can the "M3 Attachment Points" panel be used to define missile impact areas on a model.
How global loops can be used could also be shown in a tutorial.
Actually i found a way to make many animation in ik rig, then bake like you told me, cause when i baked the walk animation for exemple, and if i had made another animation like attack, it breaked it. Therefor i made a blend file for each animation and baked it then in a another blend file, i appended the armature and copied the keys. This method works and i can take only the bones that i need, cause for the game, some bones that are used for ik chain are not useful and i don't know if it's heavy to had many bones. To improve the addon it could be good to import only the selected bones or some bones in a layer, but maybe it s not the more important because it s possible to do otherwise.
I tried the export just with a simple model i made, that what i noticed :
- the rotation for bone hand and foot are not correct, in some other part fo the body too.
- some meshs are deformed (on the knee and other...)
I tried to bake before the export, and the FK animation look the IK animation but when i export the m3 file do not correspond to the IK animation anymore.
I looked at the fcurve and it s seem to be the same, so i don t know ... i let you the blend if you want to look at the test model.
The setting "Inherit Rotation" does not get exported. That is why some bones look different after the export.
Instead of the "Inhert Rotation" flag you can use a "Copy Rotation" constraint to make the hand bone have the same rotation as the IK hand bone. That way the rotation of the hand bone does not change when you position the IK hand bone. And when you want to set the rotation of the hand, you can simply rotate the IK bone.
It's shown in this nice tutorial I found about the topic:
@println: Go
Thanks for the trick. Here what i mean, when i save a model with many sequences animation and close blender and reopen, i can only play the animations where i saved. The message console :
Warning: The action AttackArmature was referenced by name but does no longer exi st Warning: The action DEFAULTS_FOR_Armature Object was referenced by name but does no longer exist Warning: The action DEFAULTS_FOR_MeshObject.002 was referenced by name but does no longer exist Warning: The action DEFAULTS_FOR_MeshObject.001 was referenced by name but does no longer exist Warning: The action DEFAULTS_FOR_MeshObject was referenced by name but does no l onger exist Warning: The action DEFAULTS_FOR_Lamp was referenced by name but does no longer exist Warning: The action DEFAULTS_FOR_Camera was referenced by name but does no longe r exist Warning: The action DEFAULTS_FOR_Scene was referenced by name but does no longer exist
Is it the same for you? or it s something i haven't done well?
@Dhoude: Go
It's a bug. However fixing it properly means changing how the animations get stored in Blender. I will work on it tomorrow evening.
@println: Go
Ok, Thanks for your work and investment.
ive been trying for a week to get this to work, but i have no clue why it wont
would some1 please convert this for me
SPACE SHIP
if not, im going to just give up on it.
I can't seem to get the exporter to work, I have imported all the files in the correct location. When I go to addons in Blender I am able to select the m3import addon but the m3export is not shown anywhere. I'm using Blender 2.66, am I missing something?
@Dhoude: Go
I changed how animations get represented in Blender. Animations and default values should now be remain even if you save and reload the blend file.
@Zergslayer: Go
The space ship contains subdivision modifiers. You can't export the model without applying the modifiers first. If you apply however the modifers then you will obtain a model with a lot of triangles which is bad. Ideally would need to create a low poly version of the model first and then bake textures using the high polygon model. Also you need to add some meta data before exporting. For example each mesh needs to have a M3 Material assigned and the model should have at least one animation. Adding hit boxes is also necessary when the unit should be selectable. How this meta data can be added is shown in the videos of this tutorial.
@Pikdum: Go
It's just one addon which is called "Import-Export: Importer and exporter for Blizzard's Starcraft 2 model files (*.m3)" in the UI. It will only show up if you placed the m3addon files at the correct location. See the tutorial and the m3addon readme file for more information.
@println: Go
Alright, thanks. I got it working now. I have a quick question though, if someone wants to answer. If I import a doodad and paint textures on it in blender, will those textures export along with it? A doodad wall I want to retexture doesn't seem to have any options to add a separate texture file in the SC2 data editor so I assumed the texture is built in or something?
@println: Go
That's great, thanks.
@Pikdum: Go
M3 models don't contain textures. They reference the textuers with a game relative path. You can reference either one of the existing textures or you can reference textures which you have imported in your map.
How you specify for a m3 model which texture should be referenced I show in the second video of this tutorial (3rd minute till end).
How you properly import a model and it's textures into SC2 is shown in another tutorial which is somewhere in this tutorial section.
It's btw. also often possible to exchange the texture of a model without modifing a model itself: http://www.sc2mapster.com/forums/resources/tutorials/20772-data-actor-events-message-texture-select-by-id/?unread
If you want however to modify the material properties (e.g. adding an emissive texture) then you need to modify the model.
@println: Go
Hi, animation are not imported anymore, when i create animation (toggle + >Walk). Then i exported, there are error messages. However i found a way to exporte, importing first a m3 model then deleting it, after i make my mesh and add animation and the animation can be exported. It would be cool the bug is fixed.
@Dhoude: Go
Hi, thanks for the bug report. It's fixed.
@println: Go
Cool
@println: Go
I ve got some issues, are there meshs for m3 ribbon, can i apply a texture with uv, can i see the render in blender? How m3 rigid bodies and m3 physic shape can be used? m3 physic mesh is used with m3 with physic shape?
@Dhoude: Go
I don't understand the question "qre there meshs for m3 ribbon". Ribbons can have a cylinder/cone like shape if that is your question. You can look at the corrupter model or the zealot hair for an example(both are textured). I haven't added proper visualization of ribbons within Blender yet. Till now there has been little interest in that area.
There is also a ribbon type which isn't supported yet: Ribbons with end points.
To use rigid bodies you need to create first a bone. That bone will then represent the phsical object. You can assign a mesh the usual way to it to visualize the phsical object. In the M3 ridid bodies panel you need to type in the name of that bone. Then you need to add a physical shape to the rigid body via the M3 Physical Shapes panel. Physical shapes can be primitives like boxes or cylinders, or they can reference a mesh which will then be used as physical shape.
In the cutscene editor of SC2 you can visualize the physical shapes of objects. The most usefull purpose of those physics seem to be the ability to create objects on which untis can walk on. Except for that the complete physic simulation is purly for visual effects. They have no effect on gameplay.
There is a new improved and quite different way of storing phsyial objects introduced in patch 2.0. There are how many field which I haven't figured out yet and there are field of a unknown type.
To summarize it up, the addon has quite room for improvement, but I am just one person with spare free time. Should someone want to help out feel free to ask how to get started.
@Dhoude: Go
I improved the exporter. It is now able to export animations that use IK constraints. Animations based on other constraints and drivers should now export properly too.
@println: Go
Ok i'll try that. Sorry I express myself badly, i wanted to say : can i make a mesh in edit mode and modeling (for exemple hairs like goku) and make it a ribbon? but i think it s not possilble like this. I know i can make that with keys animation (like the hair KerriganGhost model) but i wanted live animation. Is there a way to put a force on a modeling mesh and simulate ribbon? cause cloth or rigid bodies modifier don t work.
I think i m not very gifted for programming language i m more a artist. Thank for your reply and your work on the m3 addon.
@Dhoude: Go
There is a structure called PHYJ in some death animations m3 files. I could imagine that it stands for physical joint and is used to connect rigid bodies. If that is so it might be possible to create that hair with custom mesh. Forces can also be defined in m3 files, but currently I only know how to make them effect particle systems.
Another way to archive a similar effect would be to have global loop animations for the hair and have actors trigger them in certain situations. Global loop animations can run concurrent with other animations. That way you could animate the hair while the usual animation continues. Blizzard used that techinice for energy lines on protoss buildings and for the rotors of the banshee.. If you are interested in that topic I can explain further how to archive that effect or you can learn from the existing Blizzard models.
There are also other ways to speed up the m3addon development without writing code. For example I am spending also a lot of times on making tutorials for the m3addon and figuring out how Blender works (Just watched an IK tutorial a few days ago). Good tutorials increase the fanbase and might interested someone else to write code for the m3addon.
There are a lot of Blender and m3addon features, for which I haven't been able to write a tutorial yet. Just to name a few:
@println: Go
Actually i found a way to make many animation in ik rig, then bake like you told me, cause when i baked the walk animation for exemple, and if i had made another animation like attack, it breaked it. Therefor i made a blend file for each animation and baked it then in a another blend file, i appended the armature and copied the keys. This method works and i can take only the bones that i need, cause for the game, some bones that are used for ik chain are not useful and i don't know if it's heavy to had many bones. To improve the addon it could be good to import only the selected bones or some bones in a layer, but maybe it s not the more important because it s possible to do otherwise.
I tried the export just with a simple model i made, that what i noticed : - the rotation for bone hand and foot are not correct, in some other part fo the body too. - some meshs are deformed (on the knee and other...)
I tried to bake before the export, and the FK animation look the IK animation but when i export the m3 file do not correspond to the IK animation anymore. I looked at the fcurve and it s seem to be the same, so i don t know ... i let you the blend if you want to look at the test model.
@Dhoude: Go
The setting "Inherit Rotation" does not get exported. That is why some bones look different after the export.
Instead of the "Inhert Rotation" flag you can use a "Copy Rotation" constraint to make the hand bone have the same rotation as the IK hand bone. That way the rotation of the hand bone does not change when you position the IK hand bone. And when you want to set the rotation of the hand, you can simply rotate the IK bone.
It's shown in this nice tutorial I found about the topic:
@println: Go
Thanks, it s ok now, i understand why my meshs were deformed too.