SvenFrankson Posted November 14, 2017 Share Posted November 14, 2017 Hi everyone, I'm facing some issues with the use of ReflectionProbe, may I please request some help ? Here's the use case : Some object is in a room with walls and windows, and I'd like the walls and windows to reflect on the objet. So I add a probe at the object's position, push the walls and windows in the probe renderList. And it works pretty well ! (here, the cube is the object, the balls are the walls and windows...) https://www.babylonjs-playground.com/#AZA2CG#1 But in some cases (like in the linked playground), there's some long and synchronous computation when it needs to call ConvertCubeMapTextureToSphericalPolynomial. I think it's correlated to the type of the Material I'm applying the probe texture on... Is there a workaround to avoid this computation ? (beside reducing the texture size ?). On a side note, I have very little knowledge about the concepts of light harmonics, but why does this computation only happens once if the probe is updated each frame ? In advance, thanks a lot for your inputs ! Have a nice day, Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 14, 2017 Share Posted November 14, 2017 ping @Sebavan Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 14, 2017 Share Posted November 14, 2017 Actually I did it only once cause it is a slow operation :-) You could force by forcing it to null before rendering but you would kill your fps. To not compute it, I guess you could add one empty on your texture manually as it is normally lazily created: https://www.babylonjs-playground.com/#AZA2CG#2 Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted November 14, 2017 Author Share Posted November 14, 2017 Thanks Sebavan, I'll try it, seems like it could do the trick for us I think my side question was "What does this computation do ?" ? It's about extracting light information from the texture ? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 15, 2017 Share Posted November 15, 2017 This is basically the diffuse part of the environment lighting where the reflection itself could be thought as the specular: https://graphics.stanford.edu/papers/ravir_thesis/chapter4.pdf This what you would see on a fully rough none reflective material: http://playground.babylonjs.com/#19PJCY#1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 15, 2017 Share Posted November 15, 2017 Please note how @Sebavan teased the new scene.createDefaultEnvironment feature Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted November 17, 2017 Author Share Posted November 17, 2017 I just tried to assign an empty one to the texture, the differences are pretty small (the objets are quite small and glossy) and there's no freeze during scene load. I guess my problem's solved, thanks ! GameMonetize 1 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.