The Sporum - The Official Spore Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to forum index 
[Login] Login 
Blender Guide to Spore Creatures  XML
Forum Index » Spore General Discussion
Author Message
Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Trying to get your Spore creatures into Blender? This is where I will put the known Blender methods in one easy spot for your convenience. Thanks to scozdawg, KCDJedi, MaxisEditorDan, MaxisCHecker, and everyone else for helping find all this.
Thanks to Noirtalon for doing a bunch of exports for me. Thanks to her, you will have screenshots eventually.
Video Guides
This is the start to going through the export process via video. I don't remember which iteration this is, thanks to retarded movie capture program. We'll just have to see what comes out.
NVM, all I got for the last one was a 2-minute capture of my menu bar. So exciting. I'll just try again this evening,

Changing Formats

What:
Blender cannot support Collada 1.4.1 reliably yet, so a different format is needed.* There have been two main methods for doing this, the Wavefront .obj and the 3DS Max .3ds.

.obj format gives you (mostly) working textures, but no rig. Recommended for textured renders, especially where a lot of the body is visible.
.3ds gives you the rig and textures on the parts, but no body textures. Recommended for procedurally-textured renders, where the UV's don't matter.
Research is pending to combine the methods and get the best of both worlds.

* Caveman79 was able to modify the base files for the Collada importer to get a successful model. In my experience, this merely broke the importer permanently and it will require reinstallation to fix it. His method is here: http://forum.spore.com/jforum/posts/list/285/37155.page. Scozdawg posted a fuctional copy of the modified .py script HERE.

How:
1. Download the .fbx converter here: http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=10775855. There is a different version for each OS, so be sure to pick the right one.
2. Put the .dae file from Spore into the left-hand pane by dragging or using the menus. Don't change anything on the right-hand pane. Click the convert button in the bottom-right.
3. Put the .fbx file the program just gave you into the left panel in place of the .dae.
4. In the "Destination Format" menu, select either .3ds or .obj. For .obj, uncheck the "Triangulate" and "Bake Deformation" options.
5. Click the convert button again. Done.

Starting Blender

What:
You can't open your converted file directly. This is what you do in preparation and what you will see when you start the program.

How:
1. Open Blender. Under teh file menu, choose "New."
2. You should be presented with a scene with a box and a lamp on a grid. Get rid of the cube by pressing x. It is only useful when you're modeling. If you don't see the 3D scene, look at the button in the lower left of that half of the window. Click on it and select the 3D view option.


Getting the file into Blender

What:
You can't just open a file other than a .blend file in Blender. You must import your creature and create a .blend.

How:
1. Open Blender.
2. Select the cube with the right mouse button (RMB) and press X to delete it.
3. Go to the "file" menu and choose "Import." Then pick whichever file format you chose in the conversion.
4. Navigate to the file and select it. Deselect "Load UI" on the bottom of the pane.
5. Click "Import" and answer the popup window.
For .obj the following options should be selected:
NGons as FGons, Lines as Edges, Keep Vert Order
For .3ds, use defaults.

Fixing the model up

What:
The model is there, but there is still some stuff to do to make it render well. At any time during the following, you may select Render/Render current frame to see why we do what we do.

How:
1. The model is laying face-down, so type ry-90 and hit return. R means "Rotate," Y specifies which axis to rotate on, and -90 is the number of degrees.
2. All of the polygons are explicitly visible. Look in the lower tab and notice the button with the square on it. Select it if it isn't selected. This gives you the mesh editing tabs. (You may return here at any time by clicking the aforementioned button) In the "Link and Materials" tab, select "Set Smooth" (the "H" may be cut off so it says "Set Smoot"). Now your model looks like it does in-game. This step made Blender give you four times the number of normals per vertex, making each face round instead of flat.
3. Render the creation to see how you've done. It should be facing to the left of the frame and be smooth-looking.
4. Read on to find out how to handle the textures.

Applying the materials

What:
Your model is still a default gray color, because your material didn't come through. Now we're going to reassemble the material. This is the most complex step, and will likely get you nowhere with a .3ds file.

How:
1. In the "Editing" pane, look where it says "1 Mat 1" Click "New" underneath that. This gives you a new material.
2. Select the lower-panel button with the gray sphere. This gives you the "materials" tabs.
3. Go to the far right tab. In the vertical row of rectangles, select the top one. This creates a new texture for the material.
4. Select the "Map input" tab. Select "UV." This tells Blender to apply the texture according to the UV layout the game included with the creature. "Orco" simply drops the texture over the creature like a blanket - not cool.
5. Click the leopard print button to get the textures tabs.
6. Select the newest "Tex" box from the stack of rectangles (like the one from before, but wider). Under the "Texture Type" chooser next to it, select "Image."
7. In the "Image" tab, click "Load" and pick one of your texture maps. (you should have three per critter: Name_specular.tga, Name_normal.tga, and Name_diffuse.tga) For the diffuse map, look in the "Map Image" tab and deselect "UseAlpha."
8. Go back to the "Material" pane using the button with the red sphere on it.
9. Select the "Map to" tab. "Col" should be selected. You want different options here for each map . For the diffuse map, leave "Col" selected. For the normal map, deselect "col" (Very important) and select "Nor." For the specular map, deselect "col" (Very important) and select "Csp."
10. Repeat steps 3-9 for both of the other maps.
11. Return to the "Editing" tab. Press the "tab" key. This puts the mesh in Edit mode, where you can see and deal with all the vertices. Press "a" to select all.
12. Click the "Assign" button in the lower pane.

