Blender26 Ogre Exporter

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
hartsantler
Greenskin
Posts: 107
Joined: Tue Nov 16, 2010 7:33 am
x 15

Re: Blender26 Ogre Exporter

Post by hartsantler »

sorry for the long delay guys, here's the update for 2.65, i also pushed this to the repo.

http://blender2ogre.googlecode.com/file ... -0.5.9.zip
bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia
x 201

Re: Blender26 Ogre Exporter

Post by bstone »

Nice, thanks hartsantler.
caseybasichis
Greenskin
Posts: 100
Joined: Wed Jan 25, 2012 7:50 pm
x 1

Re: Blender26 Ogre Exporter

Post by caseybasichis »

Is there any way to export Blender files from Ogre? Is there any way to export all or some parts of the Ogre project as a blender scene?

Thanks,
Casey
se5a
Gnoblar
Posts: 14
Joined: Fri Oct 27, 2006 9:12 am

Re: Blender26 Ogre Exporter

Post by se5a »

is there some really basic instructions for this for a blender noob somewhere?
I've managed to fumble my way through and got a cube exported, but the texture is getting messed up somehow. the texture itself is pebbled, and looks fine in blender, but when viewed in ogre or ogre meshy the cube just looks plain flat orange (the texture itself is orange so it IS there)
I'd post links/pics but then I'd have to wait for mods blah blah. etc.
walachey
Gnoblar
Posts: 7
Joined: Sat Aug 04, 2012 4:09 pm

Re: Blender26 Ogre Exporter

Post by walachey »

Hi,

I have a problem with animation blending. The Ogre26 Exporter exports even the non-affected bones for every animation. (I have "Independent Animation" and "Only Animated Bones" active).

The Situation:
I have bones 1 to 10. Every bone has one animation that only affects that one bone (the Blender Action Editor shows keyframes for only one bone per action, too).
When I export the animations, all bones are in every animation (even if their orientation does not change, visible in the skeleton.xml) - bad luck with animation blending there. :/

Am I missing something or does the exporter not do that for me and I have to manually editor skeleton.xml after the export?

Thanks,
walachey
User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany
x 34

Re: Blender26 Ogre Exporter

Post by Waruck »

no you're not missiong something. If you've checked 'Only Animated Bones' the exporter should export only the bones that have keyframes for each animation.

Can you upload your .blend file? maybe that'll give some insight on the problem.
User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California
x 19

Re: Blender26 Ogre Exporter

Post by lunkhound »

I ran into a very similar problem just recently, and I think its a blender problem.
I'm using blender 2.65 and I had 2 animations on an armature with a left and right arm. One anim was for the left arm only and the other was for the right arm only. I created them as separate actions, first the right (frames 20-30) and then the left (frames 40-50) and inserted them into an NLA strip. I exported using the "independent animations" and "only animated bones" options. Inspecting the skeleton.xml file, I could see that the first anim looked OK, only had keyframes for the right arm bone. However, the second animation had keyframes for both left and right bones.
I messed around in blender trying to fix it by putting them into separate NLA strips and moving the keyframes around in time and so forth. Before long both animations were exporting wrong, but they were also behaving strangely in blender.
I eventually fixed it by making a new action and before putting down the first keyframe, select all bones in "pose" mode, then go to "Pose"->"Clear Transform"->"All". At least I think that's what fixed it.
You might be able to fix your actions by copy-pasting the keyframes into a new action with all transforms cleared.
User avatar
lunkhound
Gremlin
Posts: 169
Joined: Sun Apr 29, 2012 1:03 am
Location: Santa Monica, California
x 19

Re: Blender26 Ogre Exporter

Post by lunkhound »

Here is a blend file showing the problem. There are 2 actions "action.L" and "action.R". action.L has 2 keyframes on the bone "rear_swingarm.L", while action.R only has keyframes on the bone "rear_swingarm.R". Each action is a 90 degree rotation about the X axis in 4 frames. I get strange results, sometimes one or the other animation will stop working in blender when I scrub along the timeline. To get it working again I need to switch to it in the action editor.

