SvenFrankson Posted June 26, 2017 Share Posted June 26, 2017 Hi, I have a simple glass shader here : http://www.babylonjs-playground.com/#JTFJX3#1 There's nothing complicated about it, yet I have not found a way to have this using the existing BabylonJS shader. (there's a phong specular from the sourcelight and enlightment on the surfaces perpendicular to the view) I'd rather have it done with StandardMaterial or PBRMaterial, has anyone already achieved it this way ? I've tweaked FresnelParameters on both Standard and PBR, with no successes so far... Thanks a lot for your inputs ! Have a nice day. Borislav 1 Quote Link to comment Share on other sites More sharing options...
Borislav Posted June 26, 2017 Share Posted June 26, 2017 Awesome with cubes and spheres. http://www.babylonjs-playground.com/#IRZYH I think that'll help Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted June 26, 2017 Author Share Posted June 26, 2017 It's a question I'm looking for a way to do the same thing with the existing Material classes (Standard and PBR) That's because we made an UI for the designers to create Materials (they can set most public properties for Standard and PBR instances), and a loader to request and instantiate the Materials they created in their scenes. If we (developers) need to write shaders, they (graphists, designers...) are no longer autonomous in making the Materials, and will come ask us more. Quote Link to comment Share on other sites More sharing options...
Borislav Posted June 26, 2017 Share Posted June 26, 2017 4 minutes ago, SvenFrankson said: It's a question I'm looking for a way to do the same thing with the existing Material classes (Standard and PBR) That's because we made an UI for the designers to create Materials (they can set most public properties for Standard and PBR instances), and a loader to request and instantiate the Materials they created in their scenes. If we (developers) need to write shaders, they (graphists, designers...) are no longer autonomous in making the Materials, and will come ask us more. http://www.babylonjs-playground.com/#IRZYH This link has some customization going on. Though, I think you can't do transparency for PBRMaterial. Not sure since I don't really use PBRMaterial(I didn't use it even). Quote Link to comment Share on other sites More sharing options...
SvenFrankson Posted June 26, 2017 Author Share Posted June 26, 2017 17 minutes ago, Borislav said: Awesome with cubes and spheres. http://www.babylonjs-playground.com/#IRZYH I think that'll help Thanks, but our "use case" is a glass on a table, within a much larger scene with many objects. Or a light-bulb. The refraction of the scene behind is quite too much (performance-wise), as the camera is not that close, some white enlightment is enough to simulate refraction. Quote Link to comment Share on other sites More sharing options...
Borislav Posted June 26, 2017 Share Posted June 26, 2017 Just now, SvenFrankson said: Thanks, but our "use case" is a glass on a table, within a much larger scene with many objects. Or a light-bulb. The refraction of the scene behind is quite too much (performance-wise), as the camera is not that close, some white enlightment is enough to simulate refraction. Why are you keep on replying on my un edited post -_-. I keep on accidentally pressing enter (lol). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 26, 2017 Share Posted June 26, 2017 Should not be a big problem with stdMaterial: https://www.babylonjs-playground.com/#857TTR Quote Link to comment Share on other sites More sharing options...
Borislav Posted June 27, 2017 Share Posted June 27, 2017 17 hours ago, Deltakosh said: Should not be a big problem with stdMaterial: https://www.babylonjs-playground.com/#857TTR You can modify it a lot. Really fun! https://www.babylonjs-playground.com/#857TTR#3 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.