Blog

Creating Blend4Web Materials. Multi-layered Structures

2017-12-19

We are continuing the series of tutorials on creating realistic-looking materials for Blend4Web projects. All examples in these articles are taken from our Material Library, and now, it is finally time to talk about complex multi-layered materials. If you missed previous articles, you can find them here.

Car Paint material

Multi-layered materials can be used to imitate car paint, lacquer wood or carbon. There are several ways to create materials of this type. So, let’s get acquainted with them.

Two variants of the Car Paint material inner structure

This picture shows two different approaches to creating multi-layered materials. At the left, we see a car paint material. Its first layer, the one that has a “metallic” effect, is considered the main one, while the “lacquer” layer is applied to it. Both layers reflect and diffuse light differently.

The second one is the polished metal material with anisotropic highlights. Here, the first layer directs the lights along the polishing marks on the surface. The second one diffuses the light on the surface of the outer protective layer.

The first variant of a two-layered material

The most simple way to create a two-layer material is to use two Material nodes with different settings. The first material should imitate matte surface (1), while the second one will handle lacquer coating (2). They are mixed together using the ColorMix (3) node. You can, by the way, connect a mask to the Factor input of this node to create abrasions and rust marks on the metal surface.

To make the effect more visible, cubemaps with different levels of blur (4 and 5) are connected to the Color inputs of both materials. Another cubemap, an even more blurry one, is connected to the normal map to create major inequalities of the surface. This way we get two different shaders that, when combined, create illusion of a single material.

Now, let’s take a look on another method of creating multi-layered materials. This time, we will use a single Extended Material node.

Extended Material node

In comparison to the more simple Materal node, Extended Material features more inputs and outputs. For now, however, we only need three of them (see the picture above).

1 — Diffuse shader, 2 — Specular shader, 3 — two shaders mixed together

1. Color. This input is similar to the one found in the Material node. Here, we get the combined information.

2. Diffuse. This is the color component of the shader, with shadows, but without highlights.

3. Specular. This socket is the main reason to use the Extended Material node. It gives us an option to manipulate the Specular parameter of the material and mix it with the main Diffuse color.

Two-layered material that uses the Extended Material node

Cube maps are set up the same way as in the previous example. Here, they are once again used to add inequalities to the surface. The main part of the work is done with the Specular parameter, which by default is set to be very blurry. By using the ColorRamp node, we make it a little more rough, then we mix the result with the original Specular (3) and then connect it to the main color (4). This is how two Specular with different levels of blur can be used in the same material.

This, however, is not the end. The secrets of even more complex and intriguing materials await us in the next article...

Comments
31 jan. 2018 04:42
Hey Mikhail,

I've been following you tutorial and can not figure out where the Cube maps are coming from in the first video. Is this a custom texture that exists outside of this tutorial?

Thanks!
07 mar. 2023 18:14
Look at here get free fortnite v bucks free game to exited fun.
22 may. 2023 15:21
Multi-layered structures are architectural or engineering designs composed of multiple layers or levels. These structures offer numerous benefits, including increased strength, stability, and versatility. They are commonly used in construction, aerospace, and material sciences. So you visit https://haiweimachinery.com/products/ and get an authentic stamping machine. Multi-layered structures enable efficient distribution of loads, improved resistance to external forces, and enhanced functionality. Their complex design allows for optimized performance and the integration of various components or materials to achieve specific goals.
22 may. 2023 16:45
Running a business isn't easy. From managing orders to keeping track of your finances, you need the right tools to help keep everything running smoothly. That's why our ERP solution service is the perfect fit for businesses looking to get organized and reach their goals faster Inventory Management Software Solutions. Our innovative platform streamlines operations and automates workflows to make sure your business is running at its best. Plus, we provide free consultations to help customize the perfect ERP solution for your specific needs. Watch our video now and learn how you can supercharge your business today!
23 may. 2023 13:34
Check out popular tourist places to visit in Port Blair and grab best Tour Packages For Andaman And Nicobarlink Island offered by Seeandamans.com at discounted prices. Grab the exciting deals on Port Blair trip Packages today.
16 jun. 2023 14:24
Law Offices Of SRIS, P.C. Articles related to Divorce, Custody, Personal Injury, Business Law, Criminal Law & Traffic Law. Our lawyers are here to help you.
mejor abogado de accidentes de moto
13 jul. 2023 11:09
A DUI Lawyer Mecklenburg VA, possesses extensive knowledge of the state's DUI laws and regulations. They understand the intricacies of the local court system, procedures, and strategies that can be effective in building a strong defense on your behalf. Whether it is your first DUI offense or you have previous DUI convictions, a qualified lawyer can provide you with the legal expertise and guidance you need.
21 oct. 2023 20:39
Multi-layered structures, like intricate origami, offer depth and complexity. They mirror the intricate design principles found at https://www.theruggedrooster.com/crafting-guides/. These structures go beyond mere aesthetics; they serve as the foundation for diverse fields, from engineering to art. Each layer adds strength, functionality, and beauty, much like a well-crafted piece from The Rugged Rooster crafting guides. Just as the website guides artisans, multi-layered structures guide innovation, providing a framework to create something exceptional, whether in the physical world or the digital realm.
09 nov. 2023 16:24
Reply to post of user nommyley
A Driving Without A License In New Jersey, possesses extensive knowledge of the state's DUI laws and regulations. They understand the intricacies of the local court system, procedures, and strategies that can be effective in building a strong defense on your behalf. Whether it is your first DUI offense or you have previous DUI convictions, a qualified lawyer can provide you with the legal expertise and guidance you need.
10 nov. 2023 10:34
Awesome blog. I have read and thought about what you said. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
Johnny Lawrence Jacket
Please register or log in to leave a reply.