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
27 feb. 2023 17:35
Nice thing. But i still glad that i have chosen medical profession rather than this one. I believe that helping people is more important, And i also need to deal a lot with nursing papers are an essential aspect of nursing education and practice. Writing a nursing paper requires a thorough understanding of nursing theory, research, and clinical practice. Nurses write papers to communicate their findings, opinions, and recommendations to their colleagues and the wider healthcare community. Nursing papers online may include research papers, case studies, reflective essays, and care plans. The writing process involves gathering and analyzing information, synthesizing it into a coherent argument, and presenting it in a logical and organized manner. Nurses must also adhere to ethical guidelines and standards of practice in their writing. To write a successful nursing paper, nurses must pay attention to the structure, language, and formatting requirements. It is important to use clear and concise language, avoid jargon, and cite sources appropriately. Nurses can also seek feedback and guidance from their instructors, colleagues, and mentors to improve their writing skills.
14 mar. 2023 01:41
Hey there, I know how hard it can be to write a professional personal statement. It's like you have all these ideas in your head, but when it comes to putting them on paper, things just don't seem to click. But guess what? My friend recently told me about special personal essay writing service who can help you out! These guys are experts in crafting outstanding personal statements that really stand out from the crowd. With their help, you won't have to deal with any of the stress and hassle that comes with writing a personal statement yourself. So if you're struggling with your application, don't hesitate to reach out for some extra assistance - believe me, it's worth it!
15 mar. 2023 06:06
There are a couple of reasons that a usps tracking number might reflect a Delivered status, even though you just generated a label or shipped the package.
15 mar. 2023 06:07
There are a couple of reasons that a usps tracking number might reflect a Delivered status, even though you just generated a label or shipped the package.
03 may. 2023 14:06
Procedural materials are a powerful tool for virtual magicians to create realistic textures and materials in their digital creations. By using mathematical algorithms to generate textures and patterns, procedural materials allow for infinite variation and customization, ensuring that no two surfaces look exactly the same. With the ability to generate complex materials quickly and efficiently, procedural materials have become an essential tool for Virtual magicianto bring their digital worlds to life. This technology is widely used in the video game industry to create immersive environments and in the film industry to generate stunning visual effects.
03 aug. 2023 09:31
CompTIA 220-1101 Dumps Questions are a comprehensive collection of practice exam questions designed to help individuals prepare for the CompTIA A+ Core 1 (220-1101) certification exam. The CompTIA A+ certification is widely recognized in the IT industry and serves as a foundation for building a successful career in IT support and technical roles.



These dumps cover various topics, including hardware, networking, mobile devices, cloud computing, and troubleshooting. They provide candidates with real-world scenarios and challenges to assess their knowledge and skills. By using these dumps, aspirants can familiarize themselves with the exam format, enhance their understanding of A+ concepts, and identify areas that require further study.

It is essential to note that while dumps can be valuable as a supplemental study resource, relying solely on them is not recommended. Aspirants should also utilize official study materials, hands-on practice, and practical experience to ensure a thorough grasp of the subject matter. This multi-faceted approach will better prepare candidates for success in the CompTIA Exam and contribute to their overall IT expertise.
08 aug. 2023 13:26
Paper Coach is a writing service found at Papercoach.net. But, they don't have a special part about the company. Instead, you can learn about their 4-step ordering process in the "How it Works" section. It's not clear where the company started because it's registered in Iceland and doesn't say who's in charge.
17 aug. 2023 14:55
These materials, often described as digital recipes, enable artists and designers to achieve remarkable realism and complexity in their work. By defining a set of parameters and rules, procedural materials can simulate intricate details like weathering, patterns, and textures that closely mimic real-world surfaces. As creators strive for efficiency and creativity, platforms like magicalkits.com provide a valuable resource, offering a diverse library of procedural material presets that can be easily integrated into different projects. This not only accelerates the design process but also opens doors to endless possibilities, empowering artists to experiment, customize, and achieve astonishing results that push the boundaries of visual artistry.
26 sep. 2023 12:44
People face a lot of difficulty in clearing the https://www.valid4sure.com/adm-201-salesforce-certified-administrator-valid-question.html. Either they lack access to helpful learning material or they do not have the appropriate knowledge. To achieve success in Administration Essentials for New Admins exam, one needs to have the exact Salesforce ADM-201 dumps pdf learning content. Only such content will make appearing and attempting in the Administration Essentials for New Admins exam a breeze.
05 oct. 2023 00:32
When delving into education and the creation of Blend4Web materials, mastering procedural materials is key. This multifaceted skill not only enhances 3D content but also bolsters one's portfolio. However, tackling this subject can be challenging. Consider seeking swot analysis assignment help to evaluate strengths, weaknesses, opportunities, and threats, guiding you towards effective learning strategies and material creation.
Please register or log in to leave a reply.