| Support Topics |
|
|
Support Topics / UC-win/Road |
 |
| City Design Tools Vol.6 (Total of 7 installments) BakedTexture |
|
|
I am Kobayashi from Arizona State University. I would like to introduce a tool called CityDesign, which is released by Forum8. We aim to develop a set of tools that seamlessly generate and convert urban data between the UC-win/Road VR package from Forum8 and other 3D CG packages.
The tools introduced here have their source code publicly available. Currently, we are not providing specific support for these tools, and therefore cannot be held responsible for any issues that may arise. If you would like a simple tool suitable for your company's systems, please let us know through this article.
|
| A tool for automatically generating tools |
This is the sixth installment in this series, and this time we are introducing "BakedTexture," a tool that utilizes an effect called ambient occlusion to generate models with shader effects baked into the textures.
Developed as a plugin for Autodesk's 3ds Max, this tool enhances the appearance of 3D object textures with minimal processing. The ambient occlusion effect itself is a standard feature in most modern 3D software packages.
However, it's a tricky thing that doesn't yield good results unless you understand some complex processes. So, we developed a tool that anyone can use with just the press of a button.
To perform bake rendering solely within 3dsMax, and to seamlessly export the results into a 3ds file for saving as data compatible with UC-win/Road, requires considerable knowledge and experience. Furthermore, when using the existing 3dsMax interface to perform bake rendering, it is necessary to calculate the ambient occlusion effect for each individual building.
When dealing with a large number of buildings, such as in VR city data, it can be quite laborious. However, by using the tools we have developed, you can select multiple buildings and, once executed, they will automatically generate a set of 3DS files where ambient occlusion effects have been applied to the textures of all selected buildings.
|
Before introducing the tools, let's briefly explain baked rendering and ambient occlusion. Baked rendering is a technique where shader effects (such as shadows, shading, and reflections) are calculated and applied to a regular texture, and then that effect is reused as part of the texture itself. In VR (virtual reality) environments, these shader effects are typically calculated in real-time, but because calculations like shadows can take time, a method has long been used where static objects have textures with pre-calculated shadows baked into them.
Typical 3D models consist of geometric information and material information. Geometric information refers to vertices, edges, and meshes. Material information is composed of several map areas, and in previous versions of UC-win/Road, a single map area was used (with 2 areas for water surfaces such as reflections). The current version allows the use of three map areas: Diffuse, Ambient, and Specular. A texture (image file) can be assigned to each map area. The Diffuse map contains textures with basic color information, the Ambient map contains textures with color information representing light that is not directly illuminated, and the Specular map uses grayscale textures to represent the material's glossiness. Current 3D games often use over 200 map areas, but using more map areas increases processing time. Therefore, when visualizing vast amounts of data, such as in VR spaces, it is generally better to use as few map areas as possible. We have been using textures with baked-in shadows for a long time.
|
Ambient occlusion (hereinafter referred to as AO), literally translated as "environmental occlusion," refers to the shading effect of areas that are blocked from ambient light.
Simply put, you place a substance on the ground and illuminate it with light from all directions equally. Imagine a photography studio or a cloudy day.
Even with that, materials can have shading. For those studying computer graphics, this is a rendering technique often referred to as global illumination
By applying only the shadow effect to the texture beforehand, excellent results can be achieved, which is why AO (Ambient Occlusion) is commonly used in recent games. In the 1990s when I was studying computer graphics, we would arrange 36 omnidirectional light sources in a dome shape and apply the rendering results obtained there to the textures.
In current 3D computer graphics software, it is possible to easily calculate lighting effects by using a single "sky" light source.
Figure 1 shows the rendering results with and without the Ambient Occlusion (AO) effect. The AO effect is generated based on geometric information, so even if you apply a building facade image to a flat surface, the effect cannot be achieved.
To achieve effects like those shown in Figure 1, a certain level of refinement in the geometric data is necessary.
In the actual VR space, shadows from sunlight are also added to this model.
In the next chapter, we will introduce a method for creating AO (ambient occlusion) textures using a manual approach.
 |
|
 |
| ■Figure 1: Ambient occlusion effect disabled (left) and ambient occlusion effect enabled (right) |
|
| Methods for creating embossed textures using manual techniques |
To actually create textures with AO (ambient occlusion) effects, the following steps are necessary.
- Creating and setting up ground and sky lighting
- Creating objects to be used as burn-in targets
- Create a UV map
- Specify the channel and effect for the burn-in application
- Replace the baked texture with the original texture
- Export the data as a .3ds file
- Import the generated 3ds files into UC-win/Road
| 1 |
|
2 |
 |
|
 |
|
|
|
| 3 |
|
4 |
 |
|
 |
| ■Figure 2: Steps 1 to 4 for creating an AO (Ambient Occlusion) effect baked texture using a manual method |
When creating visually appealing models, a crucial step is the environment setup in Step 1. If you cannot achieve "stylish" rendering at this stage, no matter how much effort you put into it, you will not be able to obtain an attractive AO effect. As long as you understand the tools and do not make mistakes in the subsequent steps, you can create 3D models with AO effects. There is only one point I would like to emphasize:
The UV map, which is a texture mapping transformation for areas such as diffuse, ambient, and specular, is only available once in UC-win/Road. This means the number of map channels is one (the number of available UV maps is referred to as the map channel count). Therefore, in UC-win/Road, textures must always be assigned to map channel 1. It is not possible to create separate UV maps for the diffuse and specular maps. Modern 3D software often allows the use of multiple map channels, where the original texture might be assigned to map channel 1, while a newly baked texture is assigned to channel 2. If you import such data directly into UC-win/Road, the original texture will likely be exported, so caution is needed.
 |