https://docs.google.com/open?id=0B3So90 ... FFyejd3R2s

When I export this I get keyframes from both bones in each animation:

Code: Select all

<skeleton >
  <bones >
    <bone name="root" id="0" >
      <position x="0.000000" y="0.000000" z="0.000000" />
      <rotation angle="1.570796" >
        <axis x="1.000000" y="0.000000" z="0.000000" />
      </rotation>
    </bone>
    <bone name="body" id="1" >
      <position x="0.000000" y="0.600554" z="-0.002346" />
      <rotation angle="1.570796" >
        <axis x="-1.000000" y="-0.000000" z="-0.000000" />
      </rotation>
    </bone>
    <bone name="rear_swingarm.R" id="2" >
      <position x="0.566875" y="-0.519999" z="-0.350554" />
      <rotation angle="3.088307" >
        <axis x="1.000000" y="0.000000" z="0.000000" />
      </rotation>
    </bone>
    <bone name="rear_swingarm.L" id="3" >
      <position x="-0.566875" y="-0.519999" z="-0.350554" />
      <rotation angle="3.088307" >
        <axis x="1.000000" y="0.000000" z="0.000000" />
      </rotation>
    </bone>
  </bones>
  <bonehierarchy >
    <boneparent bone="body" parent="root" />
    <boneparent bone="rear_swingarm.R" parent="body" />
    <boneparent bone="rear_swingarm.L" parent="body" />
  </bonehierarchy>
  <animations >
    <animation length="0.16666666666666666" name="action.L" >
      <tracks >
        <track bone="rear_swingarm.R" >
          <keyframes >
            <keyframe time="0.0" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="-0.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.041666666666666664" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="-0.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.08333333333333333" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="-0.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.125" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="-0.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.16666666666666666" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="-0.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
          </keyframes>
        </track>
        <track bone="rear_swingarm.L" >
          <keyframes >
            <keyframe time="0.0" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="0.000000" y="0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.041666666666666664" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.230517" >
                <axis x="-1.000002" y="0.000000" z="-0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.08333333333333333" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.785398" >
                <axis x="-1.000000" y="0.000000" z="-0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.125" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="1.340280" >
                <axis x="-1.000000" y="0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.16666666666666666" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="1.570797" >
                <axis x="-1.000000" y="0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
          </keyframes>
        </track>
      </tracks>
    </animation>
    <animation length="0.16666666666666666" name="action.R" >
      <tracks >
        <track bone="rear_swingarm.R" >
          <keyframes >
            <keyframe time="0.0" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="-0.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.041666666666666664" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.230517" >
                <axis x="-1.000002" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.08333333333333333" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.785398" >
                <axis x="-1.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.125" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="1.340280" >
                <axis x="-1.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.16666666666666666" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="1.570797" >
                <axis x="-1.000000" y="-0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
          </keyframes>
        </track>
        <track bone="rear_swingarm.L" >
          <keyframes >
            <keyframe time="0.0" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.000000" >
                <axis x="0.000000" y="0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.041666666666666664" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.230517" >
                <axis x="-1.000002" y="0.000000" z="-0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.08333333333333333" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="0.785398" >
                <axis x="-1.000000" y="0.000000" z="-0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.125" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="1.340280" >
                <axis x="-1.000000" y="0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
            <keyframe time="0.16666666666666666" >
              <translate x="0.000000" y="0.000000" z="0.000000" />
              <rotate angle="1.570797" >
                <axis x="-1.000000" y="0.000000" z="0.000000" />
              </rotate>
              <scale x="1.000000" y="1.000000" z="1.000000" />
            </keyframe>
          </keyframes>
        </track>
      </tracks>
    </animation>
  </animations>
</skeleton>
Like I said, there is clearly a problem with blender here, so it's probably not the fault of the exporter.

[edit]: I tried the idea of copy-pasting the keyframes onto new actions, but it didn't work. :(
walachey
Gnoblar
Posts: 7
Joined: Sat Aug 04, 2012 4:09 pm

