2017-10-21 128 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