Search code examples
javascriptlightbabylonjs

Babylon.js remove light reflection of Sphere


How can I remove reflection of (point) light from sphere in Babylon.js?

// Point light.
const light = new BABYLON.PointLight('myLight', new BABYLON.Vector3(0, 1, 0), scene)

// Sphere with size 100.
const newBox = BABYLON.Mesh.CreateSphere('mySphere', 64, 100, scene)

I would like to light up half of sphere, but without reflection in the red circle:

enter image description here


Solution

  • I found solution:

    newBox.material = someMaterial
    newBox.material.specularColor = new BABYLON.Color3(0, 0, 0);