Blender Export Material Color issues

Blender :2.81 (sub 16)
exporter_version:6.2.3
Babylon.js: v4.1.0-beta.15
I am exporting with Material set to non pbr (standard material)
In babylon all material color always show up as white
Exporter exports color as diffuseColor, specularColor etc
It should be diffuse, specular etc (no “Color” at end)

1 Like

Hey @satguru , long time no see. Still have a directory on a HD that bears that name :slight_smile:

So I did a simple test - created a cube, gave it a red color and exported it as a .babylon file. This is from the log file:

{“producer”:{“name”:“Blender”,“version”:“2.81 (sub 16)”,“exporter_version”:“6.2.3”,“file”:“mat_colours01.babylon”},
“autoClear”:true,“clearColor”:[0.0509,0.0509,0.0509],“gravity”:[0,-9.81,0],
“materials”:[
{“name”:“Material”,“id”:“Material”,
“customType”:“BABYLON.StandardMaterial”,“backFaceCulling”:true,
“checkReadyOnlyOnce”:false,“maxSimultaneousLights”:4,
“diffuse”:[0.8,0.0028,0.0028],
“specular”:[0.5,0.5,0.5],“specularPower”:76.8,
“alpha”:1,“indexOfRefraction”:0.6897}
], …

So same Blender version, same .babylon exporter - but I just see “diffuse” and “specular”. No mention of “color”

Could you post any files ?

cheers, gryff :slight_smile:

Hi @gryff

Yes its been a long time :slight_smile:

That’s peculiar you don’t see this issue
Here is how the material shows up in my case

“materials”:[{“name”:“Material”,“id”:“Material”,“customType”:“BABYLON.StandardMaterial”,“backFaceCulling”:true,“checkReadyOnlyOnce”:false,“maxSimultaneousLights”:4,“diffuseColor”:
[0.0833,0.8,0.0789],“specularColor”:[0.5,0.5,0.5]}],

Attached is the babylon and log file

box.zip (1.6 KB)

I downloaded the expoter from here

Did more testing.
In blender under material if I choose “Surface” ,“Use Nodes” the exporter stores the color as expected that is diffuse, specular rather than diffuseColor, specularColor.
If I do not select “Use Nodes” then it stores them as diffuseColor, specularColor.

Adding @JCPalmer who might be in vacation at the moment :slight_smile: and I bet It will be sorted in no time :slight_smile:

Found it, changed, but not yet published. Have one change for 2.81, where a Node changed the names of properties. Have to find the forum topic, then do. ETA less than one week.

2 Likes

It took less time to @JCPalmer to fix it than me to answer on the forum. I am a bit jealous :slight_smile:

2 Likes

Now published per https://forum.babylonjs.com/t/blender-2-6-4-published/7861

1 Like