Transparency and transparency maps to make glass drinking glasses

1. What is transparency?

Model transparency refers to how transparent an object or model is when presented. It determines whether the object or background behind it is displayed when the object is rendered.

In graphics rendering, transparency is usually represented as a value between 0 and 1. A value of 0 means completely transparent, that is, the object is invisible and the background or other objects are completely penetrated; a value of 1 means completely opaque, that is, the object is completely visible and there is no transparency effect.

By adjusting the transparency properties of the model, you can achieve different degrees of transparency. For example, when the model transparency is set to 0.5, the object will appear partially transparent and objects behind it can be seen, but a certain amount of opacity will still be retained. This effect is usually used for transparent objects such as glass, water, and smoke.

It should be noted that the transparency of the model not only depends on the transparent properties of the object itself, but may also be affected by factors such as lighting, material, and environment. At the same time, achieving model transparency also requires the correct setting of relevant parameters and technical support for the rendering engine or graphics program.

2. What is a transparent map?

Transparency mapping is a technique commonly used in computer graphics, usually used to achieve local transparency effects on the surface of objects. It is a special mapping technique that allows certain parts of a texture image to be transparent and other parts opaque.

Transparency maps typically use an image that contains an alpha channel (also called a transparency channel) to describe transparency information. The value of each pixel in this alpha channel represents the degree of transparency of the point corresponding to this pixel. When the transparency map and the model are merged and rendered, the rendering engine will decide whether to let the background show through based on the value of the alpha channel, thereby achieving a partial transparency effect.

Transparency maps are usually used to achieve translucent effects, such as the rendering of water, glass, smoke, clouds and other objects. By using transparency maps, we can express the opacity of certain parts of the object surface more accurately, making the rendering results more realistic and natural.

It should be noted that when using transparency maps, you need to set the correct rendering parameters and a graphics engine and program that supports this technology. At the same time, transparent maps also have certain requirements on computer performance, and excessive use may lead to performance degradation.

3. The relationship between transparency and transparency maps

Model transparency and transparency mapping are two different but closely related concepts.

Model transparency: Model transparency refers to the degree of transparency or opacity of the object itself. It is a property or parameter that controls the transparency of the entire model. Model transparency is usually expressed as a value between 0 and 1, where 0 means completely transparent and 1 means completely opaque. By adjusting the model transparency parameters, you can make part or all of the model transparent when rendering.

Transparency mapping: Transparency mapping is a special mapping technology in which each pixel, in addition to color information, also contains a channel representing transparency (usually the A channel in the RGBA channel). Transparency maps allow you to control the transparency level of each pixel in a map by embedding transparency information into the map's pixels. Transparency maps can be blended with the model surface to achieve a partially transparent effect with different transparency levels on the object surface.

Simply put, model transparency is the transparency attribute that controls the entire model, while transparency mapping is a mapping technique used to control the transparency level of each pixel on the model surface. Transparency maps can be used in conjunction with a model's transparency property to achieve more complex and detailed transparency effects. By adjusting the transparency channel of the transparency map, you can achieve personalized transparency settings for different parts of the model surface.

4. How to use transparency and transparency maps to make a glass

Through the above explanation, we have a comprehensive understanding of transparency and transparency maps. At the end of the article, we use an example to show how to use transparency and transparency maps to make a transparent proportional water cup.

The tool we used this time is the GLTF editor  , which is a web-based online material map editing tool that supports various common material map editing.

First, we use the GLTF editor  to open a white model (a model without any material mapping), as shown below:

The current cup model does not have any material and looks like a white mold. We set the transparent image and transparency separately for the water cup to achieve the effects:

0.5 transparency, no transparent material map

The glass material is set and the transparency is 1 

As you can see, setting transparency or transparent mapping alone cannot achieve the desired effect. Let's combine the two:

Glass material, transparency 0.4

Transparency maps play a key role in achieving model transparency. By combining the transparency channel of the transparency map with the transparency property of the model, you can achieve partial transparency effects with varying transparency. The transparency information of each pixel of the transparency map will be applied to the corresponding model surface, thus affecting the overall transparency presentation.

Transparency mapping is a special mapping technique used to describe a texture image where some parts are transparent and other parts are opaque. It is usually used to achieve local transparency effects on the surface of objects, which can make the rendering results more realistic and natural.

Original link: Transparency and transparent maps for making glass cups (mvrlink.com)

Guess you like

Origin blog.csdn.net/ygtu2018/article/details/133563852