From Blender to Babylon.js using the babylon exporter - Error (Using Archipack)

Hi Everybody,

When i try to export a blend file into a babylon.js file i get the following errors:

File “C:\Users\Gusta\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\”, line 65, in execute
exporter.execute(context, self.filepath)
File “C:\Users\Gusta\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\babylon_js\”, line 115, in execute
mesh = Mesh(object, scene, self)
File “C:\Users\Gusta\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\babylon_js\”, line 146, in init
recipe = BakingRecipe(bpyMesh, exporter)
File “C:\Users\Gusta\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\babylon_js\materials\”, line 105, in init
self.bakedMaterial.bake(bpyMesh, self)
File “C:\Users\Gusta\AppData\Roaming\Blender Foundation\Blender\2.91\scripts\addons\babylon_js\materials\”, line 135, in bake
self.uvMapName =
AttributeError: ‘NoneType’ object has no attribute ‘name’
location: :-1

More specifically, im using the Addon Archipack and if i try to export a wall for example, no errors occur.
Once i make a window in the wall and try to export it, the errors appear.

I’m using blender 2.91.0 and the Babylon.js ver 2.91-alpha of the exporter.

Does anyone of you have any idea of why i get this error when trying to export a scene that contain windows?

Help would be much apreciated :-)!

PInging @JCPalmer

While you are using the exporter from the correct repo branch, nothing has really been done to it. Probably not really even going to look till 2.92 for API changes.

That does not mean nothing can be done. One thing that you might be able to do is change the material, so that it does not require baking. There is probably some nodes which are never going to translate really well for very clear materials like glass. Baking somehow does not seem like a good fit, even if it did worked.

Look at and post your export log file. Find the material it was working on when it aborted. Post a picture of the material in the shader editor.

You might also try doing using Blender 2.83 LTS, if for no other reason than see if this is 2.91 specific. If it does work, but not really poor, then you know replacing the material with a principled node more compatible is the way to go.

Thanks for the quick response!

Still haven’t found the exact reason as to why the errors occur. However, i found out that multiple textures are attached to the window meshes and no errors appear when one texture is attached to one mesh.

In regards to the glass, i’ve been searching for other threads and it seems that glass can’t really be baked, as you suggested :slight_smile: