How to use Blender .b3d exporter?

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Zanman777
Posts: 17
Joined: Mon Apr 16, 2012 5:45 pm

How to use Blender .b3d exporter?

Post by Zanman777 »

I'm trying to learn how to export a blender animation into .b3d format with the new converter: http://supertuxkart.svn.sourceforge.net ... runk/util/

But how do I use this? It's a java file... How does this work?
ACE247
Posts: 704
Joined: Tue Mar 16, 2010 12:31 am

Re: How to use Blender .b3d exporter?

Post by ACE247 »

Actually its here: http://supertuxkart.svn.sourceforge.net ... sion=11094
Then just install it as you do with any other irrlicht plugin.
And bake all the blender animation actions into one continuous sequence, select the armature and mesh, then export, presto! ;)
If you still don't know how to do that, don't!
Zanman777
Posts: 17
Joined: Mon Apr 16, 2012 5:45 pm

Re: How to use Blender .b3d exporter?

Post by Zanman777 »

The problem is... I don't know how to install irrlicht plugins. Do I copy the .py file to blender\scripts\addons?

I do know how to work with blender, though...

btw, I also found the DirectX Exporter for Blender at http://xoomer.virgilio.it/glabro1/python241.html . I read at Irrlicht wiki that .b3d is "generally accepted as the best format for animated meshes" (something like that). Is that true, or should I use the DirectX Exporter for optimum conversion results?
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: How to use Blender .b3d exporter?

Post by Cube_ »

yeah, good job linking to a page that is being flagged as malware,,,,,

You install the plugin like you would witha ny other plugin (he meant blender plugin, not irrlicht)
Then you *should* know how to enable and use it, *it works like ALL other import/export plugins*
Otherwise you don't know how to use blender ^^"

and in case you don't Googleis your friend :D
"this is not the bottleneck you are looking for"
Isoprog
Posts: 80
Joined: Wed Dec 10, 2008 7:53 am

Re: How to use Blender .b3d exporter?

Post by Isoprog »

Do like this -
Go to File -> User preference. On preference window click on the install addon button. Browse to the export.py file.

Click save as default.

I just test it - 2.61. It works without baking. But seems like, if there are more meshes attached with an armature, those meshes should be joined before exporting! Not sure it is required or not!

Regards.
MTLZ
Posts: 11
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France
Contact:

Re: How to use Blender .b3d exporter?

Post by MTLZ »

I wanted to inform those who use this exporter that it doesn't work since blender 2.63 because of a new version of the API.
If you have this error while exporting into a b3d file: "Mesh has no attribute faces":
- You can edit the B3DExport.py script file by replacing all occurences of "data.faces" by "data.tessfaces".
- Download a new version of the script here : http://www.is06.com/fichiers/divers/plu ... DExport.py

Explanation of this is described here: http://www.blender.org/documentation/bl ... tion-faces
MTLZ
== Invisible Spirit - http://www.is06.com ==
Andreas
Posts: 166
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany
Contact:

Re: How to use Blender .b3d exporter?

Post by Andreas »

Hi MTLZ,

thanks for providing an update to the exporter.

However i can't enable the exporter after adding it in the blender 2.63 user settings (release version of blender). The exporter
is shown, but i simply can't enable the checkbox. :(

Do you have any idea why?

Thanks
Andreas
MTLZ
Posts: 11
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France
Contact:

Re: How to use Blender .b3d exporter?

Post by MTLZ »

You can't check the box or you can but maybe you forgot to click on "Save as default" button on the bottom of the window? (that was my mistake the first time)
MTLZ
== Invisible Spirit - http://www.is06.com ==
Andreas
Posts: 166
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany
Contact:

Re: How to use Blender .b3d exporter?

Post by Andreas »

Hi,

thanks for your fast reply. My problem was renamimg the export script (added 2.63 to distinguish it from earlier versions of the exporter). After using the original file name i could activate the exporter in the user settings. :)

But now i have another problem when i try to export one of my models:

Code: Select all

 
2 TEXS
2 BRUS
NODE: 1 / 2
NODE: 2 / 2
Traceback (most recent call last):
  File "/home/sensen/.blender/2.63/scripts/addons/B3DExport.py", line 1493, in execute
    write_b3d_file(self.filepath)
  File "/home/sensen/.blender/2.63/scripts/addons/B3DExport.py", line 156, in write_b3d_file
    temp_buf += write_node(objects) #NODE
  File "/home/sensen/.blender/2.63/scripts/addons/B3DExport.py", line 830, in write_node
    temp_buf.append(write_node_mesh(obj,obj_count,anim_data,exp_root)) #NODE MESH
  File "/home/sensen/.blender/2.63/scripts/addons/B3DExport.py", line 967, in write_node_mesh
    temp_buf += write_node_mesh_vrts(obj, data, obj_count, arm_action, exp_root) #NODE MESH VRTS
  File "/home/sensen/.blender/2.63/scripts/addons/B3DExport.py", line 1130, in write_node_mesh_vrts
    uv = data.uv_textures[iuvlayer].data[face.index].uv1
AttributeError: 'MeshTexturePoly' object has no attribute 'uv1'
 
location:<unknown location>:-1
 
location:<unknown location>:-1
 
Exporting the default blender cube model works without errors. Do you have an idea what i did wrong this time? It's a simple mesh with UV mapping onto an external texture file. No Materials, nor textures are defined in blender's "properties" dialog.

Thanks again for your help!

Andreas
MTLZ
Posts: 11
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France
Contact:

Re: How to use Blender .b3d exporter?

Post by MTLZ »

From what I see here: "AttributeError: 'MeshTexturePoly' object has no attribute 'uv1'",
I think UV coordinates are also obsoletes so I need to search a little bit in order to update the exporter with that.
MTLZ
== Invisible Spirit - http://www.is06.com ==
MTLZ
Posts: 11
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France
Contact:

Re: How to use Blender .b3d exporter?

Post by MTLZ »

OK so I figured out what went wrong with the script.
There was not only faces but also uv coordinates and vertex colors which changed with the new API.
I updated the script file, you can re-download it and I think it will be better now :)

http://www.is06.com/fichiers/divers/plu ... DExport.py
MTLZ
== Invisible Spirit - http://www.is06.com ==
Andreas
Posts: 166
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany
Contact:

Re: How to use Blender .b3d exporter?

Post by Andreas »

Hi MTLZ,

thanks a LOT! :)

It worked perfectly. I couldn't try it with animations, though, but a static mesh is exported fine from blender 2.63.
Andreas
Posts: 166
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany
Contact:

Re: How to use Blender .b3d exporter?

Post by Andreas »

Hi again,

i finally got the time to test the export script with an animated model. The model is exported without errors and
irrlicht loads it (e.g. in the MeshViewer) without any error messages.

Bad sadly the mesh is not shown at all (although the animation seems to be played). :(
Additionally the final b3d file is much smaller than the one without an armature.

I've put some test files here (exporter_test.blend, exporter_test.b3d): http://repo.arassec.com/misc/
Is there anything special i have to take care of when exporting an animated model?

Any help is welcome! :D
MTLZ
Posts: 11
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France
Contact:

Re: How to use Blender .b3d exporter?

Post by MTLZ »

I ran some tests and unfortunately, the B3D Exporter doesn't export animated models with Blender 2.63.
I tried with Blender 2.62 and your animated mesh worked perfectly!
Since I'm not a python/blender developer, I can't fix the exporter for 2.63 so we have to wait and hope for an update of the script. Until then, I recommend you to use Blender 2.62.
MTLZ
== Invisible Spirit - http://www.is06.com ==
Andreas
Posts: 166
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany
Contact:

Re: How to use Blender .b3d exporter?

Post by Andreas »

Hi MTLZ,

thanks for trying the mesh. Since i don't have the ability to fix the script myself, too, i will wait for an update and until then use Blender 2.62. :)

Best regards
Andreas
Post Reply