You should now be ready for non-posed renders.

Addendum to script modification:
Noirtalon wrote:caveman 76's instructions are http://forum.spore.com/jforum/posts/list/285/37155.page

Also Note. If you are stuck trying to do this on window vista, the python importer will be in this directory:

C:\Users\<USER>\AppData\Roaming\Blender Foundation\Blender\.blender\scripts\bpymodules\colladaImEx

<USER> _should_ just be the name of the user you are currently logged in as. In some cases it may be the name of the user blender was installed under

Note: I am running python 2.6. It got installed on my vista machine when I installed blender.
Phython 2.6 got installed in c:\Python26

What I did to get models to import into blender, with bones and automatically load the texture maps and bones was:
exit blender (all instances)
download caveman79s the fixed collada import python script (Eochaid1701's instructions at the head of this thread).
I navigated to C:\Users\<USER>\AppData\Roaming\Blender Foundation\Blender\.blender\scripts\bpymodules\colladaImEx
I then renamed translator.py to translator.py.orig
I renamed (DON"T FORGET THIS) translator.pyc to translator.pyc.orig

Then I copied the fixed translator.py I downloaded into C:\Users\<USER>\AppData\Roaming\Blender Foundation\Blender\.blender\scripts\bpymodules\colladaImEx
(no I didn't bother trying to compile the new translator.py by hand)
Fired up blender
Then picked a model to import (for me the models are C:\Users\<USER>\Documents\My Spore Creations\Creatures
Switched the view to "textured"
right clicked on an "armature" (blender's name for bones)
then blender let me switch to "Pose Mode"


Eric's Import Modifier:
1) Fix the Collada file. Open your .dae file in a plain text editor (I highly recommend Notepad++, but Notepad will do). Do a search-and-replace operation to replace [id="sroot"] with [id="sroot" name="sroot"]. (Omit the square brackets I've used to delineate them, in both cases).

What we just did was to provide the base bone everything else is rigged to with a name, so that the import script doesn't get confused trying to refer to it.

2) Download the altered script file from HERE, and replace the existing .blender/scripts/pymodules/colladaImEx/translator.py file (after renaming the old one, of course). Or, for those wishing to improve on the process, take your own copy of Caveman79's/scozdawg's/original translator.py file and do the following:
2a) On line 69, set the "dmitri" flag to 1 instead of 0. This may not matter, but I changed it at some point and it was still set when I got things working... so it stays for now.

2b) Around line 870, you will find these instructions in the definiton of the bindMesh method:
Immediately after those lines, insert the following:What this does is to catch it when that same root bone doesn't have an "at rest" transformation matrix defined, and provide it with one – one that happens to be the identity matrix. I'm not even sure it's critical that this be the identity matrix, since the actual content of it may basically get overwritten in step 3 below, but it's important that it exist and be invertable and nontrivial so that the code can process it.

2c) If you are starting from a clean version of translator.py, you will also need to make Caveman79's fix. I replicate it here for completeness' sake. Around line 990 of the code, find the following lines:
and replace them with


3) Now open up Blender and try an import of your Spore critter of choice. (I suggest starting with something simple. Part of why I was able to get through this so fast is thanks to "Simplistico", who has two vertebrae and a proboscis and nothing else whatsoever; I created him just for the occasion. He's a sort of pleasant blue-green colour and I owe him a great deal of thanks.) It may look great; it may look moderately deformed. It wouldn't surprise me if some of them were extremely messed up. But you can fix that.

In Object mode, select the armature. Go to Pose mode. Use 'A' to select/deselect all the bones until you have them all selected. Hit 'Alt-R' to clear all rotations, and confirm that. Hit 'Alt-G' to clear all translations and 'Alt-S' to clear all scalings, and confirm those as well. This should eliminate the weird pose data and leave it in its default pose.

You can now stay in Pose mode, deselect all ('A' again), and move individual bones to see what they do. I suggest setting the 'X-Ray' option on your armature object, so that it shows through solid objects, while posing. If you put the skeleton on Layer 2 (in object mode hit 'M', then the second box) then you can view/hide the skeleton and the body individually, which also helps a lot.

4) The textures will have come through only sort of. Go back to the first post of this thread, to Eochaid's .3ds/.obj method. Steps 1-9, and 11-12, have already been done for you by the importer; the diffuse map is correctly set up and the material applied. (If you have your view mode set to 'Textured' you'll have noticed that already.) You will still need to follow steps 3-9 for both of the other maps, noting the difference in settings in step 9 for the normal and specular maps.

