pichou Posted October 31, 2017 Share Posted October 31, 2017 HI everybody! Is it possible to add a rim effect on mesh like in this image : Thanks, Pichou Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 31, 2017 Share Posted October 31, 2017 We do here is an experiment: https://www.babylonjs-playground.com/#H82GNB Pryme8 and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
pichou Posted October 31, 2017 Author Share Posted October 31, 2017 Cool I didn't know about the fresnelParameters! To go further, do you think there is a way to mix waterMaterial with the fresnel parameters to obtain a sort of force field? Something like that : https://www.youtube.com/watch?v=tB5WoFpWdYQ (hope I won't get ban for sharing a unity video ) I have made a test in this playground with no result : http://www.babylonjs-playground.com/#1SLLOJ#386 But maybe the waterMaterial is not the right tool to do that. Cheers! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 31, 2017 Share Posted October 31, 2017 We are getting closer to a custom shader here But still, I guess we can use StandardMaterial flexibility like this: https://www.babylonjs-playground.com/#H82GNB#1 Quote Link to comment Share on other sites More sharing options...
pichou Posted October 31, 2017 Author Share Posted October 31, 2017 Yep that was what I thought, but I don't have the time right now to get into custom shader. But I have some idea now to get close to what I need thanks to your suggestions. Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 2, 2017 Share Posted November 2, 2017 I have this force field custom shader in my favorite, I worked on it long time ago: http://cyos.babylonjs.com/#15MS95 Hope it can help! pichou 1 Quote Link to comment Share on other sites More sharing options...
pichou Posted February 25, 2018 Author Share Posted February 25, 2018 Hi @Temechon! I am currently tring to add you force field custom shader in my scene (which looks really great by the way!) But I need the force field to be also transparent. Do you a way to do that? I am just starting with custom shaders so don't really know all the parameters yet! Thanks, Pichou Quote Link to comment Share on other sites More sharing options...
pichou Posted February 26, 2018 Author Share Posted February 26, 2018 I made it work by adding the needAlphaBlending: true attribute in the ShaderMaterial creation! It looks really nice! Weird thing I noticed though : If my mesh with the shaderMaterial has a visibility of 1, it creates a hole in the canvas. I mean I can see the other html element behind the canvas in the scene. In order to avoid that I add to put the visibility to 0.2. ShaderMaterial are awesome, I will continue to add them in my scene! 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.