Forum

Blog "Creating Blend4Web Procedural Materials" Fresnel example not working in browser

09 July 2018 04:42
Hi, the Fresnel example in the Blog "Creating Blend4Web Materials. Procedural Materials" doesn't work in my browser. Specifically the fresnel effect doesn't follow the camera (i.e. Dot Product Node of z = -1) and the transparency isn't working either.

I've added a Vector Transform node between the Geometry and Dot Products nodes, converting from World to Camera, but this doesn't work either.

Is the example only meant to work in the 3D Object view?
09 July 2018 20:42
I didn't read the whole tutorial, but I think I got it working by doing what you did and then replacing "Dot Product" with "Cross Product". (see attachment)

I'm not sure where transparency comes up in this material. Also, transparency may not show up in the viewport or may look different from the browser output depending on the selected Transparency Type etc.
13 July 2018 06:08
Thanks for your reply. This doesn't work because when I pan the camera in the browser using the middle mouse button, the fresnel does not follow the camera. However it does work when I rotate the camera with the left mouse button. I have attached a screenshot of the scene in my browser.
14 July 2018 00:55
I see it now, but I don't know how to change the material. The vector should always point towards the camera (object), but instead it uses the camera view direction. I think the guy who made the material is no longer with the B4W project.
 
Please register or log in to leave a reply.