Next Article in Journal
Fermented Rice Germ Extract Ameliorates Abnormal Glucose Metabolism via Antioxidant Activity in Type 2 Diabetes Mellitus Mice
Next Article in Special Issue
Data Hiding Method for Color AMBTC Compressed Images Using Color Difference
Previous Article in Journal
Influence of Maxwell Stiffness in Damage Control and Analysis of Structures with Added Viscous Dampers
Previous Article in Special Issue
UFMC-Based Underwater Voice Transmission Scheme with LDPC Codes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Physically Based Soap Bubble Synthesis for VR

Division of Media Software, Sungkyul University, XICOM LAB, Anyang 430742, Korea
*
Author to whom correspondence should be addressed.
Appl. Sci. 2021, 11(7), 3090; https://doi.org/10.3390/app11073090
Submission received: 9 March 2021 / Revised: 28 March 2021 / Accepted: 29 March 2021 / Published: 31 March 2021
(This article belongs to the Special Issue Research on Multimedia Systems)

Abstract

:
To experience a real soap bubble show, materials and tools are required, as are skilled performers who produce the show. However, in a virtual space where spatial and temporal constraints do not exist, bubble art can be performed without real materials and tools to give a sense of immersion. For this, the realistic expression of soap bubbles is an interesting topic for virtual reality (VR). However, the current performance of VR soap bubbles is not satisfying the high expectations of users. Therefore, in this study, we propose a physically based approach for reproducing the shape of the bubble by calculating the measured parameters required for bubble modeling and the physical motion of bubbles. In addition, we applied the change in the flow of the surface of the soap bubble measured in practice to the VR rendering. To improve users’ VR experience, we propose that they should experience a bubble show in a VR HMD (Head Mounted Display) environment.

1. Introduction

With the recent advances in computer graphics technology, the extended reality (XR) market, which encompasses virtual reality (VR) and augmented reality (AR), is rapidly growing, and various content is being produced. In recent years, even artificial intelligence (AI) has been applied to VR applications and has been used in various fields such as tourism, leisure, education, games, and health care fields [1]. Orchestra performances and music videos by singers are provided in VR, and the types of application that are viewed are continually growing. However, to watch an immersive soap bubble show, we need real materials such as soap bubbles and bubble tools along with a special concert hall, and it must be accompanied by experienced performers who produce it. Therefore, in this work, we propose a VR bubble show framework that has no space-time constraints and can be directed without special bubble art materials and equipment. In addition, at a time when outdoor activities are restricted due to COVID-19 Pandemic, soap bubble can be considered a timely technology to experience performance indoors as well.
To synthesize a soap bubble show in VR, we need to analyze and model the actual physical shape and movement of soap bubbles. However, modeling soap bubbles in a VR environment requires too much computation and there are hardware limitations. Nevertheless, the realistic expression of soap bubbles is very important and it must satisfy users’ high expectations. To realize a soap bubble show in VR, we first need to understand the basic properties of soap bubbles. Soap bubbles are very light in the form of a thin layer of soap that surrounds the air, with large changes caused even with a small force [2]. The soap bubbles used in a bubble show are more stable than typical soap bubbles because they use a liquid containing surfactant ingredients that stops the bubble from bursting easily [3]. In addition, many physical laws apply to a single soap bubble and determine its movement patterns. In computer graphics, soap bubbles were realistically simulated as clusters of many soap bubbles using vortex sheets [4]. As hardware capable of real-time rendering was developed, motion recognition was used to simulate the generation and bursting of soap bubbles [5]. A study even examined color changes in bubbles due to light cancellation and interference [6]. To the best of our knowledge, no study has used soap bubble modeling to determine the size of a soap bubble based on actual parameters or applied the laws of physics to bubbles that are to be used in VR content, nor has a study produced a rendering model to which environmental variables can be applied. In this study, we propose a physically based soap bubble synthesis that can be experienced in a virtual reality environment. To this end, we analyzed measured soap bubble data and optimized the motion vector texture to express the velocity of fluid flow. In addition, for optimized modeling, the shape and motion of soap bubbles were measured and parameters describing the physical characteristic were extracted. We measured the movement path, internal and external pressure difference, damping force, volume, mass, cross-sectional area, air resistance acceleration, and fall acceleration of soap bubbles. Finally, we implemented a soap bubble experience in VR by applying the physics-based rendering technology.
The contributions of this study are summarized as follows: We created a soap bubble model by measuring several physical variables of soap bubbles; we developed a soap bubble modeling method optimized for VR by applying the physical variables required for soap bubble modeling and rendering. Finally, we provided tools that can be experienced in VR environments and tools for creating customized hand gestures such as clap, grab, fanning, bouncing and piercing.

2. Related Work