| ■ Figure 3: The interface of the BakedTexture tool |
|
This document introduces sample models that were created by preparing simple pattern images for the tools used and then imported into UC-win/Road. This is a model of a virtual Japanese castle, which I presented at the 5th International VR Symposium held in November 2011. The geometric data was automatically generated using the tools mentioned previously. While this data can be directly imported into UC-win/Road, it utilizes textures with baked-in ambient occlusion (AO) effects.
|
This time, we introduced BakedTexture, a tool that utilizes ambient occlusion to better represent buildings in VR spaces, generates the resulting effect as a baked texture, and exports it into data that can be used with UC-win/Road.
 |
|
 |
| ■Figure 4: Screenshot of a virtual Japanese castle model within UC-win/Road |
|
Video files tend to be large, so they are usually recorded after compression. In the case of uncompressed AVI format, each frame is recorded without compression. For example, if the resolution is 1024x768 pixels (RGB 24-bit) and the frame rate is 30fps (30 frames per second), then approximately 2.3MB per frame, so a one-minute recording would require 2.3MB x 30 frames x 60 seconds, resulting in an extremely large file size of over 4GB.
When recording videos using UC-win/Road, you need to specify the data compression format. The "Codec" field in the "AVI Options" section displays the types of codecs installed on your computer, and you can select the codec to use for compression.
 |
|
 |
| ■Figure 1: UC-win/Road video export options |
|
A codec (Compression/Decompression) is a program that performs data compression and decompression, and when playing videos, you need the same type of codec that was used during creation.
If a video is compressed using codecs that are standard in Windows, it can be played on other Windows machines without needing to install any additional codecs. In Windows 7, the number of codecs included by default has increased, including DivX and Xvid. Codecs also include audio codecs used for compressing and decompressing audio such as MP3 and AC-3. Video and audio codecs are selected separately based on their intended use and the raw data, and can be combined, for example, to compress video using a DivX codec and audio using an MP3 codec.
File formats that store such compressed data are called "container" formats, and some of them can handle various types of data, including video and audio, as well as chapters, subtitles, and synchronization information necessary for playback. A container defines the arrangement of data within a file and combines it into a single file; in essence, it's a storage container for data. Therefore, it is often difficult to determine from the outside which codecs were used for the data contained within. AVI is a representative container format; whether the codec is DivX or Xvid, if the data is stored in an AVI container, the file extension will be .avi.
Currently, numerous codecs have been developed and are in circulation because the compression rate and image quality priorities vary depending on the application, such as for mobile phones, digital video cameras, DVDs, and video streaming services like YouTube. Because video codecs cannot be identified solely by their file extension, it is helpful to use codec identification tools. |
A codec consists of two components: an encoder and a decoder. The encoder performs the compression (encoding) function, while the decoder performs the decompression (decoding) function. Some codecs include both components, while others contain only one of them. Just because a video can be played on one computer doesn't mean you can create videos in the same format without any issues. For example, even if a format like DivX can be played directly on Windows 7, you still need to install the DivX codec (encoder) when creating videos. These codecs are available for free download from the internet.
Codec
(Video compression format) |
Container format
(Common file extensions) |
Features |
| WMV |
wmv/wm |
Windows Media Video is an abbreviation. It is natively supported by Microsoft's Windows Media Player. The compression method is based on MPEG-4. |
| DivX |
avi/divx |
It can suppress image quality degradation and significantly reduce file size. It is based on MPEG-4. |
| Xvid |
avi/xvid |
High quality and high compression. It can achieve compression with almost the same quality as DivX. It is open source and based on MPEG-4. |
| AVCHD |
m2ts |
It is used with video cameras that support high-definition video. It is based on the H.264 standard. |
| Cinepak |
avi |
It was used in early versions of Video for Windows and QuickTime, as well as on home game consoles. It is still playable by most playback software. While it can be run on low-spec machines, it offers lower image quality compared to MPEG and takes longer to compress, so it is not commonly used nowadays. |
■Table 1: Main video codecs supported for playback on Windows 7
| Container |
Main supported codecs |
Main file extensions |
Features |
| AVI |
Video formats: MPEG-4, WMV, H.264 |
avi |
Windows standard; it supports various codecs and has compatibility with many software applications. It is not suitable for streaming delivery. |
| MOV |
avi |
mov/qt |
Developed by Apple Inc., it is also used in videos for digital cameras. It can be played using QuickTime Player. |
| RealMedia |
Video: RealVideo
Audio: RealAudio |
rm/rmvb/ram |
Developed by RealNetworks, it excels in low-bitrate streaming and is used for streaming videos on the internet. It can be played using RealPlayer. |
| F4V, FLV(Flash Video) |
Video formats: H.264, On2 VP6 (FLV4)
Audio formats: MP3, AAC |
f4v/f4p/flv |
Adobe Systems' definition. It is widely used for video streaming on the web. Flash Player enables interactive expressions, and it is also used for mobile delivery. |
■ Table 2: Representative Media Container Formats
|
|
| (Featured in the New Year issue of Up&Coming '12) |
 |
|







>> Product comprehensive catalog

>> Premium membership services
>> Financial support
| Recently released products |
|
|
|