Creating Blend4Web Materials. Playing With Reflections.


This tutorial continues the series of articles on creating materials for Blend4Web projects. Last time, we learned about simple matte materials. Now, it is time to discuss the subject of reflections.

Chrome material from Blend4Web Material Library

The most simple example of a material like this would be a polished chrome steel, as it reflects its surrounding almost uniformly. First of all, however, we should take a look at methods of creating reflections that are used for materials in Blend4Web Material Library.

1. Real-time reflections. To use this feature, you only have to enable the Reflective option in the material settings. Keep in ming that, depending on the complexity of the scene and the number of reflected objects, using real-time reflection may significantly impact performance.

2. Cubemap reflections. Cubemaps are textures that contain baked reflection images. These images are not rendered in real-time, so in essence cubemap only imitates a real reflection. This approach is fast and convenient, but it does not take into account any changes in the environment.

Working with cubemaps is described in greater detail here.

An example of an object reflecting its surroundings

The picture above shows an object that correctly reflects its surroundings and environment; reflection is updated in real time.

An example of using a cubemap

Cubemap reflections is an optimized and performance-friendly approach, and they also can be used to produce artistically impressive effects that do not depend on the environment and lighting conditions.

Cubemaps with various degrees of blur

To imitate the Roughness parameter used in PBR material model, you can “blur” your cubemap using any image manipulation software (GIMP, Photoshop or any other). The sphere at the left looks like its Roughness is set to zero, while the one at the right should have it close to 1.

Chrome material with cubemap-based reflection

So, if we now take a look at our chrome material, we should notice that it only uses one cubemap and a special Reflect node that it needs to work correctly.


Now, let’s take a look at a more complex material that uses normal maps as well as cubemaps. This will be copper.

Copper material

The node setup used in the copper material can look rather convoluted, but we don’t have to go through all of its components. The only part that really matters is its core. Everything else only adds some effects like weariness and dirt so the material would look more lifelike.

Simplified copper material

Here is the simplified copper material, more suitable for understanding how the core works. Its base is the cubemap (2). Real-life metals reflect almost perfectly, and the reflection is tinted with a certain color. And this is exactly what the core does: the ColorMix (3) node is used to apply the color suitable for this particular metal to the cubemap.

The copper material in the Blend4Web Material Library is roughly polished. To produce this effect, the cubemap should be distorted around small creases and irregularities. So, the Normal input of the Reflect node is connected to the seamless Normal map that is used to imitate rough and uneven grinding.

Normal map is used to imitate irregularities left by rough grinding on the surface of the metal

Now, feel free to watch a video that shows the process of creating a copper material from scratch. It omits some additional effects like dirt or abrasions, but you can use what you have learned from this article to add them yourself.

24 may. 2023 05:30
Good job!
A setting that is suitable for your growth and freedom of cuphead io. All of your achievements are preserved even if you start.
21 jun. 2023 10:37
Hi, very interesting and informative blog. thanks for sharing Delta WIFI Portal Login
28 jul. 2023 17:31
Best post here for pumpkin for Hedgehogs read the blog here.
10 oct. 2023 11:20
Creating materials in Blend4Web can be a captivating journey into the world of 3D rendering. When you start playing with reflections, it's like adding a touch of magic to your virtual creations. The way light interacts with surfaces can breathe life into your models, making them more realistic and engaging. So, don't shy away from dissertation writing services cost experimenting with reflections in Blend4Web—it's where the artistry truly begins! 🌟✨
01 dec. 2023 05:38
The main way to play is to jump and fly over objects while the music plays in the background free games. This makes the game very rhythmic and timed.
01 dec. 2023 10:26
Activating a account typically involves signing up for a subscription and then logging in to access the service. Here's a step-by-step guide to activate your Disney+ account:
01 dec. 2023 12:35
Plan your Best time to visit Coorg escapade during the cooler months from October to March for an unparalleled experience amidst the Western Ghats – undeniably the best time to witness the region's natural splendor.
05 dec. 2023 13:04
I thought this website was incredibly interesting after reading some of your stuff! Continue posting earn to die.
29 mar. 2024 12:42
Examstrack's Salesforce-Data-Cloud exam course is designed to prepare individuals for the Salesforce Data Cloud certification exam. This certification focuses on validating professionals' knowledge and skills in leveraging Salesforce's Data Cloud solutions to drive data-driven decision-making and business insights.
24 apr. 2024 12:46
Optimize business processes and workflows using predictive analytics. By analyzing operational data, you can identify inefficiencies, bottlenecks, and areas for improvement, leading to cost savings and enhanced productivity.
best new betting sites
Please register or log in to leave a reply.