Simulating the shadowing of objects from a light source in virtual reality - 9


Figure 3.5 Inspector window.

In the image above, we see the Inspector window displaying some properties, Components of a selected object. In which, there are 2 Components: Transform and Animation. The Inspector window will allow us to change the above settings. These Components can also be temporarily disabled at any time we want by unchecking the Checkbox in the upper left corner of each Component, this will be very useful for us when we want to check or test these Components. In addition, the Inspector window also allows us to disable an entire selected object by unchecking the Checkbox in the upper left corner of the Inspector window.


Maybe you are interested!

Figure 3.6 Project window.

Project window: is the window that allows us to directly see the contents of the project's Assets folder. Each Unity project is contained in a parent folder. There are 3 subfolders: Assets, Library and Temp (only when Unity is running). Putting all Assets in the Assets folder means that we will immediately see them appear in the Project window. In addition, when changing the location of Assets in the Assets folder or saving files from another 3rd party application (such as Photoshop), Unity will re-import the Assets, reflecting this change immediately in the Project window and Scene that uses the newly changed Assets. The Project window has an integrated Create button, which allows us to create any new Assets, such as Scripts, Prefabs, Materials, ...


Game Window: The Game Window will be called when we click the Play button (an action to test the game). This window allows us to choose the screen ratio settings, it reflects the range in the Scene that the player can see with each corresponding screen ratio, for example, with each screen ratio of 4:3, 16:9, the player will have a different visible range. After clicking the Play button, we will be in Testing mode, at this time any changes to the properties, Components, ... of the object will only be temporary. That is, they will return to the original (before pressing the Play button) after finishing Testing mode.

3.2. Experimental and application requirements

Virtual reality applications are increasingly developed and applied in many different fields, bringing great benefits to the whole society. The more technology develops, the higher the requirements for the practicality of virtual application products.

The application of simulating the shadow creation of graphic objects under the influence of a light source contributes a significant part in expressing the properties of the object's surface. Based on the light, it is possible to clearly distinguish the objects made of: wood, iron, stainless steel, glass... From the shadow, it is possible to detect distance, size, shape, calculate height and other practical applications.

Chapter 3 of the thesis applies the research results in chapter 2 to build a test program for the algorithm. Thereby, evaluating the accuracy of the theoretical content presented in chapter 2 and demonstrating the applicability of the research findings reported in the thesis.


3.2.1. Requirements for experiments

With the goal of illuminating 3D models and shadows of objects in the scene, the experimental program must ensure the main feature is the light source with different intensities, light source types, and light source colors. To illuminate the models, the first task is to read and display the model. The reading and displaying process helps the software operator to manipulate and see the results on the application software.

Next, the experimental program needs to build components that help display and interact with the 3D model, features such as: model rotation, light rotation, light color, model size change, color change, light speed change.

To ensure objectivity, the experimental program needs to allow the operator to choose many different models during the experiment, selecting each model individually to operate. In particular, an indispensable part when building the program is the display of shadows and gloss of the models, where with each setup, the operator can choose parameters from which different results are generated regarding light color, lighting direction as well as shadow of the model.

The indispensable components of software are the interface system and other accompanying features such as compiled programs, options to run on the operating system, etc.

3.2.2. Check input models

The models for testing are 3D models, which are artifacts in the Vietnam Museum of Ethnology, reconstructed using 3Ds Max software. After completing the 3D construction, we export the model to .Fbx to proceed with interactive programming.


The research objects of the topic are traditional musical instruments such as: Drums, gongs, boat instruments, images of 3D models built in the program are as follows:


Figure 3.7 Horizontal “Sco sampho” drum


Figure 3.8 Vertical “Sco sampho” drum

The “Sco sampho” drum has one large head and one small head covered with cowhide. Although the drum is small, when played it makes a very loud echo. Picture H 3.1 is the drum of Mr. Thach Karirô, 51 years old, Tra Lu hamlet, Luong Hoa commune, Chau Thanh district, Tra Vinh province. Made at the request of the museum since 1995.



Figure 3.9 Gong

Gongs are made of bronze, each consisting of 16 small gongs with knobs, connected together to form a semicircle. When performing, the musician will sit inside the curved circle, using 2 mallets to strike. Depending on the size, thickness, thinness of each gong, different sounds will be produced.

Figure 3.10 Boats – “IK and Thung”

The Boat Instrument – ​​“Ro niec IK and Ro niec Thung” is a typical musical instrument in the Pin Pek classical orchestra of the Khmer people. The boat instrument is a type of percussion instrument, consisting of 20 sound bars made of rosewood, of different sizes, the longest bar is 38 cm, the shortest is 28 cm, evenly arranged on a wooden frame shaped like a boat. Because the structure of the instrument is shaped like a boat, it is called a boat instrument.


Figure 3.3: The boat instrument was collected at the family of Mr. Thach Ka Ri No, 51 years old, Tra Lu hamlet, Luong Hoa commune, Chau Thanh district, Tra Vinh province. He made it in early 1995 and gave it to the museum in June 1995.

3.3. Functions of the experimental program

As presented, this program is installed with Visual C# programming language and supporting tool is Unity 3D enginer, input models are formatted with extension *.fbx.


Figure 3.11: Panorama of the exhibition space

Light source change function

Light shines on moving objects, the simulation program changes the shadow of the object when the light source changes.

Original light source Changed light source


Natural light is very diverse, with large differences between the factors that affect it. Natural light is generally provided by the sun, but it also has differences, depending on the time of day as well as changes in the weather. Influencing factors can change the light source in many ways: from sharp and warm to soft and cool.

Artifact rotation function

The object is more realistically depicted with shadows, the simulation program has created the object, calculated and represented the detailed shadows.

Shadows and objects when stationary Shadows and objects when rotating

Artifact rotation function


Shadows do not show in low light

Comment


Agree Privacy Policy *