Re: Blender26 Ogre Exporter

Post by walachey »

Thanks for all the input!

Good to know that it was not me going insane there ;-)

Until it is fixed from either Blender's or the exporter's side, I am using that script here to modifiy the skeleton.xml files myself before feeding them to the XMLConverter:

Usage:
1) save as skeletoncleanup.py
2) go to folder and run: python skeletoncleanup.py <filename>
3) the output will be in the same folder and will be called <filename>_mod.xml, because I am lazy ;)

Use at own risk of course. Testing the output now (which looks good in OgreMeshy at least)..

Code: Select all

import xml.dom.minidom as XML
import sys

filename = sys.argv[1]
dom = XML.parse(filename);

skeleton = dom.getElementsByTagName("skeleton")[0]
animations = skeleton.getElementsByTagName("animations")[0]

removalCounter = 0

for anim in animations.getElementsByTagName("animation"):
	tracks = anim.getElementsByTagName("tracks")[0].getElementsByTagName("track")[:]
	print "Checking animation: " + anim.getAttribute("name")
	for track in tracks:
		onlyZeroTransform = 1
		keyframes = track.getElementsByTagName("keyframes")[0].getElementsByTagName("keyframe")
		lastT = None
		lastR = None
		lastS = None
		for keyframe in keyframes:
			translate = keyframe.getElementsByTagName("translate")
			if translate:
				translate = [translate[0].getAttribute("x"), translate[0].getAttribute("y"), translate[0].getAttribute("z")]
				if lastT and translate != lastT:
					onlyZeroTransform = 0
					print "bone translation of " + track.getAttribute("bone") + ": " + str(translate) + " vs " + str(lastT)
					break
				lastT = translate
					
			rotate = keyframe.getElementsByTagName("rotate")
			if rotate:
				rotate = [rotate[0].getAttribute("angle")]
				if lastR and rotate != lastR:
					onlyZeroTransform = 0
					print "bone rotation of " + track.getAttribute("bone") + ": " + str(rotate) + " vs " + str(lastR)
					break
				lastR = rotate[:]
			
			scale = keyframe.getElementsByTagName("scale")
			if scale:
				scale = [scale[0].getAttribute("x"), scale[0].getAttribute("y"), scale[0].getAttribute("z")]
				if lastS and scale != lastS:
					onlyZeroTransform = 0
					print "bone scale of " + track.getAttribute("bone") + ": " + str(scale) + " vs " + str(scale)
					break
				lastS = scale
		if onlyZeroTransform == 1:
			anim.getElementsByTagName("tracks")[0].removeChild(track)
			removalCounter += 1

print "Bones removed (from actions, obviously): " + str(removalCounter) + "\n"

output = open(filename + "_mod.xml", "w+")
dom.writexml(output)
output.close()
User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany
x 34

Re: Blender26 Ogre Exporter

Post by Waruck »

Ok, I think I found the problem in the exporter. Until now the exporter checked only if an f-curve group existed but as it seems blender also keeps empty groups/curves so one has to explicitly check whether there's a keyframe in a given group/curve.

Only tested it so far with 2.63 but should work in 2.65 as well. I think this could mess things up with the 'Only Deformable Bones' option and the Rigify-Skeleton but if I remember correctly this doesn't work in the 2.65 version as of now. I'll get Blender 2.65 later and will work on the complete fix for that.

In the 2.65 version replace the lines 4620ff (the ones where the stripbones are defined) with:

Code: Select all

                    stripbones = []
                    if CONFIG['ONLY_ANIMATED_BONES']:
                        for group in strip.action.groups:        # check if the user has keyed only some of the bones (for anim blending)
                            for curve in group.channels:
                                if curve.keyframe_points:
                                    if group.name in arm.pose.bones: stripbones.append( group.name )                        
                                    break

                        if not stripbones:                                    # otherwise we use all bones
                            stripbones = [ bone.name for bone in arm.pose.bones ]
                    else:
                        stripbones = [ bone.name for bone in arm.pose.bones ]
