Blog

Creating Blend4Web Materials. Procedural Materials

2018-01-17

Today is the time to examine procedural materials. Our examples this time will be snow and tinfoil. If you’ve missed our previous articles, you can read them here.

Silk material from Blend4Web Material Library

There are certain types of materials that do include reflections, but produce most of their effects – even base colors – using pure mathematical calculations, without any kinds of textures. Silk, velvet, snow or tinfoil would be good examples of such materials.

The core of the silk material

If you take a close look at the core of the material, you’ll notice a single diffuse texture (1) that is used to produce the main effect. Highlights and lighting in general are made using several masks (3) that are generated procedurally and are based on normals (2) with camera position taken into account. The outcome looks very similar to the well-known Fresnel effect. Try to apply this material to a simple sphere, and you’ll see concentric rings that originate from the geometric center of the object. These rings are always set in the direction of the camera and do not depend on the environment or the positions of the light sources.

The video above shows the process of creating a mask with a Fresnel effect, complete with a normal map used for a backdrop. This, however, poses the question: why do all this when Blender features the Fresnel node that works perfectly fine?

This is because the built-in Fresnel node produces a highly lifelike effect, whith color gradient changing non-linearly from the center to the edges, as it does in real environment. This is perfect for creating reflection on a polished surface, but not very suitable for other tasks. So if your intent is to create an imitation effect, a custom node setup will be a better choice.

Node setup for creating Fresnel effect

The Fresnel effect is based on the Dot Product (1) node with the value of the vector being [0,0,1]. The image is then compressed a bit (2) using a dedicated SmoothStep node. After this, a color is applied to the image.

Snow material from Blend4Web Material Library

Now, let’s take a look on another interesting material that does not feature a diffuse component.

Node structure of the snow material

All the “magic” here happens inside of a dedicated node group (1). The shader basically combines the material with a baked Ambient Occlusion map and colors it with light shades. This way, SSS and light blue glow on the snow surface can be imitated.

Tinfoil material from Blend4Web Material Library

Now, it is time to get a glimpse of the inner structure of the tinfoil material.

It includes two textures. The first one is a normal map (1) used to add crease effect to the surface, while the second one is a Matcap (3) that handles the base matte background. The rest of the material is entirely procedural and uses masks (2) and Vector Math nodes.

Node structure of the tinfoil material

And this is all for today. In the next article we will talk about another type of complex materials such as water, ice and gemstones.

Comments
17 nov. 2023 07:46
Our Cisco 500-220 practice test is the most reliable solution to quickly prepare for your Cisco Engineering Cisco Meraki Solutions v1.0. We are certain that our Cisco 500-220 practice exam will guide you to get certified on the first try. Here is how we serve you to prepare successfully.
17 nov. 2023 07:50
The Cisco 500-220 exam dumps is a series of exam questions designed to help candidates pass the certification exam with good scores. These exam dumps are comprehensive braindumps which have been prepared by experts with years of experience. The dumps are organized into easy to follow topics and questions, so it is extremely easy to locate any specific topic you want to review. The Cisco 500-220 question dumps are the most popular exam preparation tools among students and professionals.
17 nov. 2023 09:14
New to Google Classroom? Follow this comprehensive guide for a smooth setup process. From creating an account to configuring class settings, ensure you start your digital classroom journey with confidence.
Google Classroom |
Google Classroom
17 nov. 2023 09:23
New to Google Classroom? Follow this comprehensive guide for a smooth setup process. From creating an account to configuring class settings, ensure you start your digital classroom journey with confidence.
Google Classroom |
Google Classroom
23 nov. 2023 20:03
Experience the thrill of Desert Activities Dubai with Spotlight Dubai Tours! Enjoy an unforgettable buggy ride and quad bike adventure in the stunning desert landscape. Book your exciting desert experience today.
10 dec. 2023 09:18
Find out which devices are supported and ensure browser compatibility for Whatsapp Web. Discover seamless connectivity options with our comprehensive compatibility guide."
<a href="https://webwhatsapp.webflow.io/">Whatsapp Web</a>
<a href="https://whatsappweb.webflow.io/">Whatsapp Web</a>
10 dec. 2023 09:19
Find out which devices are supported and ensure browser compatibility for Whatsapp Web. Discover seamless connectivity options with our comprehensive compatibility guide."
<a href="https://webwhatsapp.webflow.io/">Whatsapp Web</a>
<a href="https://whatsappweb.webflow.io/">Whatsapp Web</a>
10 dec. 2023 09:19
Find out which devices are supported and ensure browser compatibility for Whatsapp Web. Discover seamless connectivity options with our comprehensive compatibility guide."
<a href="https://webwhatsapp.webflow.io/">Whatsapp Web</a>
<a href="https://whatsappweb.webflow.io/">Whatsapp Web</a>
16 mar. 2024 13:07
Our OGEA-103 exam dumps Combined Part 1 and Part 2 Exam Combo Package for which includes PDF (Printable Format) and Testing Engine (Works on Windows and MAC) which ensures you to go through all certification topics and provides you ultimate satisfaction to pass your exam in your first attempt.
Please register or log in to leave a reply.