Error while trying to export from Blender

Hi I am trying to export a file for babylon js from Blender, where I have used node materials to create material and getting following error.

Exporter version: 6.3.1, Blender version: 2.82 (sub 7)
========= Conversion from Blender to Babylon.js =========
Scene settings used :
Inline textures : false
Material Type : PBR
Positions Precision : 4
Normals Precision : 3
UVs Precision : 3
Vert Color Precision: 3
Mat Weight Precision: 2
Keep Z-up r-handed : no
Texture directory : /Development/blenders/icecream/
========= An error was encountered =========
File “/Users/anunayarunav/Library/Application Support/Blender/2.82/scripts/addons/babylon_js/json_exporter.py”, line 73, in execute
self.world = World(scene, self)
File “/Users/anunayarunav/Library/Application Support/Blender/2.82/scripts/addons/babylon_js/world.py”, line 59, in init
self.envFileNoPath = bjsTexture.fileNoPath
ERROR: ‘BJSImageTexture’ object has no attribute ‘fileNoPath’
========= end of processing =========
elapsed time: 0 min, 0.0253 secs

I can upload the blend file if needed. I am new to both blender and babylonjs right now.

Yup would be perfect if you can add the blend file as this might help @JCPalmer to troubleshoot :slight_smile:

I do not really need the .blend. Have replicated using a world environment node, I though worked. I rarely do it this way, especially now that the .hdr to .env tool exists. Maybe pull out the the world environment texture, or change to one of the pre-installed .env files. This is done on the world properties, highlighted in red.

Will not get to this today, but I do have a test .blend, also shown below.

Blender 6.4.3 published. When Blender has an .HDR environment texture, by default, it is now correctly copying the file and referencing.

Some caveats.

  • If you indicate that you wish textures to inlined into the .babylon, the environment texture is still external. BJS does not support base64 environment textures.

  • Blender supports formats other than .HDR for environment textures. No checking is performed. Will probably export, then just fail, because that is not supported here. You need to convert it to a .HDR.

3 Likes

Thank you. This works!