V!nc3r Posted August 10, 2016 Share Posted August 10, 2016 Is it possible to tell a reflection in a standard material to not be active on some pixels ? In this playground http://www.babylonjs-playground.com/#ZMOEK#0 how could i set this texture as a mask for the spheremap ? Can reflectionTexture.level accept an image as a value for example ? Thanks, Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 10, 2016 Share Posted August 10, 2016 Unfortunately this is not supported. Reflection is only controlled by fresnel values Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 10, 2016 Author Share Posted August 10, 2016 OK, it's actually not a surprise, I remember that even in Unity or Shiva it was not so easy to implement. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 11, 2016 Share Posted August 11, 2016 Only way: create your own shader (have a llok to this:http://doc.babylonjs.com/tutorials/How_to_create_a_material_for_materialsLibrary) Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 12, 2016 Share Posted August 12, 2016 can i help ? i don't understand exactly main question Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 22, 2016 Author Share Posted August 22, 2016 To make it short I want only one material for my object, with a spheremap in the reflection slot, but this spheremap activated only on white pixels from this example texture. As for creating my own shader, it seems to be out of my skills at the moment Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 22, 2016 Share Posted August 22, 2016 hi i make that ( you image have alpha channel ) http://www.babylonjs-playground.com/#1NP9BY#24 just white color http://www.babylonjs-playground.com/#1NP9BY#23 white and transparent color V!nc3r and adam 2 Quote Link to comment Share on other sites More sharing options...
adam Posted August 22, 2016 Share Posted August 22, 2016 Hi @NasimiAsl, I just wanted to point out that the eval global variables (scene and mesh) are not necessary in these examples. http://www.babylonjs-playground.com/#1NP9BY#26 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 22, 2016 Author Share Posted August 22, 2016 Great job, thanks ! Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted August 22, 2016 Share Posted August 22, 2016 yes @adam we have one post before about incorrect reflection size so when we don't calculate world position we cant find correct reflect any way that is not necessary in this case 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.