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.

How to use Blender .b3d exporter?

Postby Zanman777 » Fri Apr 20, 2012 7:32 pm

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?
Zanman777
 
Posts: 17
Joined: Mon Apr 16, 2012 5:45 pm

Re: How to use Blender .b3d exporter?

Postby ACE247 » Fri Apr 20, 2012 7:43 pm

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!
H8L6L5M4G3H5M7N8S7N9O1R8J1P5M7N9O4P2Q5R6T7U4M3N8X6S5T8W (If you want the secret, why not 'TRY' decrypting it? )
This Door's lock doesn't need a key, the Lock is the key to open the Lock and you don't know how to turn the key...
Link: My Blog :)
User avatar
ACE247
 
Posts: 701
Joined: Tue Mar 16, 2010 12:31 am
Location: Namibia

Re: How to use Blender .b3d exporter?

Postby Zanman777 » Fri Apr 20, 2012 8:06 pm

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?
Zanman777
 
Posts: 17
Joined: Mon Apr 16, 2012 5:45 pm

Re: How to use Blender .b3d exporter?

Postby aaammmsterdddam » Fri Apr 20, 2012 8:42 pm

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
(n^(n-n))-1
aaammmsterdddam
 
Posts: 529
Joined: Mon Oct 24, 2011 10:03 pm

Re: How to use Blender .b3d exporter?

Postby Isoprog » Fri Apr 20, 2012 8:55 pm

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.
User avatar
Isoprog
 
Posts: 76
Joined: Wed Dec 10, 2008 7:53 am

Re: How to use Blender .b3d exporter?

Postby MTLZ » Tue May 01, 2012 3:00 pm

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 ==
User avatar
MTLZ
 
Posts: 10
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France

Re: How to use Blender .b3d exporter?

Postby Andreas » Sun May 06, 2012 8:25 am

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
Andreas
 
Posts: 155
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany

Re: How to use Blender .b3d exporter?

Postby MTLZ » Mon May 07, 2012 12:18 pm

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 ==
User avatar
MTLZ
 
Posts: 10
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France

Re: How to use Blender .b3d exporter?

Postby Andreas » Mon May 07, 2012 5:58 pm

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:

cpp 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
Andreas
 
Posts: 155
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany

Re: How to use Blender .b3d exporter?

Postby MTLZ » Tue May 08, 2012 9:59 pm

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 ==
User avatar
MTLZ
 
Posts: 10
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France

Re: How to use Blender .b3d exporter?

Postby MTLZ » Tue May 08, 2012 10:27 pm

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 ==
User avatar
MTLZ
 
Posts: 10
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France

Re: How to use Blender .b3d exporter?

Postby Andreas » Wed May 09, 2012 5:06 pm

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: 155
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany

Re: How to use Blender .b3d exporter?

Postby Andreas » Sun May 20, 2012 11:01 am

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
Andreas
 
Posts: 155
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany

Re: How to use Blender .b3d exporter?

Postby MTLZ » Fri May 25, 2012 2:20 pm

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 ==
User avatar
MTLZ
 
Posts: 10
Joined: Wed Apr 25, 2012 1:39 pm
Location: Paris, France

Re: How to use Blender .b3d exporter?

Postby Andreas » Fri May 25, 2012 4:17 pm

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
Andreas
 
Posts: 155
Joined: Sun Oct 31, 2004 7:15 am
Location: Münster / Germany

Next

Return to Everything 2d/3d Graphics

Who is online

Users browsing this forum: No registered users and 1 guest