I’m trying to match the colors of a material with a diffuse texture, and a material which has a matching diffuse color.
However, I’m not getting a lot of detail on the diffuse texture under the default light intensity, and when I ramp it up, the two materials change colors at completely different paces.
As you can see, I’m getting them to mostly fine on the left side, but I can’t make out any facial detail, on the right you can make out facial detail, but it also illuminates the rest of the skin way too brightly.
Meanwhile in Blender I can achieve this:
With blender render and the default light. Similar results with a hemi-light. No need to ramp up the intensity, but even if I do, all materials brighten equally:
Using the exact same texture both in blender and babylonjs as well. Lambert material in blender, default in babylonjs.
This is the lighting and material code:
var light = new BABYLON.HemisphericLight("hemilight", new BABYLON.Vector3(0,1,0), scene); light.intensity = 1; //3-4 to see any revelant facial detail var skincolor = new BABYLON.Color3.FromHexString(globalSkin); //meshes array are just different body elements of the same body meshes.material.diffuseColor = skincolor; //skin color applied everywhere else besides the front face meshes.material.specularColor = new BABYLON.Color3(0, 0, 0); meshes.material.diffuseColor = skincolor; meshes.material.specularColor = new BABYLON.Color3(0, 0, 0); meshes.material.diffuseColor = skincolor; meshes.material.specularColor = new BABYLON.Color3(0, 0, 0); var f = new BABYLON.StandardMaterial("myMaterial", scene); //face texture f.specularColor = new BABYLON.Color3(0, 0, 0); f.diffuseTexture = new BABYLON.Texture("../u/"+id+"/f.jpg", scene); meshes.material = f;