We reviewed previous studies with an interest in art culture and various aspects of engineering related to rendering and modeling of soap bubbles and their simulations.
A previous study reported the thin film interference of soap bubbles [7]. This study measured soap bubble thickness with color matching by measuring the thickness at various points using the principle of color perception and by utilizing the thin film interference of soap bubbles. This study contributed to our understanding by showing how the surface color reflected through the thin film interference depended on the thickness of the soap film according to the viewing distance and angle.
A study on the surface tension of soap bubbles found that the thickness of flowing soap films influenced the strength of the surface tension [8]. Real-time rendering of soap bubbles that measured light interference showed how the surface tension could change in real time [9]. This study explained that external forces and the bubble’s surface thickness are the main causes of variation in surface tension.
Another study examined the formation and break-up of fluid bubbles, and found that this process contributed to changes in the thickness and shape of flowing soap bubbles [10]. A high-speed visualization of soap bubble blowing and image-processing-based analysis of pinch-off dynamics captured the moment when soap bubbles separated [11]. A theoretical and experimental study of the stability of a soap film spanning a flexible loop [12] proposed that the stability of soap bubbles was generated by twisting or bending the tool on the same dynamic tool rather than a static tool.
Another study was conducted on soap bubbles and the surrounding environment [13]. This study reported a method that involved spreading soap bubbles on dry and wet surfaces, and examined the friction and bursting of soap bubbles according to the surrounding environment. The rendering conditions of soap bubbles in terms of reflection and refraction, as well as the wavelength of the soap bubble color, has also been studied [14]. A model for soap film dynamics with evolving thickness [15] presented a new algorithm to render a soap film. This study analyzed the changing thickness as the soap bubble flowed, which contributed to changes at the bubble’s surface and to the geometric shape. Another study reported an irregular flow rate measurement method for soap films [16]. The effect of chemo-mechanical simulation of soap film flows on spherical bubbles proposed rendering based on lubrication theory [17]. This study reproduced the free flow of the soap film and change of flow due to external forces such as gravity and air flow.

3. Soap Bubble Modeling

Most existing soap bubble models are being used without considering the size or standard of the soap bubble handling tool. However, the size and shape of the soap bubble clearly depends on the size of the tool used. Therefore, to make a soap bubble model that is closer to reality, it is necessary to measure the exact value of physical parameters. To this end, we conducted an experiment to measure the diameter, shape, and movement of bubbles. When a soap bubble is created, the three important parameters to consider are the vertical diameter of the bubble, the separation position, and the diameter of the bubble after separation.

3.1. Measurement of Soap Bubble Environmental Variables

In the experiment, soap bubbles were blown directly with a black background and filmed using 1080p resolution slow-motion video. The feature value of the soap bubble was extracted in cm using the scale ratio between the camera and the object size from the still image obtained from the captured video. Figure 1 shows some of the still images used. Figure 1a is a small straw with a diameter of 0.7 cm, and Figure 1b is a large straw with a diameter of 1.3 cm. There are three key parameters when the soap bubble is created. First, the change in the vertical diameter of the soap bubble, second, the change in the separated position, when the soap bubble is completely separated, and third, the change in the soap bubble diameter after separation. Figure 2 is a 3D model of soap bubble. Vertical diameter, separated position, and soap bubble diameter can be checked in the soap bubble.

3.2. Measuring the Vertical Diameter and Separated Positon of Soap Bubbles

The vertical diameter and separated position of soap bubbles were determined by the shape and size of the tool blowing the soap bubble. Therefore, in this study, 30 experiments were conducted with straws with a diameter of 1.3 cm and straws with a diameter of 0.7 cm. Figure 3a shows the vertical diameter value extracted from the experiment when the soap bubble was blown. When using a 1.3 cm straw, the average diameter was 1.43 cm (SD: 0.18 cm), while for the 0.7 cm straw the average diameter was 0.91 cm (SD: 0.16 cm). The vertical diameter ranged from 1.24 to 1.6 cm for the 1.3 cm straw, and from 0.76 to 1.07 cm for the 0.7 cm straw.
Figure 3b shows the value of the separated position for bubbles. When using a 1.3 cm straw, the average separated position was 10.1 cm (SD: 1.9 cm), and with the 0.7 cm straw the average was 8.39 cm (SD: 2.7 cm). The separated position ranged from 8.2 to 12 cm for the 1.3 cm straw and from 5.73 to 11.05 cm for the 0.7 cm straw.

3.3. Soap Bubble Diameter

To measure the soap bubble diameter, we conducted an experiment using two cases: strong and fast blown bubbles, and weak and slow blown bubbles. First, it was observed that several small soap bubbles appeared in the case of strong and rapid blowing (Figure 4a). In the case of weak and slow blowing, one large soap bubble was observed (Figure 4b). The diameter was calculated over time using a machine learning algorithm [6]. The soap bubble diameter gradually increased over time. The soap bubble diameter using a 1.3 cm straw ranged from 1.92 to 3.37 cm, while for the 0.7 cm straw the values ranged from 1.32 to 2.21 cm. The error range in the value corresponding to each second shows a 0.5 cm deviation.

3.4. Soap Bubble Parameters and Tool Model

