Blender B3D export problems.

Community Forums/Developer Stations/Blender B3D export problems.

Aussie(Posted 2010) [#1]
Gday all.

I have made a model of a spacecraft in blender & when i export it i lose the orientation & scale of the cockpit. Dose the B3D export support object hierachy & if so how do i export it properly?
I am using blender 2.49b.
Any help would be apreciated.
Cheers :)

ardee(Posted 2010) [#2]
Sounds like you haven't applied Scale and Rotation to your mesh prior to export.

In object mode, select the mesh then

Object-->Clear/Apply-->Apply Scale/ Rotation to ObData

B3D exporter works perfectly.

Aussie(Posted 2010) [#3]
Thanks Ardee

I am still loosing the cockpits position, It keeps seting its position to the center of the hull of the ship & now the rotation of the cockpit is rotated 180 on its y axis from how it should be.

I have parented the cockpit to the hull. But when i export them & check the parenting it dosen't seem correct.
I get. ROOT>
....................Hull> (Parented to ROOT)
....................Cockpit> (parented to ROOT)

& it should be. ROOT>
..................................Hull> (parented to ROOT)
..........................................Cockpit> (parented to Hull)

I am guessing ROOT is part of the export script but how do i keep the parenting correct?

Do i need to apply Scale/ Rotation to each object or can i just do it to the parent?

Cheers :)

Aussie(Posted 2010) [#4]

dawlane(Posted 2010) [#5]
I don't use blender as I could never get use to the insane interface, but I would check the the position and orientation of each objects axis. You should be able to manipulate the axis independently of the mesh, so it may be worth a try to set your ships axis and cockpits axis to share the same position and orientation. As to the parenting problem it may be worth a shot at asking on one of the blender forums.

Aussie(Posted 2010) [#6]
Cheers for the advice dawlane.

I posted on one of the Forums about a week ago & no replies.
I have been able to use the .X export without a problem so i think i will stick with that untill i can use the .b3d export properly.

D4NM4N(Posted 2010) [#7]
You have to apply rotation and scale. Plus dawlane is wrong, blender rox (at least once you get used to it :)

Aussie(Posted 2010) [#8]
Cheers D4NM4N.

Have tried that & am still having problems.

I do agree Blender Rox i am geting my head around the way it works & find it very easy to model with. I only have problems geting the models out of Blender.

I have just made a model for the comp Chroma is running & am having no end or trouble exporting it with animation.

Any chance i could email the .blend file to someone and get them to see where it is i am going wrong with the export.

It would be greatly apreciated if i could. It's driving me nuts

Aussie(Posted 2010) [#9]
Ha Ha! Got it.

The problem was the software i was viewing the model in.

Just one last problem. Does the b3d exporter export mesh animation or does it only export bone animation?

GNS(Posted 2010) [#10]
Could someone post a simple tutorial on exporting animation from the Blender .b3d exporter? I've tried the last couple of days and can't seem to get things working.

My test consists of the default cube parented to a single armature. In the Timeline view, I create an initial keyframe and save LocRotScale (I key -> LocRotScale). I then move to, say, frame 40, rotate the armature around (which also moves the cube in the 3D view) and create another keyframe saving LocRotScale.

I can play this back fine within Blender. The cube rotates as expected. When I export to .b3d, the animation just isn't there. Blitz3D actually gives an error saying "Entity has no animation."

I must be missing a step somewhere.

GNS(Posted 2010) [#11]
Hmmm... yep, quite frustrating. I managed to find a backup of the .pdf explaining the Blender .b3d exporter functions. Unfortunately it's a translation and some of the language is a bit off so it's difficult to follow. This is what the .pdf has to say about exporting animations:

Remember everytime you build an armature to imparent it with its mesh. This is necessary for the proper functioning of the Exporter, in fact this permits to have many animated models in the same scene without collisions between different animations. Remember also that every animated model will lose its position in the space scene and will be re-positioned at 0,0,0 so change its position by code or with an external world editor.

To set the life-time of your animation use the normal Timeline editor. From there you will be able to set the start and the end point of the whole animation. Only the "current active" animation will be exported, use the NLA Editor to select it.

In particular, I'm not sure what's meant by "imparent"ing an armature. I guess this could mean parenting the mesh with an armature which is what I've done?

Also not sure about the NLA editor bit. There's only a single animation in my test so nothing to select.


GNS(Posted 2010) [#12]
Seems the guys working with Irrlicht have had a similar issue (.b3d exporter losing animation). This thread talks specifically about it:

After reading over the thread a few times I had a bit of a breakthrough and managed to get a simple animated cube exported and playing in miniB3D.

Process so far seems to be:

1). Create your mesh and armatures.
2). Parent the mesh to the armature. Vertex groups works and I suppose (hope!) bone heat works as well.
3). Use the Timeline view to set the start and end frame of the entire animation (i.e. if you have an animation with 100 frames, use the Timeline to set the total frames to 100).
4). Use the NLA Editor view to add keyframes (via the I key). Animating should only be done by selecting the bone/armature, switching to Pose mode and moving/rotating/etc. the bone(s), setting keyframes as you go.

The process seems a bit tedious to me (I'd much prefer to just use the Timeline view for everything) but being able to model, texture and animate all from one program is certainly nice. That said, if I'm off on any of this and someone has a better (easier) way, let me know!

ardee(Posted 2010) [#13]
Press the red button in the timeline panel to switch on recording for auto keyframing then you just have to animate (move/rotate bones) and it will create keyframes wherever necessary. No need for the NLA editor until your doing complex mixing of separate actions.


jhocking(Posted 2010) [#14]
Hitting the I key to place keyframes also works in the Timeline editor, why are you using the NLA editor? Bear in mind I don't use Blender regularly and have never exported an animated b3d model from it. (Also, hitting I to set keyframes works in the Curves editor. I edit the curves frequently while animating so that's helpful too.)

@ardee: I much prefer placing keyframes manually to auto keyframing because I frequently move parts around to see what it'll look like without being sure yet. It's like playing chess with the touch rule active; you need to be sure that's what you want to do before you so much as touch the object.

ardee(Posted 2010) [#15]
@jhocking Each to their own I suppose but if you're working with any half decent rig (IK legs, IK/FK switching arms, elbow/knee targets etc), auto key framing is really the only way to go imo, where one control bone can manipulate any number of others key framing manually will lead to trouble and as GNS say's it's immensely tedious.

GNS(Posted 2010) [#16]
How strange. I just tried using the Timeline view to do the keyframing and got it to export properly. I think the mistake I made previously was moving the armature in Object mode. Part of the reason I was using the NLA editor is because the exporter manual from Gandaldf's site mentions selecting the "active animation" in the NLA editor. As I said, it's a translation so the language is a bit hard to follow so I'm not really sure what it's talking about.