apozgaj
Gnoblar
Posts: 7
Joined: Sat Dec 01, 2012 5:31 pm

Re: Blender26 Ogre Exporter

Post by apozgaj »

Dear Forum,

I must be stupid, but I just can't get the skeleton to export! :(

I am working with Linux, using Blender 2.65a (amd64). I have installed both the "official 2.5" exporter (2.0.3), as well as the blender2ogre (0.5.9), but many hours of experimentation were completely in vain.

I am a beginner in Blender, so there must be something trivial I oversaw, I hope you can help me.

First of all, I did a simple scene: one bone and one cylinder:

add -> armature -> single bone
add -> mesh -> cylinder

Then I added the "Child Of" constraint to cylinder:

(in Object Mode: ) select cylinder, add constraint (Target: Armature, Bone: Bone), Set Inverse

Select the bone to be able to switch into "Pose Mode". On the Timeline, make a key frame (LocRot) at timepoint 0. Go to time point 40, give the Bone a rotation, click on the key symbol to set the next keyframe.

Test run: jump to time 0 and press play. Cylinder rotates together with the bone, as expected.

Go to time point 0 again, change the "Timeline" view to "NLA", press the snowflake next to "ArmatureAction.001". This gives me an empty "three-point-symbol" (<No Action> - whatever that is) and a new "NlaTrack" with the name "ArmatureAction.001".

From what I read so far, this should be enough. Back to "Object Mode", press "a" to select all, then "File -> Export -> Ogre3D (.scene and .mesh)", but all I get is the scene and the cylinder mesh. No .skeleton.

Here is the console output:

________________________________________________________________________________
Processing Scene
Processing Materials
WARNING: no materials, not writting .material script
- Exporting root node: Armature
- Exporting root node: Cylinder
Working on ob 'Cylinder' (<-- this is the test output I added to the script)
- Generating: Cylinder.mesh.xml
- Writing shared geometry
Done at 0.02 seconds
- Writing submeshes
Done at 0.03 seconds
NO ARM FOUND!!!! (<-- this is the test output I added to the script. This means arm = ob.find_armature() in dot_mesh didn't find anything)
- Created .mesh.xml at 0.03 seconds
- Created .mesh in total time 0.33 seconds
Exported Ogre Scene: /home/alex/GL/ogre3d/Blender/Experiment4/blender2ogre-export.scene
________________________________________________________________________________
Report:
Original Vertices: 64
Exported Vertices: 218
Original Faces: 92
Exported Triangles: 124
MESHES: 1
Extended Report:
MESHES:
. Cylinder
________________________________________________________________________________

In the output directory, I only see:

-rw-rw-r-- 1 alex alex 1708 Jan 6 15:09 blender2ogre-export.scene
-rw-rw-r-- 1 alex alex 6177 Jan 6 15:09 Cylinder.mesh
-rw-rw-r-- 1 alex alex 45470 Jan 6 15:09 Cylinder.mesh.xml

where I'd also expect to see a .skeleton file.

Sorry if the question is trivial, I'm already pulling my hair out. :( The blender file is attached to this posting.

BTW, just noticed: 0.5.9 claims to be 0.5.8. Just a minor bug report. :)

EDIT: the few blender animations from the "regression" package, which I have just tried out, also don't produce the ".skeleton" files.

Best regards!
Attachments
experiment4.blend.zip
(73.08 KiB) Downloaded 167 times
apozgaj
Gnoblar
Posts: 7
Joined: Sat Dec 01, 2012 5:31 pm

Re: Blender26 Ogre Exporter

Post by apozgaj »

Finally, I got it! Ow, I'm sooo proud of myself! :D

Just in case some other poor soul becomes the same problem, here is the solution.

As it seems, one can't export the skeletons if one connects the objects to the bones using the new method ("Constraint -> Child of"). Once I went back to the OLD method (select object, select armature, Ctrl-P, "automatic weight"), it all works as expected. Funny thing is, I thought I already have tried that, but obviously I botched it the first time. :oops:

Oh, one more word on "an object is not allowed to be scaled / rotated / translated prior to export": since I read that, I asked myself whether this would mean that all objects need to be default size and located in the origin, as created by "Add", which would, obviously, be of somewhat reduced use. :) As it turned out, that meant the object is not allowed to have any LOCAL transformations to it. For example, instead of having a cube with diemensions (8, 2, 4) and a scale (0.5, 1.5, 2), one needs a cube of dimensions (4, 3, 8 ) and of scale (1, 1, 1). The same for rotation and location. This can be achieved by selecting the object, pressing Ctrl-A, and then selecting first "Location", followed by (after pressing Ctrl-A again) "Rotation & Scale". By doing so, all local transofrmations are applied to the object and reset to safe values.

So, tomorrow I can finally try to import the objects into my Ogre code and start playing with the animation from within the code.

In case somebody wants to check the blender file, it's attached.
Attachments
Experiment5.blend.gz
(79.12 KiB) Downloaded 155 times
omniyo
Gnoblar
Posts: 23
Joined: Mon Apr 25, 2011 11:04 am
x 1

Re: Blender26 Ogre Exporter

Post by omniyo »

Hi,

I asked some animation export questions some time ago... now i have to add new animations, and I find the same problem but i cannot get it working.
I have one .mesh+.skeleton (exported) which works well (tested in ogre and ogreMeshy). [1-in attachment]

But when i try to export (with or without "only animated bones" option) from the blend source file that i think it is the last version [2-in attachment] i dont get the same result in ogreMeshy.

I attach everything, so i'd be very thankful if anyone could help me.

http://www.qfpost.com/file/d?g=aUn4VNJfT

Thanks in advance
User avatar
assalier
Kobold
Posts: 38
Joined: Fri Aug 28, 2009 7:02 pm
x 1

Re: Blender26 Ogre Exporter

Post by assalier »

Quick question regarding NLA tracks.

In my project in 2.49 Blender I have several objects modified by the same armature. Imagine a base creature mesh and separate cloth objects. (Everyone is controlled by the same armature.)

During ogre export I only added the animation sequences to the base mesh (not to cloths). When I changed some of the cloth objects it was a rather fast export step.
This way saving the changes for cloth objects didn't require blender to animate them.

