The EEVEE / cycles test exporters are fairly operational (publishing of JSON exporter hopefully today). I did not want to clog up the testing topic, so asking this here. I am using one of my old scenes, which I converted to cycles.
Both the javascript & json exporters produce an identical result when exporting as STD.
When PBR output is switched to, I am getting different results. This is out of generated javascript:
This looks reasonable, considering no environment texture is being loaded. This is the material in nodes:
This is what the json produces in the sandbox:
The buttons, which are just using the diffuse node, look close to the same, but the texture mesh looks wrong or at least different. The javascript version code:
material = scene.getMaterialByID("mesh_parent.Gingerbread");
if (!material){
material = new BABYLON.PBRMaterial("mesh_parent.Gingerbread", scene);
material.reflectivityColor = new QI.C(.5,.5,.5);
material.roughness = .5;
material.alpha = 1;
material.indexOfRefraction = 1.45;
material.metallic = .5;
material.backFaceCulling = true;
material.checkReadyOnlyOnce = false;
material.maxSimultaneousLights = 4;
nPendingTextures++;
texture = new BABYLON.Texture(resourcesRootDir + "mesh_parent_Gus_TEXTURE.jpg", scene, false, true, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, onTexturesLoaded, onTextureError);
texture.hasAlpha = false;
texture.level = 1;
texture.coordinatesIndex = 0;
texture.coordinatesMode = 0;
texture.uOffset = 0;
texture.vOffset = 0;
texture.uScale = 1;
texture.vScale = 1;
texture.uAng = 0;
texture.vAng = 0;
texture.wAng = 0;
texture.wrapU = 0;
texture.wrapV = 0;
material.albedoTexture = texture;
material.useAlphaFromAlbedoTexture = false;
nPendingTextures++;
texture = new BABYLON.Texture(resourcesRootDir + "mesh_parent_Gus_NORMALS.jpg", scene, false, true, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, onTexturesLoaded, onTextureError);
texture.hasAlpha = false;
texture.level = 1;
texture.coordinatesIndex = 0;
texture.coordinatesMode = 0;
texture.uOffset = 0;
texture.vOffset = 0;
texture.uScale = 1;
texture.vScale = 1;
texture.uAng = 0;
texture.vAng = 0;
texture.wAng = 0;
texture.wrapU = 0;
texture.wrapV = 0;
material.bumpTexture = texture;
} else material.markDirty();
The relevant json looks like extra (line feeds added):
{"name":"mesh_parent_nodes.Gingerbread","id":"mesh_parent_nodes.Gingerbread",
"customType":"BABYLON.PBRMaterial",
"reflectivity":[0.5,0.5,0.5],
"roughness":0.5,
"alpha":1,
"indexOfRefraction":1.45,
"metallic":0.5,
"backFaceCulling":true,
"checkReadyOnlyOnce":false,
"maxSimultaneousLights":4,
"diffuseTexture":{"name":"mesh_parent_Gus_TEXTURE.jpg",
"level":1,
"hasAlpha":0,
"coordinatesMode":0,
"uOffset":0,
"vOffset":0,
"uScale":1,
"vScale":1,
"uAng":0,
"vAng":0,
"wAng":0,
"wrapU":0,
"wrapV":0,
"coordinatesIndex":0}
,"useAlphaFromAlbedoTexture":false,
"bumpTexture":{"name":"mesh_parent_Gus_NORMALS.jpg",
"level":1,
"hasAlpha":0,
"coordinatesMode":0,
"uOffset":0,
"vOffset":0,
"uScale":1,
"vScale":1,
"uAng":0,
"vAng":0,
"wAng":0,
"wrapU":0,
"wrapV":0,
"coordinatesIndex":0}
},
Beyond the .hasAlpha being different (I manually changed to matching, but no effect), they look the same to me. Why is the output not?