Presumably, the importer ought to be doing this, and isn't. If some enterprising soul feels like doing so, the importer could be set to eliminate the need for my step 1 (change the .dae) and step 4 (apply the normal and specular maps). A really enterprising person could presumably even figure out why step 3 (undo the squishiness issue) happens and remove it. However, with the Summer of Code so close to ending, this procedure ought to be plenty close enough to automatic.

Happy posing!
- Eric F.

This message was edited 11 times. Last update was at 07/25/2010 20:19:21



BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Rigging and Bones
http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Bones

This message was edited 2 times. Last update was at 08/09/2009 01:23:48



BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Reserved for render techniques.


BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
blaster97337


Civilized Sporeon

Joined: 02/22/2009 03:13:24
Messages: 3482
Location:
I dont really know, but i have a top hat, so its all good.

Offline

wow thanks, this helped answer all my questions on why i couldn't do stuff and i didn't even have to ask the questions


The Temple
The first mission I know of that used bolder traps and snake pits, and the only one for quite some time. (recently some other people used them)
Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Thanks! I tried to make it as easy to understand as I could for Blender initiates. Hopefully I'll post some screencaps soon.


BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
scozdawg


Multicellular

Joined: 07/03/2009 05:16:56
Messages: 247
Offline

You've done SO much for the fledgling spore-blender community Thanks. I can post my copy of Caveman's Collada solution files if you wish, it gets me pretty far along the process (although the UV islands are still borked). Also, with your rig, does it import with the weight painting on the mesh?

EDIT: One star?

This message was edited 1 time. Last update was at 08/13/2009 08:05:40



^ My Adventures, click the screens to go to Sporepedia entry
KCDjedi


Multicellular

Joined: 09/12/2008 00:30:16
Messages: 140
Offline

You sonuva...


Just joking, I really didn't want to do this myself lol. Good job on it.

But just so you know, I can only get the FBX converter to put out good .obj files if I uncheck the two options (Triangulate and Bake Deformations), and .3ds puts out borked UV maps. You might want to mention this somewhere (unless I'm the only person this affects ).

This message was edited 3 times. Last update was at 08/05/2009 13:57:50


Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Scozdawg: Thanks, please do. I think I screwed up somewhere .

KCD: I mention it a bit when I say what two file types have been tried. I'll mention about those two options.

About skin weights, I don't know. I've been trying to fix the textures, so I've never looked. I can find out later (or if you would like to look and tell me, that's cool too.) I have the UV island issue too; I've been working on going through and adding seams, but it's tedious, and I'm not sure what would be the best course of action after that.Time to consult the trusty Blender book...

If someone can do a Collada export on one of my creatures (since I'm on a Mac and have no patch 5) I can post screenies.

This message was edited 1 time. Last update was at 08/05/2009 16:50:37



BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Wrong button.

This message was edited 1 time. Last update was at 08/05/2009 16:49:06



BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
KCDjedi


Multicellular

Joined: 09/12/2008 00:30:16
Messages: 140
Offline

Eochaid1701 wrote:

If someone can do a Collada export on one of my creatures (since I'm on a Mac and have no patch 5) I can post screenies.


I don't have the C&C Pack... so I can't do it.

Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Bump.
Is this working okay for everyone?


BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
SporeMasterLightning


Spore Master

Joined: 03/03/2009 19:39:46
Messages: 288
Location:
Melbourne, Australia

Offline

Because this is an excellent tutorial to getting it set up for blender i'm going to put a link to it from the sticky topic. Thanks for the awesome guide!

SMLightning

[Email] [Yahoo!] aim icon [MSN]
Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

Thanks, SMLightning!


BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
KCDjedi


Multicellular

Joined: 09/12/2008 00:30:16
Messages: 140
Offline

Eochaid1701 wrote:

KCD: I mention it a bit when I say what two file types have been tried. I'll mention about those two options.





Evidently I didn't read the third paragraph...

Eochaid1701


GalacticGod

Joined: 09/15/2008 12:39:22
Messages: 16767
Location:
"working."

Offline

KCDjedi wrote:
Eochaid1701 wrote:
KCD: I mention it a bit when I say what two file types have been tried. I'll mention about those two options.


Evidently I didn't read the third paragraph...

I put in the stuff about the triangulation and baking deformations.


BB never loses an argument, in the same way that a ten-year-old never loses at CoD because he shuts off the Xbox when things go badly.
cavalier639 wrote: I view Eochaid as a bearded wyvern with a backpack full of grammar books and other odds and ends.
 
Forum Index » Spore General Discussion
Go to:   
 
Powered by JForum 2.1.8 © ( EA Dev Build 2016-08-15 15:16:49 ) JForum Team