When the animation was changed, I only had to save the base mesh to get the skeleton updated (that's where the action sequences are present in the export dialoge).


In 2.63 i have the action sequences on the Armature (NLA tracks), so every time the cloth (or any of the objects) are saved, blender animates all actions and saves skeleton 10 times...

Is there a way to check for exporter per object no to save animations (but still save weights and bone references)?
omniyo
Gnoblar
Posts: 23
Joined: Mon Apr 25, 2011 11:04 am
x 1

Re: Blender26 Ogre Exporter

Post by omniyo »

Finally Waruck could solve the problem that I posted before. So I post here for some other people with the same issue. I just copy&paste from Waruck's answer:
Ok, so the problem is that currently in blender only your walk animation is played. what the exporter does is it just goes through the timeline and exports the bonepositions every frame. when you move your timeline after the end of your walk-animation blender wonst display the other animations and thus you don't see them in your .mesh file...

to fix this you have to tell blender to use the animation-track to display the animation: in the nla-editor select one of your nla-strips with right-click. this should make the corresponding action the active action. Unbind this action again (x-button in the menu on the right). after that all 3 animations should be played properly when you move through the timeline and also after exporting.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Blender 2.66 Update

Post by Mind Calamity »

Here's an updated version of the export script to work with the awesome new 2.66. :)
Attachments
io_export_ogreDotScene.zip
2.66 export script.
(69.92 KiB) Downloaded 484 times
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
efaj
Gnoblar
Posts: 21
Joined: Tue Dec 27, 2011 2:00 pm
x 2

Re: Blender26 Ogre Exporter

Post by efaj »

How do you use the script inheritance option? Is it what I think it is?
I have a base .material that all my other mats inherit from, and until now, I've just been opening the file myself and adding it..... each time I export. But, does this mean now I can tell the exporter in the blend once and never worry more?
When clicking the dropbox I only get "Script Inheritance", aka probably blank.
kevinmeng
Gnoblar
Posts: 5
Joined: Mon Jan 28, 2013 8:57 am

Re: Blender26 Ogre Exporter

Post by kevinmeng »

Hi,
Thanks this great exporter,
I have a problem to use and need help,
I used the man-meta add-on in blender 2.65 to generate a armature, and made a simple animation, when i export using the ogre exporter, no problem , however, when i converted the result using the OgreXMLConverter, there is error indicating that "Exceeded the maximum number of bones per skeleton", what can i do to solve this problem? or maybe i select too many unused bones? which armature layers should I select?
i have checked on the "only export animation bones",

so anyone could tell me the answer?

Thanks!
kevinmeng
Gnoblar
Posts: 5
Joined: Mon Jan 28, 2013 8:57 am

Re: Blender26 Ogre Exporter

Post by kevinmeng »

I found the exporter exported too many bones, including ik bones, not just animation bones.
kevinmeng
Gnoblar
Posts: 5
Joined: Mon Jan 28, 2013 8:57 am

Re: Blender26 Ogre Exporter

Post by kevinmeng »

Hi,
could you test with blender animation with Man-Meta rigging, i found that too many bones are exported even when i select the "only export animation bones"
i have made animations and just can't make it run in ogre, really upset, :(

Thanks!
User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany
x 34

Re: Blender26 Ogre Exporter

Post by Waruck »

there is a bug that has been fixed in a previous version but reaccured in the newer versions. which one are you using? I can fix it for the newest one...
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: Blender26 Ogre Exporter

Post by Mind Calamity »

Waruck wrote:there is a bug that has been fixed in a previous version but reaccured in the newer versions. which one are you using? I can fix it for the newest one...
hartsantler hasn't logged in since Mon Dec 24, 2012 11:37 pm, maybe we should host a new version of the script somewhere else, like say BitBucket ?

Edit: Just hosted the new version of the exporter on BitBucket, if anyone needs write access, drop me a PM. :)
Update: updated link to the new repository :)
Last edited by Mind Calamity on Thu May 02, 2013 8:35 pm, edited 1 time in total.
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
clevengr
Gnoblar
Posts: 1
Joined: Tue Apr 30, 2013 9:34 am

Re: Blender26 Ogre Exporter

Post by clevengr »

I am having a problem with the skeleton files created by blender2ogre. Specifically, I am getting the following kind of <bone> elements in the skeleton.xml file:

Code: Select all

    <bone name="BottomBone" id="0" >
      <position y="-0.216652" x="0.000072" z="-1.998395" />
      <rotation angle="0.000000" >
        <axis y="0.000000" x="-0.000000" z="0.000000" />
      </rotation>
    </bone>
Notice that the axis of rotation is [0,0,0], which isn't a valid axis. I am guessing this is due to something I'm doing wrong in creating the animation in Blender, but I have spent days trying to figure it out. I have tried resetting the transforms, changing the rotation type to Quaternion, Angle/Axis, Euler, etc; and many other things - to no avail. Does anyone have any ideas?

I'm using Blender 2.66a and blender2ogre 0.5.9 (although I also tried the fork "0.6.0" that some enterprising user posted; no difference).

Thanks.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: Blender26 Ogre Exporter

Post by Mind Calamity »

Hey guys! I've been quite busy with other issues so I haven't had the time to take a look at the bugs in the exporter.

@clevengr: If you could post, or PM me the blend file I'll take a look at the problem.

I'm also working on a node animation export script that I will be integrating into blender2ogre as soon as it works. (Node animation is animation of the scenenodes, which will save you the time of adding skeletons to non-skeletal objects that need animation)
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
LDAsh
Gnoblar
Posts: 20
Joined: Thu Aug 25, 2011 8:29 pm
x 3

Re: Blender26 Ogre Exporter

Post by LDAsh »

I just wanted to quickly post that I'm relieved this is still being worked on and not forgotten, and I really appreciate the hard work that's gone into Blender support for Ogre mesh! :D Thank you.
Post Reply