Pryme8 Posted December 28, 2017 Share Posted December 28, 2017 http://www.babylonjs-playground.com/#WG9OY#68 So in the basic example scene that is provided in the docs, I noticed once I turned the intensity down on the lights that something seems off. Im my head (which i probably wrong) Lights that are fixed points should not have moving spectacular highlights... Like I understand that the position on screen might change but their location in relation to the other highlight should not be swimming around all loosey goosey.... Maybe Im just crazy though... Quote Link to comment Share on other sites More sharing options...
jodo Posted December 28, 2017 Share Posted December 28, 2017 I can not prove that the implementation is 100% correct according to reality, but I would say the different relative position of the highlights is due to: 1) Different reflection angle from light as the lights don't have the same direction and position 2) Different light type, which again changes the amount and position of reflection to the camera I tried it out on the Christmas tree bulbs and had the same effect. This "experiment" would be equivalent to using PointLights, I did not have an ambient light which had visible reflections at hand :/. But when using two point lights you get the same relative displacement of the highlights. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 28, 2017 Author Share Posted December 28, 2017 Woot, so I am not tripping I thought it looked a little off the way that the hemi light and the point light shifted... and then I was messing around with my chrome coffee cup while sitting here at work, and I know that the spectacular highlights will move in accordance to view angle but not something so drastic as that the highlights were merging. So does that mean the different lights are calculating their angles in different ways, ideally wouldn't we want them all handled the same way?http://www.babylonjs-playground.com/#WG9OY#69 See how much different this handles then the other when the only thing that changed was the light type. Quote Link to comment Share on other sites More sharing options...
jodo Posted December 28, 2017 Share Posted December 28, 2017 https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/ShadersInclude/pbrLightFunctions.fx You can see that the dot products for computeSpecularTerm() are calculated the same. But other then that, all I am saying are speculations, I don't think I can help much to clear that up ;). Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted December 28, 2017 Author Share Posted December 28, 2017 https://github.com/BabylonJS/Babylon.js/blob/master/src/Shaders/ShadersInclude/lightsFragmentFunctions.fx Well dang, I gotta do some hacking now... thanks for convincing me I'm not crazy at least! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 29, 2017 Share Posted December 29, 2017 Specular highlights are computed the same way but the data are different. Point light and hemispheric lights are clearly different as hemispheric light is like an hemispheric dome of light if you prefer Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.