Units import/export to Blender

Post here if you want to help developing something for FAF.

Units import/export to Blender

Postby Oygron » 27 Jul 2014, 21:20

Hi all,

I recently updated the scripts to import/export FA units to Blender (a free software for 3D modeling). With it, you can modify/create units and animations for Forged Alliance. (The previous version of the script was for a very old version of Blender and had little bugs on animation)

As a new user, I cannot post the link to the scripts. But you can find it by looking, on Github, for a repo called SupCom_Import_Export_Blender by Oygron. (if a mod can modify my post to paste the link, that would be great).

Do not hesitate to inform me of bugs you may find.

Oygron
Oygron
 
Posts: 4
Joined: 27 Jul 2014, 21:04
Has liked: 0 time
Been liked: 0 time
FAF User Name: Oygron

Re: Units import/export to Blender

Postby Cuddles » 28 Jul 2014, 08:39

https://github.com/Oygron/SupCom_Import_Export_Blender
Python scripts to import and export Supreme Commander units (.scm) and animations (.sca) in Blender.

Place the .py scripts in BlenderInstallDir/v.num/scripts/addons

They'll appear in import/export category in Blender.

Tested on Blender 2.71

known bugs : Order of bones are not respected at export.

More informations at : http://forums.gaspowered.com/viewtopic.php?t=17286

Credits to dan & Brent for the original version and all the engineering work. My unique job was to port the addons from blender 2.49 to blender 2.71
Turinturambar defended very valiantly
User avatar
Cuddles
Contributor
 
Posts: 684
Joined: 29 Mar 2013, 14:19
Has liked: 131 times
Been liked: 118 times
FAF User Name: Scoot

Re: Units import/export to Blender

Postby DarkMatterVale » 28 Jul 2014, 13:59

Hi,

I have encountered an error and am wondering if you can help me. When I put the scripts in the location and opened Blender, Blender didn't recognize the file types for SupCom and didn't show the option to import and export SupCom files. Is there something I missed?
DarkMatterVale
Crusader
 
Posts: 17
Joined: 24 Jul 2014, 14:57
Has liked: 1 time
Been liked: 0 time

Re: Units import/export to Blender

Postby spooky9 » 29 Jul 2014, 11:56

@DarkMatterVale
You need to enable them in the preferences.

Go to User preferences (ctrl+alt+u)
Click Addons
Click Import-Export
Find and enable Supcom Exporter and Supcom Importer
spooky9
Avatar-of-War
 
Posts: 67
Joined: 07 Nov 2013, 19:03
Has liked: 1 time
Been liked: 5 times
FAF User Name: spooky9

Re: Units import/export to Blender

Postby DarkMatterVale » 29 Jul 2014, 19:32

Thanks @spooky9!

That solved my problem immediately. Now if only I could figure out how to edit the files.....
DarkMatterVale
Crusader
 
Posts: 17
Joined: 24 Jul 2014, 14:57
Has liked: 1 time
Been liked: 0 time

Re: Units import/export to Blender

Postby Oygron » 30 Jul 2014, 19:36

Hi,

What do you mean by "Now if only I could figure out how to edit the files....."?
Can I help you with anything?
Oygron
 
Posts: 4
Joined: 27 Jul 2014, 21:04
Has liked: 0 time
Been liked: 0 time
FAF User Name: Oygron

Re: Units import/export to Blender

Postby DarkMatterVale » 30 Jul 2014, 19:58

Thanks!

I mean that there is no basic tutorial for editing unit animation and mesh files. I would appreciate a little introduction to that kind of thing. I am not asking for anything fancy, I am just asking for a simple explanation.

Could you please explain the basics of editing files? Thanks for the help!
DarkMatterVale
Crusader
 
Posts: 17
Joined: 24 Jul 2014, 14:57
Has liked: 1 time
Been liked: 0 time

Re: Units import/export to Blender

Postby Oygron » 30 Jul 2014, 21:41

I'll go with some quick tips about units on Supcom here.

- To import animations (.sca), you have to have already loaded a model on Blender, either the corresponding mesh (.scm), or a custom mesh of your own, with the bones corresponding in names with the animation bones (each bone named in the animation must have a corresponding one with the same name in the mesh).

- When creating a new unit, the central bone (parent of all other bones of the armature) of the unit MUST have the same name as the unit

- All vertices must be in "Vertex Group", and each vertex group must have the name of a bone. If some vertices are not moving, just give assign them to the group with the central bone as bonename.

- An animation must be associated with an action (see the NLA editor).

- When exporting, the script will assume the unit name (and so the .scm filename) from the central bone, and the filename for the animation from the action name in Blender (can be seen in the NLA editor). So you'll have only to select the output folder, filenames will be deduced (I hope to change that later, making only a name default value that the user can change).

My objective is to complete the mod unit creation article on the Supcom Wikia (again, still not been on here long enough to post URLs). It will be more detailed that here, but that won't be for a few weeks.

You can also get lots of tips by looking on the Gaspowered forum (link in the post from Scoot) in the "Mod Development and Discussion" -> "Modeling, Texturing, & Animation" section (there is even a thread on Blender, using the old version of Blender, but all is still valid).


If you don't know Blender yet, I'm afraid that it is "a bit" too complex to explain it here, you'll have to go through tuts and learn modeling and animation before being able to modify units.
Oygron
 
Posts: 4
Joined: 27 Jul 2014, 21:04
Has liked: 0 time
Been liked: 0 time
FAF User Name: Oygron

Re: Units import/export to Blender

Postby DarkMatterVale » 31 Jul 2014, 15:58

Thanks for the help. As I am new to animation and modeling, I don't understand all of what you said, but it still helps and is still appreciated.

I look forward to seeing your wiki post!
DarkMatterVale
Crusader
 
Posts: 17
Joined: 24 Jul 2014, 14:57
Has liked: 1 time
Been liked: 0 time

Re: Units import/export to Blender

Postby Hexacosichoron » 05 Aug 2015, 02:11

Hi, Oygron. Placing the .py scripts in the addons folder does not seem to work for either 2.73 nor 2.75. However, if I copy the importer script into the script editor and run it, that works to give me import options for .scm and .sca, but the export script gives me an error when I try to run it.
User avatar
Hexacosichoron
Crusader
 
Posts: 37
Joined: 08 Mar 2015, 21:11
Has liked: 3 times
Been liked: 17 times
FAF User Name: Hexacosichoron

Next

Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest