Blog

Creating Blend4Web Materials. Complicated Materials

2018-01-23

The time has finally come to learn about creating some of the most complex materials that you can find in the Blend4Web Material Library. These materials use not only sophisticated node setups, but also postprocessing effects and even dedicated geometry structures! This article concludes an entire cycle of tutorials on creating Blend4Web materials.

Water material from Blend4Web Material Library

When you design water for using with Cycles renderer, you can make a procedural Displacement map that applies waves of various shapes to the surface of the water by influencing its geometry. Unfortunately, something like this cannot be done in Blend4Web at the moment, so you have to either use built-in features such as dynamic water, or make custom geometry and shaders. Let’s start with examining water material.

Node structure of the core of the Water material

The water material is relatively simple and consists of two main groups of nodes. The first one includes two normal maps (1) that add small ripples to the surface. Animation is used to make the water look more lifelike. The second group contains a mask with Fresnel effect (2), created from moving normal maps. Reflection are produced using a cubemap (3) that is mixed with a Refraction node that handles transparency and distorts the images of any objects in the body of water.

Settings for baking waves on the surface of the water

Bigger waves are implemented using vertex animation (Wave (1) and Displace (2) modifiers) baked using Blend4Web tools (3).

Depth and caustics imitation

This brings us to one clever trick that will help us to add depth and caustic effect to any scene that includes water material. What we have to do is create a copy of a cube with normals flipped inside, so we can observe its inner surface. The shader itself is colored with a vertical gradient of colors ranging from deep to light blue. The material also includes two animated textures for caustics (1); they help to create an illusion of sun beams and flares at the bottom.

Ice material

The material for ice is done in the same way. Bubble objects with normals flipped inside are added to the geometry in order to create an illusion of multiple light refractions inside the ice.

The inner geometry of the ice cubes with the material applied

The material itself isn’t very complicated. It consists of one Matcap texture (1) that is colored light blue and connected directly to the Output. This is how reflected light is recreated.

Gemstone material from Blend4Web material library

Gemstone material works in the same manner, only its node setup is a bit more complicated.

Gemstone geometry

The image above shows objects with two “layers” of geometry. The material applied to the surface includes Refraction node, so it distorts the image of the inner part. Let’s take a look at the structure of the material.

Material for surface geometry of a gemstone

1. The main part of the material is a Refraction node that is used to distort the inner surface of the gemstone, thus imitating multi-layered structure of a crystal. There is also a normal map with multiple facets. To add some depth to the material, this map is offset along normals using a Mapping node.

2. Cubemap for creating reflections on the glass surface.

3. Another cubemap to implement light dispersion effect. It is connected to a Glow node that produces bright sparkles.

Material for the inner geometry of a gemstone

The structure of the material used for inner parts of a gemstone is similar to the one used for ice material. Its base is a black and white cubemap (2) colored using another cubemap (1) – this approach allows for producing a wide range of highlights. Dispersion effect is implemented using a texture with color spots, just as it is in the material for outer surface.

Fur Cap material from Blend4Web library

And finally, let’s examine the fur material.

Node setup for fur

The core of the material contains a diffuse map (1) and a normal map (2). There is also an alpha map that consists of two textures mixed together with a little offset. Anisotropic highlights are added using a Matcap texture (4), with a SmoothStep node for adjusting roughness.

Using a Matcap texture to imitate anisotropic highlights

The main effect, however, is implemented not with a material, but with multi-layered geometry.

Layers of the cap geometry

If you cut the geometry of the cap in two or more pieces, you’ll see that it consists of several layers. The lowest of them is opaque, it acts as a background. Other layers produce a parallax-like effect, that looks a lot like real fur.

Closing Words

And this completes our examination of materials from our Library. We hope that little tricks you’ve learned will help you to make you own materials just as complex and attractive – or maybe even more so. Feel free to comment, share your thoughts and suggestions, and, of course, any ideas about expanding our Material Library.

Comments
18 nov. 2022 12:13
hard gay anal sex https://www.trainorders.com/discussion/warning.php?forum_id=1&url=https://beargayx.com/categories/Casting/ gay massage providence
bareback gay gif http://tamira.cc/bitrix/rk.php?goto=https://gayspornx.com/categories/Solo%20Male/ xl new york gay hotel
gay sauna buffalo http://images.google.com.bz/url?q=https://malexnxx.com/categories/Exclusive/ gay on top of each other porn
erotic teen gay stories http://ten.rash.jp/muryou/ys4/rank.cgi?mode=link&id=72&url=https://gayspornx.com/categories/Blowjob/ mlk on gays
gay man birthday cake http://diginame.ru/bitrix/rk.php?goto=https://gayspornx.com/categories/Pussy%20Licking/ cavernicolas porno gay xvideo
gay roommates sex http://maps.google.com.mm/url?sa=t&url=https://malexnxx.com/categories/Step%20Fantasy/ gay naked kombat
why traps aren t gay http://www.isheika.com/url.php?https://beargayx.com/categories/College/ black gay cruises 2018
harry dreyfuss gay http://ycheba.ru/bitrix/rk.php?goto=https://gayspornx.com/categories/FMM%20in%20Threesome/ destinos gay mexico
17 jan. 2023 02:10
http://was.annihilated.com/__media__/js/netsoltrademark.php?d=uncensoredhentaixxx.com%2Fcategory%2Funcategorized%2F
http://www.telechange.net/__media__/js/netsoltrademark.php?d=uncensoredhentaixxx.com%2Fcategory%2Fcreampie-hentai%2F
http://conferencebureauhamburg.com/__media__/js/netsoltrademark.php?d=uncensoredhentaixxx.com%2Fcategory%2Fgangbang%2F
http://pfadvisor.com/__media__/js/netsoltrademark.php?d=uncensoredhentaixxx.com%2Fcategory%2Fbig-tits%2F
http://nflunderthehelmet.info/__media__/js/netsoltrademark.php?d=uncensoredhentaixxx.com%2Fcategory%2Fgenshin-impact-noelle-hentai%2F
26 jan. 2023 12:15
https://www.himalaya.com/episode/how-professional-essay-writing-services-can-help-content-marketers-with-keyword-strategy-187236342
20 mar. 2023 15:42
Which Is Not A Result Of Hypertension <a href=https://buycialis.autos>buy cialis online cheap</a>
05 jun. 2023 12:13
Achieving such success is possible for me only if I am able to control my emotions and not fall into depressive states when difficulties arise. Although sometimes I believe that it is better for me to seek help from a specialist. To understand this, I periodically take a mental health test on Calmerry. It helps me assess my well-being and determine whether it is necessary to seek help from a specialist in the field of mental health.
12 jun. 2023 20:01
Building a website requires expertise and attention to detail. Affordable web design services offer a cost-effective solution without compromising quality. With their skillful approach, they ensure the creation of a professional and functional website that effectively represents your brand, engages visitors, and drives online success.
12 jun. 2023 20:01
Building a website requires expertise and attention to detail. Affordable web design services offer a cost-effective solution without compromising quality. With their skillful approach, they ensure the creation of a professional and functional website that effectively represents your brand, engages visitors, and drives online success.
Please register or log in to leave a reply.