**5.2 Textures**

Wheelchair simulator does not use special texturing features, such as normal mapping or Dot 3 bump mapping. It uses only simple base color textures and image textures. If the quality of the image texture is restricted to smaller size and resolution, rendering will be optimalized to desired preferences. Wheelchair simulator is using

#### *Computer Game Development*

#### **Figure 11.**

*Texture representation on taxi car and VR headset models.*

resolution and size up to 5 megabytes. But the average sizes of image textures are 300–500 kb. Following **Figure 11** represents an example of image texture of car with a size of 387 kb and virtual headset object with assigned based colors. Image texture of a car also shows the mapping of the taxi car object. Mapping is represented with points primitives of an object. Their position defines the position of the texture on the object.

Resolution of a texture is important to be optimalized. If the texture has for example resolution of 4000 × 4000 pixels, but texture coloring and details can fit into resolution 500 × 500 pixels without any pixel compressing, it is highly recommended to change the resolution of the texture. Every time, when an object is in a field of view, piece of texture is rendered in dependence on the face shape and size of an object. Therefore, if the simple cube with 6 walls-6 faces have assigned full-size texture with resolution 4000 × 4000 pixels on each face, and top side, right side, and left side of a cube are in a field of view, the texture will be rendered 3 times with defined resolution.

### **6. Screen-camera**

Camera and screen settings can facilitate render calculation as well. To do so, it is needed to reconsider, for example, if it is more effective to use *single pass* or *multipass* 

**Figure 12.** *Night implementation in wheelchair simulator.*

*rendering*. *Object visibility* based on camera distance is one of the features to consider as well. For example, occlusion *culling* is a camera feature that defines if objects should be rendered when they are behind another object. There are many effective rendering techniques that help lower the run time cost.

Besides saving computational cost, camera has some features to manipulate the graphics and visualization in scenes as well. One of the features was presented in Section 3. And in **Figure 3**. As it was mentioned before, scene called crosswalk-night is situated at night. In real world, when a person is not in a completely dark environment, he/she can see objects within few meters radius. Visibility, colors, and sharpness of the objects depend on the intensity of light. To simulate such environment, scene contains ambient light of certain intensity—but lower than the ambient light in other scenes. This will secure objects to be visible. To implement logic of seeing things in some radius around a user, a feature called fog need to be applied. Fog has a parameter, which defines what color fog will be. To simulate the night, color needs to be black. Other colors, such as red for example, will be seen in a distance as ambient light is applied all around the scene. Result is shown in **Figure 12**.

**Figure 12** shows, as user goes further from the crosswalk, other objects will gradually shade as they are not in a radius of fog-free area. It can be observed, that taxi car on an upper part of the figure is visible, but as user went further back, taxi car is not visible anymore.

Others performance improvement techniques such as single pass, multi-pass, occlusion culling are predefined in used framework—A-frame.

### **7. Scenes-spaces**

When creating a 3D application, it is good to know whether the size of the scene will be wide or small in advance. Wider scenes are used mostly when creating an

outdoor environment. In this case, wheelchair simulator is using small scenes. Simulator has a scene where a disabled person needs to go around cones or cross the crosswalk. This activity is placed outside, but scenes were designed with a wall limitation on terrain edges. It is easier to solve graphic limitations with a smaller scene as it does not contain many objects. Polygons' number is lower which result in faster rendering. Following **Figure 13** presents the scenes from the distance together with the top view.
