2017-10-21 112 views
-1

如何從Babylon.js球體中刪除(點)光線的反射?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) 

我想點亮球的一半,但沒有紅圈反思:

enter image description here

回答

-1

我找到了解決辦法:

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

你實際上做什麼,是將[Phong反射模型](https://en.wikipedia.org/wiki/Phong_reflection_model)減少爲[Lambertian漫反射模型](https://en.wikipedia.org/wiki/Lambertian_reflectance),通過消除t他是phong模型的高光。 – Rabbid76

+0

好吧,但它的工作。 :-) – Vesmy