Issues exporting materials for an object from Blender to .babylon file

Hi all,

I’m having issues with one object for some reason out of the 600 that have exported fine. None of the materials are exporting to a babylon file. Could someone please help please

sandbox view in babylonjs

correct view in blender
image

Regards,

James

1 Like

I would start with looking at the .log file also created. A log for 600 meshes might be long, You should know the mesh name, so you could just search for the name in the log.

Hi,

I’ve reduced the file down so it’s only got that one mesh in. I’m no expert in blender, I wouldn’t know what to look for in the log file to be honest.

I exported GLB from your .blend file and seems it had no errors

1 Like

Hi @labris

It’s the .Babylon file I need as I’ve found a workaround to the whole issues I’ve had with the two materials per object in my other models. If I export a bablyon file it keeps everything together as one object so I don’t need to have the workaround of cloning meshes and deleting then etc for that highlight issue I’ve had.

The model for my city exports fine for the whole city and the 600 odd buildings but for this one object, it doesn’t export correctly in the .Babylon format. I’ve had it working fine too for the .glb format so it seems like a strange issue.

Info: Total files 17 | Changed 17 | Failed 0
========= 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 : C:\Users\Local User\Documents\Block City\fresh\CYBERPUNK CITY 1w
Python World class constructor completed
processing begun of mesh: Circle.010
processing begun of material: CONCRETE.001
WARNING: unsupported node type(ShaderNodeBump) will trigger baking
processing begun of material: ROAD.001
WARNING: unsupported node type(ShaderNodeBump) will trigger baking
processing begun of material: LED.001
WARNING: Metal channel baking required, but not possible, ignored
WARNING: Roughness channel baking required, but not possible, ignored
WARNING: Refraction channel baking required, but not possible, ignored
usePassDirectHold True
Baking texture, type: DIFFUSE, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
processing texture Circle_010_baked_DIFFUSE
texture type: diffuseTexture, mapped using: “BakingUV”
Diffuse / albeto channel baked
Baking texture, type: EMIT, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
processing texture Circle_010_baked_EMIT
texture type: emissiveTexture, mapped using: “BakingUV”
emissive channel baked
Baking texture, type: GLOSSY, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
processing texture Circle_010_baked_GLOSSY
texture type: specularTexture, mapped using: “BakingUV”
specular channel baked
Baking texture, type: NORMAL, mapped using: BakingUV
Info: Baking map saved to internal image, save it externally or pack it
processing texture Circle_010_baked_NORMAL
texture type: bumpTexture, mapped using: “BakingUV”
bump channel baked
bake time: 0 min, 30.201 secs
num positions : 174
num normals : 174
num tangents : 0
num uvs : 348
num uvs2 : 0
num colors : 0
num triangles : 58
========= Writing of JSON file started =========
writing mesh: Circle.010
========= Writing of JSON file completed =========
========= end of processing =========
elapsed time: 0 min, 30.2326 secs

I took out the bump shader and it seems to have resolved the issue. I can now export as a .babylon file without losing the textures.


after

2 Likes

Yes, I do not see that was doing any good, and it is causing baking, which is very non-optimal. If baking is going to be necessary it is always better to do it yourself rather than force the exporter to try and do it. There is no easy half way, like still using roughness / metallic scalars, multiple materials etc. If baking is done in advance, you have a full range of options.

That is the reason for the log file. You have a way to know what was done & why, and be able to solve your own problems.

2 Likes