Support Topics
Support Themes / UC-win/Road Information regarding after-sales support services
City Design Tools Vol.6 (Total of 7 volumes) BakedTexture

I am Kobayashi from Arizona State University. I will be introducing the CityDesign tool, which is publicly available from Forum8. We are dedicated to developing a suite of tools for seamless creation and transformation of urban data between UC-win/Road and other 3DCG packages within Forum8's VR environment.
Here, we will also publicly release the source code of the tools. However, please understand that this is not specific support, and we may not be able to take responsibility for any issues that arise. If there are simple tools available that would be suitable for your company, please contact us.

 Tool automatic generation tools
For the sixth installment, we will introduce "BakedTexture," a tool in this series that utilizes environmental and occlusion effects to generate textured models with shading.

This tool was developed by Autodesk as a plugin for 3ds Max. By slightly modifying the textures of 3D objects, you can significantly improve their appearance. Environmental and occlusion effects have almost become standard features in all 3D software.

This tool doesn't require understanding complex processes to achieve good results; it only requires a single button to deliver excellent performance. Therefore, anyone can use it.

In practice, the process of incorporating textures into a 3ds file during rendering in 3dsMax and then saving that data for use with UC-win/Road requires considerable knowledge and experience. Furthermore, when performing texture rendering using the existing 3dsMax interface, it is essential to calculate the environmental and occlusion effects for each building.

Similar to VR city data, achieving this requires considerable effort when dealing with a large number of buildings. Using the tools developed here, selecting multiple buildings automatically generates a set of 3DS files containing textures for all buildings, including environmental and occlusion effects.

 Ray tracing rendering
Before introducing the tools, let's briefly explain baked rendering and environmental/occlusion effects. Baked rendering refers to calculating typical shading textures (shadows, highlights, reflections) and then reusing this effect as a texture. In VR (virtual reality) environments, these shading effects are usually calculated in real-time. However, because shadow calculations consume a significant amount of time, it has been common practice to use static objects from the beginning to render shadow textures.

A typical three-dimensional model consists of geometric information and material information. Geometric information includes vertices, edges, and meshes. Material information comes from various pattern domains; previously, UC-win/Road used one pattern (two patterns were used for things like moving water). In the current version, Diffuse, Ambient, and Specular can utilize three patterns each. A texture (image file) can be assigned to each pattern domain. The Diffuse pattern displays a texture representing basic color information, the Ambient pattern displays a texture representing the color when light is not shining, and the Specular pattern displays a texture that represents material gloss as a grayscale image. Modern 3D games can use over 200 pattern domains, and using more pattern domains consumes more time. Therefore, to visualize VR spaces containing large amounts of data, using a single pattern domain is the best approach. Shadow baking textures have been used since the 1980s.

 Environment/Isolation
"Environment-occlusion," often abbreviated as AO, literally translates to "environmental occlusion," which refers to the shadow effect created by areas that are blocked from environmental light.

Simply put, any substance placed on the ground will uniformly reflect light from all directions. Consider situations like a studio setting or an overcast day.

Shadows can be displayed on that material. People studying computer graphics often use the term "global illumination" to describe rendering techniques.

To achieve better results, especially in recent games, it's common to first set up the shadow effect with a baked texture, and generally use AO (ambient occlusion). In the 1990s when I was learning CG, we would configure 36 omni lights in a dome shape and then bake the resulting rendering.


In modern 3D computer graphics, calculations for space lighting can be performed relatively simply.

Figure 1 shows a rendering without ambient occlusion (AO), the left figure shows a rendering with AO, and the right figure displays the rendered result. The AO effect is generated based on geometric information, so even if you apply many building exterior images to a flat surface without any bumps or curves, you will not achieve the desired effect.

As shown in Figure 1, creating this effect requires a certain amount of geometric data. Furthermore, in an actual VR environment, shadows from sunlight shining on the model can also be added. In the next chapter, we will introduce how to create AO (Ambient Occlusion) burn textures using practical manual methods.
■ Figure 1: The effect of enclosure without environmental factors (left) and the effect of enclosure with environmental factors (right)
 The method for creating the wood grain texture involves manual techniques
The following steps are necessary to actually create an AO (Ambient Occlusion) effect using baked textures.
  1. Settings for creating ground and sky lighting
  2. Create burn-in image object
  3. Create UC patterns
  4. Channel effect and designated effect
  5. Rendering texture and script texture replacement
  6. The data is exported as a 3ds file

1 2

3 4
■ Figure 2: Steps 1 to 4 illustrating the process of creating AO effect burnished textures using the specified method

To achieve the best results, the initial environment settings are crucial. If the rendering is not good at this stage, even with great effort, a satisfactory ambient occlusion (AO) effect will not be achieved. If there are no errors in subsequent steps, it is possible to create a 3D model with a strong AO effect. Here's an example of one important point to consider.

The UV patterns for diffuse, ambient, specular, and other texture mapping areas can only utilize one pattern in UC-win/Road. The number of patterns and channels is 1 (the number of utilized UV patterns is referred to as the pattern channel count). This means that in UC-win/Road, the texture's pattern and channel can only be assigned to channel number 1. It is not possible to create separate UV patterns for diffuse textures and specular textures. Recent 3D software allows the use of multiple patterns and channels; if a script uses pattern and channel number 1, and a newly baked texture uses channel number 2, then even when imported into UC-win/Road, be aware that the content of the script's texture mapping will also be output.

■ Figure 3: The interface of the BakedTexture tool
 Example image samples
We will introduce a sample model that imports simple pattern images created using preparation tools into UC-win/Road. At the Fifth International VR Symposium held in November 2011, the author presented a model of a Japanese city. This model was automatically generated using geometric data with the tools previously introduced. While this direct application to UC-win/Road can achieve good results, even better results can be achieved by using baked textures with AO effects.
 End
In this session, we will introduce the BakedTexture tool, which improves the appearance of buildings in VR spaces. The BakedTexture tool utilizes environmental and occlusion information to generate textures that enhance this effect, and these textures can be exported as data usable within UC-win/Road.

■ Figure 4: A screenshot showing the Japan City model within UC-win/Road


Support Themes / UC-win/Road Information regarding maintenance and support services
AVI capture and codecs

 Animation compression
When the size of an animation file is large, it is usually compressed before recording. In uncompressed AVI format, each frame of the static image is compressed. For example, with a resolution of 1024x768 pixels (RGB 24-bit) at 30 frames per second (fps), each static frame requires approximately 2.3MB. Therefore, one minute of video would result in a file size of approximately 4GB or more. When recording animation using UC-win/Road under such circumstances, it is necessary to specify the data compression format. The "Codec" column in the "AVI Options" section displays the types of codecs installed on the computer, and you should select the codec to be used for compression.

■ Figure 1: Animation output options for UC-win/Road
 Codecs and containers
A codec (Compression/Decompression) is a program that compresses and decompresses data. When generating animations, it's necessary to use codecs of the same type as those used during creation.

Animations compressed using codecs installed by default in Windows can be played on other Windows machines at the delivery location without requiring the installation of new codecs. In Windows 7, standard codecs such as DivX and Xvid have been added. Codecs not only exist for video but also for audio compression/decompression, such as MP3 and AC-3. Video codecs and audio codecs correspond to their respective purposes; for example, a "video DivX, audio MP3" combination can be used for compression.

The compressed data is maintained in a file format called a "container" format. In addition to images and audio, it also supports various types of data necessary for displaying chapters, subtitles, and synchronized information. The arrangement of data within the container configuration file is organized as a single file, which can be considered a data containment vessel. It's difficult to determine from the outside which codec was used to create the data contained within. A representative example of a container is AVI; whether the codec is DivX or Xvid, the extension within the AVI container format remains .avi.

Currently, many codecs are being developed for various media such as mobile phones, digital cameras, and DVDs, as well as for animation distribution platforms like YouTube. These developments aim to optimize the balance between compression rate and image quality based on specific use cases. It is not possible to determine the capabilities of an animation codec simply by examining its specifications; therefore, convenient codec identification tools can be used.

 Encoding and decoding
The codec consists of 2 components: an encoder and a decoder. The encoder performs the compression (encoding) function, while the decoder performs the decompression (decoding) function. A codec can contain both of these components, but codecs containing only one of them also exist. While it is possible to play back animations on a computer, it may not always be possible to create (compress) animations in the same format. For example, even if a system has the ability to reproduce DivX files on Windows 7, installing the DivX codec (encoder) may still be necessary when creating such animations. These codecs can often be downloaded for free from the internet.

Codecs
(Video compression format)
Container format
(Common file extensions)
Features
WMV wmv/wm Windows Media Video is an abbreviation. It corresponds to the Windows Media Player standard developed by Microsoft. The compression method is based on MPEG-4.
DivX avi/divx Reducing image degradation allows for significant reduction in file size. MPEG-4 serves as the standard.
Xvid avi/xvid High quality and high compression. It can be compressed to almost the same quality as DivX. In open source software, MPEG-4 is often used as a standard.
AVCHD m2ts This product is designed for use with HD animation cameras. It supports H.264 as the standard codec.
Cinepak avi Initially, Video for Windows and QuickTime were used in home game consoles. Now, they can be used in almost all playback software. While it can be implemented on low-spec machines, MPEG has lower image quality and longer compression times, so it is rarely used now.
■Table 1: Major video codecs supported for playback in Windows 7

Container Mainly supported codecs Major expansions Features
AVI Video formats: MPEG-4, WMV, H.264 avi Windows standard. It supports various codecs and software. Streaming is not suitable.
MOV avi mov/qt Developed by Apple Inc., it can be used in animations for digital cameras. It can be played using QuickTime Player.
RealMedia Imagery: RealVideo
Sound: RealAudio
rm/rmvb/ram Developed by RealNetworks. This technology enhances streaming quality at low bitrates and can be used for online animated content. It is played using the RealPlayer.
F4V, FLV(Flash Video) Video codecs: H.264, On2 VP6 (FLV4)
Audio formats: MP3, AAC
f4v/f4p/flv Adobe Systems defines it. It is widely used for distributing animations on the Web. Using Flash Player allows for interactive presentations and also enables mobile delivery.
■ Table 2: Representative Media Container Formats
Up&Coming '12, New Year's publication and distribution
Return
Up&Coming

FORUM8