The soap bubble data measured through Section 3.2 are used to create it in initial 3D MAX in Figure 5a and then apply it in Unity. As for the procedure order, the 3D model was first created from the directly measured photos, videos, and data, and the starting shape and shape of the soap bubble were created using the 3D MAX tool, and the morphing was computed through the final animation. After that, the created FBX (Filmbox) file is loaded in Unity by coding, created to be called out at the desired size and speed, and the soap bubbles are separated and moved according to the laws of physics. Figure 5b is a schematic diagram showing how to design a soap bubble before making it. The soap bubble model of the straw was designed to be made by applying the point that the soap bubble pops out faster than when using other tools, and is divided into a cylindrical part that is blown out and a soap bubble part that becomes a circular model. The 0.7 cm straw and the 1.3 cm straws differ in size but used the same model. Since the soap bubble model of the tube comes out slowly, unlike the straw model, the distinction between the blown part and the soap bubble part is not necessarily distinctive. Therefore, the tube model was designed to produce one model in which the two were combined. The hoop soap bubble model was not tubular, but rather a thin circular type, so it was constructed as a model that occurs when the stick is swung. In reality, the hoop is swung in various directions, but in this study, the case where the hoop is swung in a straight line was specified and produced. Figure 6 shows the model that produced soap bubbles using the measured or predicted values. It can be seen that it comes out similar to a real soap bubble. It was filmed over time as soap bubbles were blown out from top to bottom.

3.5. Movement Path of Soap Bubbles

Soap bubbles that are blown out move under the influence of physical laws such as wind. However, in this study, the movement of soap bubbles was expressed based on the data measured during the experiment. In the experiment, the coordinates of each movement route were extracted by photographing the bubble blowing from the side. Since it was inefficient to extract all coordinates, only a fixed number of coordinates per path were extracted, and the path between each set of coordinates was determined using the Bezier spline equation so that the movement of the soap bubble was not linear but moved in a curved line. The speed of a soap bubble moving along its path was determined by the strength of the wind when it was blown out and the volume in its separated state. The first soap bubble that came out was fast because of the power of wind. However, because the air resistance acceleration due to the light mass is large, the speed decreases rapidly [18]. The formula for acceleration representing the velocity of a bubble is as follows:
  a   =   γ / m   F b  
where   γ is the external force acting on the soap bubble, which includes gravity, m is the mass, and F b is the air resistance acceleration. As the air resistance acceleration increases, the speed of the soap bubble decreases. The formula for the air resistance acceleration is as follows:
F b = C ρ A v 2 2 m  
where   C is the air resistance coefficient, ρ is the density of the bubble, A is the cross-sectional area of the bubble, m is the mass, and v is the velocity. The air resistance coefficient and density depend on the shape of the soap bubble or the concentration of surfactant, but in this study, the air resistance coefficient was assumed to be 0.47 and the density to be 0.00125 g/cm2.

3.6. Force Acting on the Surface of the Soap Bubble

When a soap film is stretched, the surface tension of the stretched portion increases. However, applying a change to the surface tension along the surface of the soap bubble is inefficient because the increased computational demand is disproportionately high relative to the improvement in the experience of the user. Therefore, in this study, the surface tension was calculated assuming a constant, and the motion of the surface was expressed by using the pressure difference between the inside and outside of the bubble, which changes according to the diameter of the bubble. The pressure difference between the inside and outside determines the speed at which the soap bubble moves to have the minimum area, and the formula is as follows:
Δ p =   4 σ d  
where   σ is the assumed surface tension of the bubble and d is the diameter of the bubble produced. The internal and external pressure difference decreases as the diameter of the soap bubble increases. Due to this, as the size of the soap bubble increases, the surface of the soap bubble changes in various ways. When a force acts on the soap bubble, a change occurs on the surface, and the force gradually decreases based on the point of action and is transmitted to the surroundings. As a result, when force is applied to the soap bubble, not only does a part of the surface change, but the entire soap bubble dynamically changes, as does its shape. The surface movement begins, which affects the entire bubble. The damping force according to the distance from the force application point can be calculated as follows:
u ( x ) =   r 2 π ( x x )  
where   r is the external force acting on the bubble, excluding gravity, and xx′ is the distance from the point of application of the force. The damping force decreases further from the point of action, and when a force is applied to the surface of the soap bubble, the surrounding surface also changes, and the stronger the force applied, the greater the change.

4. Soap Bubble Rendering

4.1. Flow Speed of Soap Film Surface

