Author Topic: Error of animation  (Read 2632 times)

Offline Alphabet

  • Experienced Traveler
  • **
  • Posts: 162
  • Country: us
  • Floof-O-Meter: 14
    • View Profile
Re: Error of animation
« Reply #10 on: November 27, 2015, 10:11:02 pm »
Sorry for the double post.

Well, I have my computer now. I can't seem to find any information on how to fix this. If reinstalling python didn't help at all and you haven't solved your problem yet, would you be willing to pm me a download of your .blend file with your animations? I want to see if I can export it using the same versions as you without any errors. Maybe then I can figure out what is going on.

Offline oliveyeen

  • Curious Wanderer
  • *
  • Posts: 35
  • Country: us
  • Floof-O-Meter: 8
  • hyenas are rad!
    • oliveyeen
    • oliveyeen
    • oliveyeen
    • oliveyeen
    • View Profile
Re: Error of animation
« Reply #11 on: November 29, 2015, 12:44:20 am »
Sorry for the late post!
I can PM you my animations.Plz note they are kinda crappy but tried mah best xD

hyenas are so underrated LOL.

Offline Alphabet

  • Experienced Traveler
  • **
  • Posts: 162
  • Country: us
  • Floof-O-Meter: 14
    • View Profile
Re: Error of animation
« Reply #12 on: December 01, 2015, 01:26:11 am »
I know I pm'ed this to you already, but I thought I would leave it here for anyone else who comes across this issue.

The error that shows up in the Python Console is "ValueError: matrix does not have an inverse." I was not able to find any solution to fix this error (and I also couldn't find anything wrong with the .blend file itself that would cause this error). The only solution that is given on other forums is to simply update Blender. So... Allow me to help you guys get it set up.



Programs And Tools You'll Need

Blender
The latest version of Blender

Blender2Ogre
blender2ogre-0.6.0.zip

OgreXmlConverter
OgreCommandLineTools for Windows
OgreCommandLineTools for Mac


Getting Everything Set Up

Unfortunately, I have never used a Mac, and therefore I will not be able to help any Mac users get everything installed with proper instructions. Please try your best to translate my instructions for Windows users into the equivalent for your Mac.

Go ahead and install the latest version of Blender to your computer if you don't already have it.

Next, go to where you downloaded blender2ogre and OgreCommandLineTools. Simply double click on the blender2ogre-0.6.0 folder to open it. Inside there is a file called "io_export_oreDotScene.py." Copy the file and open up a new explorer window to find Blender. Blender's default install location should be in "C:/Program Files." Go into the following folders and paste it inside the addons folder: "Blender Foundation > Blender > 2.76 > scripts > addons"

Go back to the folder where you downloaded everything and right click on OgreCommandLineTools_1.7.2, then select "Extract All..." A new window should pop up asking you where to extract the files. Extract the files in your "C:/Program Files" folder where Blender was installed. If you installed Blender in a different folder, then extract it in that same folder where you put Blender. Before you extract it, make sure the destination says "C:\Program Files\OgreCommandLineTools_1.7.2" If it does not say the last part after Program Files, then go ahead and type it in. This will create a new folder to put everything you're extracting into.

Now that all of the programs and files you've downloaded are in the right place, go ahead and open up Blender. Before you do anything, go to: "File > User Preferences" (or press ctrl+alt+u). A new window pop up, and at the very top of this window, go to the "Addons" tab. Then click on the top left underneath all of the tabs, type "ogre" into the search bar. There should be one addon listed on the right called "Import-Export: OGRE Exporter (.scene, .mesh, .skeleton) and RealXTend (.txml)." Click on the little box on the far right of the addon. This will check the box and turn the addon text from gray to black. This means that the addon has been enabled. Next, go to the bottom right of the window and press the "Save User Settings" button. If you forget to press this button, you will have to re-enable this addon every single time you close and re-open Blender.


Putting Your New Animations Into The Game

Go to "File > Export > Ogre3D" inside of Blender to export your modified skeleton. The ogre export settings are on the right under "Export Ogre." If you can't see it, scroll down a bit in that right panel. Check or uncheck whatever you need. Just make sure that you have "Export Meshes" and "Armature Animation" checked. You may or may not get a bunch of different mesh and skeleton files, but don't worry. The only file you need is fbody.skeleton.xml or cbody.skeleton.xml (whichever model you're editing) and you can delete the rest (not your .blend files though). Next, open the folder to OgreCommandLineTools and drag your file on top of OgreXMLConverter. You should get a new file called fbody.skeleton or cbody.skeleton. Make sure to backup the original .skeleton files by copying them and pasting them into whatever folder you want (especially one you will remember) anywhere on your computer. Then, just take your exported .skeleton file, copy/paste or drag it into the models folder, and replace the original file with your new file.

And you're done. Your new animations should be in the game.


Note: The Action Editor panel is now called Dope Sheet, and you need to have Action Editor selected in the other menu on the Dope Sheet panel bar.
« Last Edit: December 01, 2015, 01:41:47 am by Alphabet »