In a previous study, the authors reported measuring the flow speed of a physics-based soap film [19,20]. Based on this, we introduce an improved rendering method that reflects the speed of each section. Figure 7a shows the ‘UV Coordinate’ function of UV Mapping [21] that makes 2D textures into 3D models in a shaded graph, which is a node-based shading editor of Unity. UVW is the same coordinate concept as XYZ, and W is not used because it uses a 2D texture. Therefore, U is the X-axis and V is the Y-axis. As a result of separating each channel of UV, it can be seen in Figure 7b,c that each channel has a directional value of each axis by pixels from 0 to 255. Using this, the direction of motion can be determined by adjusting the color value of each pixel. In this study, a height map was used to determine the direction of motion. A height map is a 2D texture composed of grayscale and functions as displacement mapping with displacement information. The larger the displacement, the closer it is to white, and the smaller the displacement, the closer it is to black. In this study, Figure 7e was produced by dividing the soap bubble into five sections (Figure 7d) and optimizing the height map. Finally, a motion vector texture (Figure 7f), which can control the direction and speed through an overlay on the UV coordinate with the direction value and the height map with the displacement value, was produced through motion vector texture production.
Table 1 is a graph comparing motion vector texture and measured data by dividing them into five sections as shown in Figure 7d. Each graph shows the rate of change of a pixel as a trend line of the polynomial. The average error accuracy and the root mean square error accuracy were used to evaluate the analysis model of the graph [22]. The average error is the value obtained by calculating the error of the speed in the section where the measured data and the pixel index of the motion vector texture correspond. It is the square root of the arithmetic mean of the error and means the mutual deviation. Each graph has a similar shape with a speed value error (relative speed) of around 3 for each section, and the accuracy according to this is shown in Table 2. The mean root-square error accuracy was about 97.6%, and the mean error accuracy was about 88.6%, confirming the reliability of the motion vector texture.

4.2. Soap Bubble Rendering Parameters

Soap bubbles are very light because they are formed of a very thin layer of soap that envelopes the air, and a small force produces a large change in a bubble. When this film receives light, the waves are reflected from the surface and inside. As shown in Figure 8, the color looks different depending on the viewing distance and angle of the viewpoint reflected by interference known as iridescence [23]. In this study, as a result of measuring the change in the flow shape and thickness of the fluid by observing the movement of the soap film, a soap bubble texture that can sample the flow shape, thickness and color values of the fluid was produced [24]. The formula in Equations (5) and (6) for this are as follows [25]:
σ a =   η f i l m d f i l m c o s   θ   λ ( 2 m + 1 )   ( m = 0 ,   1 ,   2 )
σ b =   η f i l m d f i l m c o s   θ   λ ( 2 m )   ( m = 0 ,   1 ,   2 )
where d f i l m is the thickness and η f i l m is the refractive index. A ray of light with wavelength λ enters this thin film. If half the wavelength is an odd multiplication, there will be a bright constructive interference using (5). On the other hand, if half the wavelength is an even multiplication, there will be a dark destructive interference using (6). We used this principle to implement thin film interventions and iridescence.
According to basic theory of physically based rendering [26], the physically based rendering pipeline can be classified into basic color, metallicity, roughness, Fresnel reflectance, refractive index, and reflection of materials. In addition, the movement change, distortion, opacity, and surrounding occlusion can be considered. We implemented the soap bubble to which physically based rendering technology was applied by applying the following procedures. The thin film interference, which is essential for soap bubble rendering, was implemented as a Shader graph using a physically based principles, rather than using Unity’s default shader. The physical parameters used at this time are d f i l m , thickness and η f i l m , refractive. The thickness of thin film was then used as the actual measured parameter value using the author’s previous study, [19]. Additionally, iridescence layer thickness is also defined. Along with the motion vector texture, iridescence changes shape and thickness with wavelengths of color. The default iridescence is visible only at the border, but the shape and thickness of the iridescence layer vary depending on the flow shape of texture.
First, we used a Shader graph, a node-based Shader editor of Unity, to implement the soap bubbles as physically based rendering, and we applied each vertex node and parameter to the master node.

4.3. Comparison of Motion Change of Height Map and Motion Vector Texture

The change in motion of the fluid was compared with the case of using the height map and the case of using the motion vector texture for the UV coordinate of the texture of the soap bubble, which enabled the sampling of the flow shape, thickness, and color value. As shown in Figure 9, there was a clear difference in the light source. When using the height map, only the light source was observed on the surface. The motion vector texture shows the color response from the light source, and the flow shape and irregular velocity of the fluid can be observed. It can be seen that the height map of the grayscale is not suitable for UV Coordinate and is controlled by the red and green values of the motion vector texture. In addition, the color response observed from the light source can be variously changed by adjusting the smoothness intensity parameter. In this way, when using a motion vector texture than when using only the height map, the color response is displayed on the surface, as well as the direction and velocity values in each pixel, providing more realistic changes in the motion of the fluid.

5. Experimental Results

The computer specifications used in this research were CPU (AMD Ryzen5 3600), GPU (NVIDA GeForce RTX 2070 SUPER), RAM (16 GB), but the minimum specifications for computers for actual simulation operation can be CPU (Intel Core i5-4590/AMD FX 8350 or higher), and GPU (NVIDIA GeForce GTX 1060RMD) In addition, HTC VIVE Pro (HMD) for virtual reality and Leap motion controller for interactive hand motion tool were used.

5.1. Soap Bubble Comparison

Bubble shows take place in various environments and with different light conditions. For comparative analysis, we compared and analyzed soap bubbles in three settings. Figure 10a shows the results created by the proposed study, and soap bubbles in Figure 10b,c have been simulated according to methods [27,28] in Unity. Soap bubbles are basically fluids, so they reflect, refract and allow passage of light. However, the examples in Figure 10b,c are not suitable for reflection or refraction of light, as observed from the surface. In addition, soap bubbles are fluid, and at the same time, the soap foil has an interference pattern due to thin film interference. Figure 10b shows some interference patterns in the border, but it is not realistically expressed.
In addition, interference fringes cannot be found in (c). On the other hand, in the cases of soap bubbles (a) to which the physically based rendering technology of this study is applied, it can be confirmed that the interference pattern and the reflected color appear different according to the viewing distance and angle in real time (b) and (c). It is possible to know the change in motion according to the flow of fluid that cannot be observed in (b) and (c), since the existing soap bubbles focus on the shape, generation and bursting for simulation, adapting to the surrounding environment, changing the motion according to the flow of fluid, and changing the color according to the viewing angle, etc. However, (a) could be able to provide acceptable quality soap bubbles by solving these problems and will contribute to the reproduction of bubble show.

5.2. Implementation through the Soap Bubble Tool

There are various tools for handling soap bubbles to reproduce a bubble show. In this study, tools were largely classified into “straw1”, “straw2”, “tube”, and “hoop”. Straws were subdivided into a large straw (1.3 cm) and a small straw (0.7 cm). For this, Unity version 2019.3.5f1 was used, and the selection and use of tools was performed with Leap Motion. The menu was composed of an upper menu and a lower menu, and was implemented in a HUD format on the left hand. Figure 11a shows a user playing in a virtual reality environment wearing a VR HMD, and Figure 11b shows the upper menu, which appears when you open the thumb of your left hand, and there are “Select Tool” and “Quit” options, the latter performing the HUD shutdown function. The Select Tool allows the user to move to the lower menu as shown in Figure 11c. In the lower menu, the user can select tools such as hoop, straw1, straw2, and tube from the right, and through this, you can experience the soap bubble show. It also has an initialization function that allows you to select other tools.

5.3. Soap Bubbles with Optimized Modeling

Figure 12 shows soap bubbles blowing out of a straw by applying physically based rendering technology. Figure 12 gathers the appearance of soap bubbles created using small straws. Figure 12a is the first soap bubble in the process of blowing out. During the blowing, you can see that only the cylindrical object is created and that no soap bubbles are created. After the cylindrical object with a separation point is created, bubbles are created at that location. Figure 12b shows a side view of the handling tools. You can see the soap bubbles spread out in several branches along the moving path defined above. Figure 12c shows the tools being handled from the user’s point of view and soap bubbles being blown out.
Figure 13a shows the appearance of soap bubbles beginning to come out of a large tube, which have a greater diameter than straws. It can be seen that the soap bubbles blowing out from the ends of the straw are larger than the straw, and that they sag downwards under the influence of gravity. Figure 13b shows the bubble’s appearance immediately after the soap bubble separates from the tube and Figure 13c shows soap bubbles coming out of the tube continuously.
Figure 14 shows the appearance of soap bubbles being blown out of the hoop by applying physically based rendering technology. The hoop recognizes the hand through lip motion, and when the user holds the hoop in the desired direction and moves, it recognizes the direction and bubbles come out. The initial soap bubble model of using hoop is made of 3D MAX and then load it into a program to reproduce the process of deformation. It is simulated through three stages of deformation. The first is the moment soap bubbles are produced, the same as the round size of the hoop. At this time, soap bubbles are generated in a natural direction by calculating the absolute values that the user moves on the X, Y, and Z axes. Second, the maximum length step is the moment when soap bubbles have the longest form. It is long horizontally and is influenced by gravity, so the middle part is relatively downward. In the circular phase, it means that the horizontally stretched bubbles gradually return to the circular model. The movement of soap bubbles used air resistance acceleration and falling acceleration to reflect reality, and the movement of soap bubbles increased and decreased by using morphing.
Figure 14a shows the first recognition of the direction of the hoop and soap bubbles are blowing out. Due to the nature of the hoop, it can be seen that it comes out longer in the horizontal plane rather than circular. Figure 14b shows the appearance immediately after the soap bubbles come out and separate from the hoop. The soap bubble is in its longest state, and the middle part is being acted on by gravity—you can see that it is relatively drooping down. Figure 14c shows that the soap bubbles are separated and gradually morph into a spherical shape over time.
Using Leap Motion, a controller that recognizes hand gestures, it supports interactions to reproduce a soap bubble show in a VR environment. The hand motion was performed through hand motion recognized through Leap Motion. The hand movement for this was performed through the gesture grammar of both hands as follows. Figure 15a is a clap, performed through the gesture of clapping with both hands, and bubbles are created as the left and right hands collide. Figure 15b shows a grab, performed through the gesture of picking up an object with the left hand and catching the soap bubble while colliding with the bottom of the left hand and the soap bubble. Figure 15c shows a fanning motion, performed through a gesture of shaking the left hand from side to side, and bubbles within a certain distance that collide with the left hand will then fly. Figure 15d is bouncing, which is performed through a gesture of shaking the right palm up and down, and when the soap bubbles collide with the right palm, it bounces by receiving force from the physical characteristics. Figure 15e is piercing, performed through a pricking gesture with the index finger of the right hand, and when the index finger and soap bubbles collide, the bubbles burst and disappear. In this way, it is possible to interact in a VR environment through hand motions.

6. Conclusions

For various VR content, including bubble shows, the realistic expression of bubbles is very important. In this study, a realistic soap bubble reproduction method was proposed by applying a physically based rendering technology for bubble art that can produce an immersive feeling. First, the characteristics of the soap bubble fluid were analyzed by considering the physically based rendering pipeline. Second, we applied the algorithm available in Shader Graph, a node-based shader editor of Unity. Through this, various expressions were possible through the adjustment of parameters. By extracting the coordinates of the measured path, the path through which the soap bubble moved was created, and the surface of the bubble was implemented by using the difference between the internal and external pressure, assuming the surface tension as a constant. In addition, the produced soap bubble was integrated with the model in which the soap bubble came out by applying the diameter and number measured through the experiment, and a shader where the soap film surface flowed over time was applied. The integrated soap bubble was called with a predetermined size according to the model and moved along the stored path. When it was called out, the various shapes of soap bubbles could be observed moving toward a sphere. In addition, the soap film flowed and its surface gradually became transparent, resulting in a more realistic soap bubble simulation being produced.
To provide better quality soap bubbles in the future, we intend to develop more advanced physically based rendering pipeline and its parameters. First, it needs to convey physically measured parameters of soap bubbles according to the degree of surface activity. Bubble art is a necessary element because it mixes various materials to express artistic and unusual soap bubbles. Second, it is necessary to optimize the fluid motion change according to the tool or environment. Most of the fluids, including soap bubbles, were either ignored or expressed uniformly. In this study, a motion vector texture was used to solve this problem, but the change in motion varies greatly depending on the tool or environment. However, there are still limitations to controlling tools and environments. Nevertheless, as optimized modeling becomes possible, this study contributes to soap bubbles being applied with physically based rendering technology to various VR content.

Author Contributions

Conceptualization, S.Y. and S.C.; methodology, S.Y., C.L. and S.C.; software, S.Y. and C.L.; validation, S.Y. and S.C.; formal analysis, C.L.; investigation, S.Y. and C.L.; resources, S.Y.; data curation, C.L.; writing—original draft preparation, S.Y., C.L. and S.C.; writing—review and editing, S.Y. and S.C.; visualization, S.Y.; supervision, S.C.; project administration, S.C.; funding acquisition, S.C. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (No. 2018R1D1A1B0704256613).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Eom, I. A Study on Content Classification for Developing Virtual Reality-based Attraction Contents. J. Korea Contents Assoc. 2019, 19, 499–506. [Google Scholar]
  2. Salkin, L.; Schmit, A.; Panizza, P.; Courbin, L. Generating soap bubbles by blowing on soap films. Phys. Rev. Lett. 2016, 116, 077801. [Google Scholar] [CrossRef] [PubMed]
  3. Prosperetti, A. Bubbles. Phys. Fluids 2004, 16, 1852–1865. [Google Scholar] [CrossRef]
  4. Da, F.; Batty, C.; Wojtan, C.; Grinspun, E. Double bubbles sans toil and trouble: Discrete circulation-preserving vortex sheets for soap films and foams. ACM Trans. Graph. 2015, 34, 1–9. [Google Scholar] [CrossRef]
  5. Kim, N.; Oh, S.; Park, K. Giant soap bubble creation model. Comput. Animat. Virtual Worlds 2015, 26, 445–455. [Google Scholar] [CrossRef]
  6. Morris, N. Capturing the Reflectance Model of Soap Bubbles. Univ. Tor. 2003. [Google Scholar] [CrossRef]
  7. Afanasyev, Y.D.; Andrews, G.T.; Deacon, C.G. Measuring soap bubble thickness with color matching. Am. J. Phys. 2011, 79, 1079–1082. [Google Scholar] [CrossRef]
  8. Sane, A.; Mandre, S.; Kim, I. Surface tension of flowing soap films. J. Fluid Mech. 2018, 841. [Google Scholar] [CrossRef] [Green Version]
  9. Iwasaki, K.; Matsuzawa, K.; Nishita, T. Real-time rendering of soap bubbles taking into account light interference. Proc. Comput. Graph. Int. IEEE 2004, 2004, 344–348. [Google Scholar]
  10. Botta, O.D.; Magos, I.; Balan, C. Experimental study on the formation and break-up of fluid bubbles. Incas Bull. 2020, 12, 27–34. [Google Scholar] [CrossRef]
  11. Davidson, J.; Ryu, S. High-speed visualization of soap bubble blowing and image-processing-based analysis of pinch-off dynamics. J. Vis. 2017, 20, 53–61. [Google Scholar] [CrossRef]
  12. Biria, A.; Fried, E. Theoretical and experimental study of the stability of a soap film spanning a flexible loop. Int. J. Eng. Sci. 2015, 94, 86–102. [Google Scholar] [CrossRef] [Green Version]
  13. Pfeiffer, P.; Ohl, C.D. Spreading of soap bubbles on dry and wet surfaces. Sci. Rep. 2020, 10, 1–9. [Google Scholar] [CrossRef] [PubMed]
  14. Glassner, A. Soap bubbles: Part 2. IEEE Ann. Hist. Comput. 2020, 20, 99–109. [Google Scholar]
  15. Ishida, S.; Synak, P.; Narita, F.; Hachisuka, T.; Wojtan, C. A model for soap film dynamics with evolving thickness. ACM Trans. Graph. 2020, 39, 31-1. [Google Scholar] [CrossRef]
  16. Vorobieff, P.; Rivera, M.; Ecke, R.E. Soap film flows: Statistics of two-dimensional turbulence. Phys. Fluids 1999, 11, 2167–2177. [Google Scholar] [CrossRef]
  17. Huang, W.; Iseringhausen, J.; Kneiphof, T.; Qu, Z.; Jiang, C.; Hullin, M.B. Chemomechanical simulation of soap film flow on spherical bubbles. Acm Trans. Graph. 2020, 39, 41-1. [Google Scholar] [CrossRef]
  18. Halliday, D.; Resnick, R. Fundamentals of Physics; John Wiley Sons: Hoboken, NJ, USA, 1981. [Google Scholar]
  19. Gil, S.; Seok, Y.; Park, K.; Yoo, J.; Chin, S. Soap film flow and thickness for soap bubble rendering. In Proceedings of the 25th ACM Symposium on Virtual Reality Software and Technology, Parramatta, NSW, Australia, 12–15 November 2019; pp. 1–2. [Google Scholar]
  20. Han, S.; Yoo, S.; Chin, S. Physics-based height map optimization conveying real-measured flow speed for virtual soap bubble rendering. Int. J. Adv. Cult. Technol. 2020, 8, 284–290. [Google Scholar]
  21. Hassan, M. Proposed Workflow for UV Mapping and Texture Painting. 2016. Available online: https://www.diva-portal.org/smash/record.jsf?pid=diva2%3A945618&dswid=-7551 (accessed on 25 April 2020).
  22. Chai, T.; Draxler, R.R. Root mean square error (RMSE) or mean absolute error (MAE)?–Arguments against avoiding RMSE in the literature. Geosci. Model Dev. 2014, 7, 1247–1250. [Google Scholar] [CrossRef] [Green Version]
  23. Hirayama, H.; Yamaji, Y.; Kaneda, K.; Yamashita, H.; Monden, Y. Rendering iridescent colors appearing on natural objects. In Proceedings of the Eighth Pacific Conference on Computer Graphics and Applications IEEE, Hong Kong, China, 5 October 2000; pp. 15–433. [Google Scholar]
  24. Smith, M. Unity 2018 Cookbook: Over 160 Recipes to Take Your 2D and 3D Game Development to the Next Level; Packt Publishing Ltd.: Birmingham, UK, 2018. [Google Scholar]
  25. Sadeghi, I.; Jensen, H.W. A physically based anisotropic iridescence model for rendering morpho butterflies photo-realistically. In Project Report for Advanced Appearance Modeling Course CSE272 Fall; University of California San Diego: San Diego, CA, USA, 2007. [Google Scholar]
  26. Russell, J. Basic Theory of Physically-Based Rendering. 2017. Available online: https://marmoset.co/posts/basic-theory-of-physically-based-rendering/ (accessed on 12 March 2020).
  27. Smkplus. Available online: https://github.com/smkplus/Iridescence.git (accessed on 10 September 2020).
  28. Moonflower. Available online: https://assetstore.unity.com/packages/vfx/particles/environment/jiggly-bubble-free-61236 (accessed on 20 September 2020).
Figure 1. Soap bubble photos taken: (a) A small straw with a diameter of 0.7 cm, and (b) A large straw with a diameter of 1.3 cm.
Figure 1. Soap bubble photos taken: (a) A small straw with a diameter of 0.7 cm, and (b) A large straw with a diameter of 1.3 cm.
Applsci 11 03090 g001
Figure 2. Pre-stage parameters.
Figure 2. Pre-stage parameters.
Applsci 11 03090 g002
Figure 3. (a) Vertical diameter of bubbles blown using a 1.3 and 0.7 cm straw and (b) Separated position of bubbles using a 1.3 and 0.7 cm straw.
Figure 3. (a) Vertical diameter of bubbles blown using a 1.3 and 0.7 cm straw and (b) Separated position of bubbles using a 1.3 and 0.7 cm straw.
Applsci 11 03090 g003
Figure 4. (a) Soap bubble diameter measured for strong and fast blown bubbles using 1.3 and 0.7 cm straws. (b) Soap bubble diameter measured for weak and slow blown bubbles using 1.3 and 0.7 cm straws.
Figure 4. (a) Soap bubble diameter measured for strong and fast blown bubbles using 1.3 and 0.7 cm straws. (b) Soap bubble diameter measured for weak and slow blown bubbles using 1.3 and 0.7 cm straws.
Applsci 11 03090 g004
Figure 5. Initial 3D MAX models (a), and parameter design for each soap bubble tool (b).
Figure 5. Initial 3D MAX models (a), and parameter design for each soap bubble tool (b).
Applsci 11 03090 g005
Figure 6. Pre-stage simulation results for Straw 2 from Figure 5.
Figure 6. Pre-stage simulation results for Straw 2 from Figure 5.
Applsci 11 03090 g006
Figure 7. Principle of motion vector texture.
Figure 7. Principle of motion vector texture.
Applsci 11 03090 g007
Figure 8. Principle of thin-film interference.
Figure 8. Principle of thin-film interference.
Applsci 11 03090 g008
Figure 9. Comparison of motion change of height map on the top row and motion vector texture on the bottom row.
Figure 9. Comparison of motion change of height map on the top row and motion vector texture on the bottom row.
Applsci 11 03090 g009
Figure 10. (a) Ours. (b) Iridescence Soap Bubble [27], and (c) Jiggly Bubble [28].
Figure 10. (a) Ours. (b) Iridescence Soap Bubble [27], and (c) Jiggly Bubble [28].
Applsci 11 03090 g010
Figure 11. VR HMD (a) upper menu (b) and tools menu (c) for creating soap bubbles in virtual reality.
Figure 11. VR HMD (a) upper menu (b) and tools menu (c) for creating soap bubbles in virtual reality.
Applsci 11 03090 g011
Figure 12. Soap bubbles created through a straw: The first bubble in the process of being blown out (a), a side view of the handling tools (b), and the user’s point of view as bubbles are blown out of the straw (c).
Figure 12. Soap bubbles created through a straw: The first bubble in the process of being blown out (a), a side view of the handling tools (b), and the user’s point of view as bubbles are blown out of the straw (c).
Applsci 11 03090 g012
Figure 13. Soap bubbles generated through the tube: A bubble beginning to leave the tube (a), a bubble after it has left the tube (b), and bubbles being continuously blown out of the tube (c).
Figure 13. Soap bubbles generated through the tube: A bubble beginning to leave the tube (a), a bubble after it has left the tube (b), and bubbles being continuously blown out of the tube (c).
Applsci 11 03090 g013
Figure 14. Soap bubbles generated through the hoop: A bubble is being blown out of the hoop (a), the bubble is then at its longest just after separation due to the action of gravity (b), and the bubble then becomes more circular over time (c).
Figure 14. Soap bubbles generated through the hoop: A bubble is being blown out of the hoop (a), the bubble is then at its longest just after separation due to the action of gravity (b), and the bubble then becomes more circular over time (c).
Applsci 11 03090 g014
Figure 15. Soap bubbles generated through hand motions. (a) Clap (Both hands gesture) (b) Grab (left hand gesture) (c) Fanning (left hand gesture) (d) Bouncing (right hand gesture) (e) Piercing (right hand gesture).
Figure 15. Soap bubbles generated through hand motions. (a) Clap (Both hands gesture) (b) Grab (left hand gesture) (c) Fanning (left hand gesture) (d) Bouncing (right hand gesture) (e) Piercing (right hand gesture).
Applsci 11 03090 g015
Table 1. Comparison between experimental speed and motion vector texture graph for each section of the soap bubble.
Table 1. Comparison between experimental speed and motion vector texture graph for each section of the soap bubble.
SectionGraph
1/5 Applsci 11 03090 i001
2/5 Applsci 11 03090 i002
3/5 Applsci 11 03090 i003
4/5 Applsci 11 03090 i004
5/5 Applsci 11 03090 i005
Accuracy Applsci 11 03090 i006
Table 2. Mean average error accuracy and root mean square error accuracy for each section of the soap bubble. RMSE: Root mean square error; MAE: Mean error accuracy.
Table 2. Mean average error accuracy and root mean square error accuracy for each section of the soap bubble. RMSE: Root mean square error; MAE: Mean error accuracy.
Accuracy
Section1/52/53/54/55/5Average
RMSE97.9529%98.2817%97.1969%98.4569%96.2519%97.6281%
MAE90.5685%90.7778%87.9233%90.9751%82.8941%88.6278%
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Yoo, S.; Lee, C.; Chin, S. Physically Based Soap Bubble Synthesis for VR. Appl. Sci. 2021, 11, 3090. https://doi.org/10.3390/app11073090

AMA Style

Yoo S, Lee C, Chin S. Physically Based Soap Bubble Synthesis for VR. Applied Sciences. 2021; 11(7):3090. https://doi.org/10.3390/app11073090

Chicago/Turabian Style

Yoo, Sangwook, Cheongho Lee, and Seongah Chin. 2021. "Physically Based Soap Bubble Synthesis for VR" Applied Sciences 11, no. 7: 3090. https://doi.org/10.3390/app11073090

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop