Civil Engineer's Forum-FORUM8
Set this page as your homepage QR

Facebook - FORUM8

Twitter - FORUM8

instagram - FORUM8

YouTube - FORUM8

 Sitemap | Terms of Service | Inquiries | English translation site | Japanese | English | Korean | Vietnam | Francais

Support Topics
Support Topics / UC-win/Road Maintenance and support service related information
City Design Tools, Volume 4 (Total of 7 volumes) ImageToCity

 I am Kobayashi from Arizona State University. I will introduce a tool called "City Design," which is available from FORUM8, with a link to its page: City Design.

 We are developing a suite of tools to seamlessly generate and convert urban data between FORUM8's VR package, UC-win/Road, and other 3D graphics packages. The tools introduced here have their source code publicly available. Currently, we do not offer specific support, so while we appreciate your understanding, we cannot be held responsible for any issues such as bugs that may arise. If you are in the architecture or civil engineering field and require a simple tool suitable for your company's systems, please feel free to submit your requests.

 Procedural city generation
In the previous installments, we have introduced tools such as PovrayToMax, ImageToTerrain, and AnimatedCharacter. This is the fourth installment, where we will introduce a tool called ImageToCity that automatically generates 3D city data. Like the previously introduced tools, this was developed as a plugin for Autodesk's 3dsMax. This fundamental tool for CityDesign was researched and developed at Arizona State University in the 2009 fiscal year. By preparing the following four files, buildings, roads, trees, and other elements within a 500-meter square area are all generated as textured 3D data and imported into Forum8's UC-win/Road VR city visualization tool.

  1. A file in AI format that shows road lines.
  2. AI file containing closed splines defining zoning boundaries.
  3. An image file representing terrain elevation using grayscale pixels
  4. Image files color-coded to represent forest areas, residential areas, and commercial areas

First, I will introduce some basic background information on procedural city generation.
The research on automated city generation itself isn't particularly new. The first thing that needs to be mentioned is Shape Grammar.
This is a method for describing the relationships between spatial elements, and it was developed in the 1970s by Professor George Stiny (currently at MIT).
Professor Stiny, during the 1980s and 1990s, served as a professor in the Department of Architecture at UCLA (University of California, Los Angeles), where he produced numerous papers and mentored many researchers related to Shape Grammar. Those interested can refer to the following books.
The first one was written by the late Professor William Michael and describes the theory and methods of using Shape Grammar in the field of architecture.
The second one is an English book that provides a more mathematically rigorous explanation of Shape Grammars.
  • "Architectural Morphology: On Design, Calculation, and Cognition," by William Mitchell and Nagakura Takehiko
  • "Shape: Talking About Seeing and Doing" by George Stiny
I also studied at UCLA in the 1990s and took Professor Stiny's "Color Grammar" class, along with his wife, Professor Terry Knight (who is now a professor at MIT).
However, Shape Grammars have been used as analysis tools in the field of architecture, so they are not generally utilized.
What changed this situation was a paper titled "Procedural Modeling of Cities," which was presented at the Siggraph conference, the largest academic conference in the field of computer graphics, in 2001.
This paper, presented by Yoav Parish and Pascal Muller from ETH (Swiss Federal Institute of Technology), demonstrates that high-quality 3-dimensional urban data suitable for use in Hollywood can be automatically generated using a script (CGA) that describes Shape Grammar.

While there are technical aspects to consider, it was the application of being able to generate complex data with minimal input that left a surprising and impactful impression.
After that, Pascal Muller developed many automated generation tools and currently founded a company called Procedural Inc., where he sells software called CityEngine.
This tool was recently used in the Hollywood movie "Cars2" for city generation. Peter Wonka, a joint researcher who is conducting research on automatically generating buildings using CGA, and who is currently a professor at Arizona State University, is also one of my current collaborators.
(*)Yoav I. H. Parish, Pascal Muller , "Procedural modeling of cities", Proceedings of SIGGRAPH '01
By searching for "Procedural Modeling" in the SIGGRAPH conference proceedings, you can find these related research results.

Now, from this point on, I'll share some information that is a bit more internal. Just because these tools exist doesn't mean anyone can easily create urban data suitable for use in Hollywood films; the answer is no. "Automatically creating cities using generation rules" and "automatically extracting building generation rules" are completely different things. The tools developed by Mr. Pascal and his team are design tools specifically for the former, while the latter is still largely a research topic.

In addition, regarding the creation of urban and architectural data, material data plays a very important role, just like geometric data.
Material settings require extensive experience in computer graphics art and often demand more time and effort than creating geometric data.
Mr. Pascal himself was able to better present the data created using the developed tools because of these technologies.
Creating generation rules is not a straightforward task. Even at Arizona State University, they hire several doctoral students to work on data creation, but according to my colleague Peter, "they are not very useful." With this in mind, we decided to develop this tool (ImageToCity) with a slightly different purpose than existing tools. Initially, we developed the tool itself so that it could be used as a learning resource for studying scripting.
It can automatically generate city data, but if you want to make some customizations, you will need someone to modify the source code.
The intention was to use this tool itself as an educational resource, so that users could learn "how to extract building generation rules."
To make it easier to set parameters such as materials, we have created this as a plugin for 3ds Max.
If you can use 3dsMax, you can utilize that knowledge when setting up materials. The ultimate goal is to divide the work of automatically generating buildings among different team members.
We believe that streamlining data creation can be achieved by dividing the work among 3 groups: those who create geometric data, those who create materials, and those who develop building rules. Due to space limitations, this article only introduces a simple automatic generation method. If you require more detailed information or educational materials, please contact us.
We have prepared materials consisting of approximately 200 pages, designed as a course with 10 lessons.

■ Figure 1: GUI of the Animated Character tool

 ImageToCity's automated generation pipeline
 The following diagram illustrates the ImageToCity pipeline.

From the 4 input files, the process first subdivides the land area enclosed by the road network, then identifies building footprints within each subdivision. Building geometry data is generated using pre-defined building generation rules (where parameters like height and window placement are randomly determined within specified ranges) (5).
At this time, each face (the smallest polygon that makes up the mesh) of the generated mesh object is automatically assigned a material ID (1: grass, 2: asphalt, 3: wall 1, 4: frame, etc.).
Next, one of the 24 pre-prepared building materials is randomly selected and assigned to each building (6).
A single building material consists of a group of 10 material IDs. This mechanism allows other people to create materials before the building data is generated. Next, trees, sidewalks, fences, and other elements are attached and integrated into a single mesh data for each building section (7).
Finally, using the texture baking function (TextureBaked) in 3dsMax, a single 3DS file and its corresponding texture image are saved to a specific folder for each building and site. If 10 buildings are generated, then 10 3DS files and 10 image files will be created.
At the same time, 1 metadata file is generated containing location information for 10 data points (8, 9).
When importing data using UCwin/Road, simply specifying this metadata will automatically import all building data.

   
■ Figure 3: GUI for file export
■ Figure 2: The GUI for file import ■ Figure 4: Building data generated using 3ds Max.

 Solutions
 Now, let's proceed to explain how to use the tools step by step.

  1. First, prepare 4 files.

  2. Open 3ds Max, select "MAXScript > Run Script..." from the menu, and specify the "GUI.ms" file.
    Just like running a normal MaxScript, selecting "DesignCity" from the Utilities dropdown list in the Utility tab will add the tool.

  3. Through the GUI shown in Figure 2, you will specify each of the files prepared in step 1 one by one.
    ("GetRoadFile", "GetSiteFile", "GetZoningFile", "GetDEMFile" buttons)

  4. Next, using the GUI shown in Figure 3, select the buttons 1 through 4 in order.
    ("1: Register Component", "2: Generate Buildings", "3: Bake Texture", "4: Output File" buttons)

  5. According to the data, let's just wait until more data becomes available.
    Data similar to Figure 4 will be generated (road and terrain data will not be included).

It takes approximately 5 minutes to apply textures to each building section data.
If there are 10 buildings, you should expect it to take about 50 minutes. We are currently researching ways to improve this.
When using the generated data with UC-win/Road, it is necessary to regenerate the road network and site layout.

 The end
This time, we introduced ImageToCity, a tool that automatically generates 3D city data from only AI (line data) files and image files (BMP).
The generated data can be directly imported into UC-win/Road by specifying the folder.
Next time, we will introduce "ImageToFacade," a "tool for creating tools" that generates building facades from a collection of image files.



Support Topics / UC-win/Road Maintenance and support service related information
UC-win/Road SDK Automatic steering control

With the release of UC-win/Road V5.2, we have revised the drive simulation plugin.
With the UC-win/Road driving simulator, using the active steering option now allows external control of the active steering wheel. Here, "control" refers to the input of open-loop torque to the steering control section.
Currently, the main interface provided by UC-win/Road to external programs is a function for controlling the steering angle (position). In addition to this, we have prepared input and output interfaces that are necessary for research on vehicle automatic control.
This allows for research on automated vehicle control, accident prevention systems, and interaction with drivers, as well as experiments in various road conditions and traffic situations.

■ Steering for the UC-win/Road driving simulator

This feature primarily consists of 3 elements.
  1. Integration features using the UC-win/Road SDK, and sample plugins for the SDK's integration features
  2. UPD network interface collaboration features
  3. Settings for the driving simulation plugin

 Control of the steering wheel
 The motor applies torque to the steering handle while controlling the amount of movement.
The UC-win/Road system sends torque commands directly to the hardware at a frequency of 50Hz and retrieves the current angle of the steering wheel.
This mechanism calculates the torque value that should be applied next based on the obtained handle angle and its change, repeating the process at a frequency of 50Hz.
Because the axis of rotation of the handle and the center of gravity of the handle are separated, torque is generated by gravity when the handle is tilted.
This system is designed to take this torque into account and control it accordingly.

Furthermore, the system incorporates friction force considerations when setting the steering handle's frictional resistance, allowing for more accurate control.


 SDK API
Using the "IF8DSPlugin" API provided by the SDK, the following functions can be used for control.

SetDirectTorqueControl
This function enables or disables control of the steering wheel.
If it is invalid, control is impossible and it is operating normally.
If valid, use the SetHardwareSteeringWheelAngle function to control the steering wheel angle.

SetHardwareSteeringWheelAngle

This function controls the angle of the steering wheel.
Here, you specify the maximum torque to be used for the target angle and rotation.
When controlling the handle, the maximum torque that can be set is 8 Nm, which provides a powerful movement. However, it is likely that a torque of 1.5 to 2 Nm is often used.
Regarding the angle, it ranges from -360 to +360 degrees. The steering wheel control offers several functions as described below.
In addition to controlling the steering wheel, it is also possible to replace input values used in driving simulations.

GetBrakeHardwareValue  GetThrottleHardwareValue  GetWheelAngleHardwareValue
These 3 functions retrieve the current operation amounts of the brake pedal, accelerator pedal, and steering wheel from the hardware. These functions can be called at any time, but the values are actually updated with a frequency of 50Hz.

OverrideAppliedBrake  OverrideAppliedSteering  OverrideAppliedThrottle
This function overwrites the control values used within UC-win/Road to calculate vehicle behavior in a virtual reality (VR) space. After calling this function once, subsequent hardware operations will be ignored; therefore, call the "StopApplied***Override" function to cancel the overwrite process.

StopAppliedBrakeOverride  StopAppliedSteeringOverride  StopAppliedThrottleOverride
This function stops the overwrite processing that was started with "Override-Applied".

GetAppliedBrakeValue  GetAppliedSteeringValue  GetAppliedThrottleValue
This function retrieves the actual operation amount values used in the internal processing of UC-win/Road.
If the input value is overwritten, the overwritten value is retrieved. If overwriting is disabled, the value obtained from the hardware is used.

 Sample plugin
 We provide sample plugins for drive simulator handle control within the SDK. This sample is intended for use when you are in the passenger seat.
UC-win/Road performs autonomous driving, calculates the steering angle, and applies a torque of 1.5 Nm to the steering wheel.
To switch to autonomous driving mode on UC-win/Road, perform the following operations.

  1. Boarding
  2. Turn off the ignition key on the simulator
  3. Using the Enter key on the UC-win/Road keyboard will move you to the passenger seat

To enable steering wheel control, select "Start Steering Wheel Control Demo..." from the "Tools" menu.
To stop the control, select "Stop Steering Wheel Control Demo" from the "Tools" menu.


 Handle control parameters
In the options screen for the DS plugin, you can set physical parameters of the steering wheel to improve the accuracy of torque control.
The parameters are accessible in the drive simulator option screen of UC-win/Road, under the "UCwin/Road → Drive Simulator" tab.
The following parameters can be modified. The default values are based on the UC-win/Road driving simulator located at the Forum8 Tokyo headquarters.

Delay
The delay time in seconds between sending a new torque command and the steering wheel responding. The expected value is between 0.1 and 0.3 seconds.

Inertia movement
Wheel moment of inertia. It is used to calculate angular acceleration based on the applied torque.
If the value is too large, the wheels will rotate significantly apart and attempt to exceed the angle command. Therefore, we forcibly adjust the values back and forth before they converge to the correct angle.

Shift moment
When the wheels are not balanced (at 0.0 degrees), they are used to account for moments caused by gravity.
Because the center of gravity of the wheel is not on the rotational axis of the wheel, a moment is generated when the center of gravity is not vertically aligned with the rotational axis.
To check this value, you can apply a small torque to the wheels at different angles using the "Angle control test" option in the settings screen. This allows you to confirm that the wheel angle during movement affects the acceleration.
Regardless of the wheel angle, "Shiftmovement" will provide the correct value when achieving a constant acceleration.

Resistive movement
Set the minimum torque value required to maintain a constant angular velocity of the wheel. This value is used for measuring friction on the wheel.


 Network control via UDP sockets
This communication function enables monitoring and control of driving simulation operations performed by other applications.
The application requires a PC with UC-win/Road installed, or another PC on the same network. To send and receive information with UC-win/Road, you must implement UDP server and client systems.
The final diagram will look like the figure shown below.


The drive simulation plugin allows remote access to hardware via the UDP protocol, providing functionality similar to the SDK's API for the following features.

  1. Handle control by specifying the angle and torque required for operation
  2. The actual steering angle and pedal input values are obtained from the hardware
  3. Obtain handle, throttle, and brake values applicable to vehicle dynamics
  4. Overriding values from hardware to apply other values to vehicle dynamics

The parameters for remote access can be specified in the [UC-win/Road -> Drive Simulator] tab of the options screen.
  • Within UC-win/Road, a UDP server is running and waits for commands related to the functions described in items 1 and 4 above. These commands are sent from any IP address to the UDP port specified in the options screen of the drive simulation plugin.
  • The UDP client operates by continuously sending values related to the functions described in points 2 and 3 above to the IP address and UDP port specified in the option screen during drive simulation.
  • The options screen allows you to enable or disable both the client and server functionalities.
  • There is an option called "Activate communication by default" that automatically enables communication when UC-win/Road starts.

Regarding protocols
All commands are sent as ANSI strings.
The UDP server for UC-win/Road receives the following commands.

SetDirectTorque
Control=-1
Enable torque control
SetDirectTorque
Control=0
Disable torque control
SetHardwareSteeringWheelAngle
=ANGLE,TORQUE
The wheel angle command, represented by ANGLE and TORQUE, are floating-point numbers expressed as strings.
The angle is defined in degrees
TORQUE is defined in units of Newton-meters (Nm)
Example: SetHardwareSteeringWheelAngle=180,1.5
OverrideAppliedSteering
=STEERING
Override the steering values applied to the vehicle dynamics of UC-win/Road
STEERING is a dimensionless value ranging from -1 to 1
Example: OverrideAppliedSteering = 0.5
StopAppliedSteeringOverride Stop overriding the handle value and revert to normal behavior
OverrideAppliedThrottle
=THROTTLE
This overrides the throttle values applied to the vehicle dynamics of the UC-win/Road system.
The throttle value is dimensionless and ranges from 0 to 1
Example: OverrideAppliedThrottle = 0.5
StopAppliedThrottleOverride  Stop overriding the throttle value and revert to normal operation
OverrideAppliedBrake
=BRAKE
Override the brake values applied to vehicle dynamics in UC-win/Road
The BRAKE value is dimensionless and ranges from 0 to 1
Example: OverrideAppliedBrake = 0.5
StopAppliedBrake
Override
Disable brake value overrides and revert to normal operation.

Furthermore, the UDP client of UC-win/Road sends the following data to the specified IP address and port.

WheelAngleHardwareValue
=ANGLE
The actual angle value of the steering wheel
The angle is expressed in degrees and ranges from -360 to 360
Example: WheelAngleHardwareValue = -100
AppliedSteeringValue
=STEERING
Handle values applicable to vehicle dynamics
STEERING is a dimensionless value ranging from -1 to 1
Example: AppliedSteeringValue = -1
ThrottleHardwareValue
=THROTTLE
Actual throttle pedal input values
The throttle value is dimensionless and ranges from 0 to 1
Example: ThrottleHardwareValue=1
AppliedThrottleValue
=THROTTLE
Throttle values applied to vehicle dynamics
The throttle value is dimensionless and ranges from 0 to 1
Example: AppliedThrottleValue = 0
BrakeHardwareValue
=BRAKE
Actual brake pedal input values
The BRAKE value is dimensionless and ranges from 0 to 1
Example: BrakeHardwareValue = 1
AppliedBrakeValue
=BRAKE
Brake values applicable to vehicle dynamics
The BRAKE value is dimensionless and ranges from 0 to 1
Example: AppliedBrakeValue = 0

     
Previous page    Index    Next page
(Featured in the Autumn issue of Up&Coming '11)
Go back
Up&Coming

FORUM8


Contact information




■ [User Introductions]
sugiko Corporation, Technical Sales Department
Scaffolding Safety Consulting Department

Mie University, Graduate School of Engineering
Seika Digital Image Co., Ltd.
Infranet Co., Ltd.






>> Product comprehensive catalog


>> Premium membership services
>> Financial support

Recently released products
■ Electrical Media Delivery Support Tool Version 19
■ Retaining wall design, 3D reinforcement detailing, Version 26
■ Bridge Maintenance Plan System Version 7
■ Calculation for concrete slab placement (compliant with R7/H29 road standards), Version 2

Campaign in progress
■ Within 2 years of release, enjoy a 30% discount plus 30,000 FPB points back
■ Smart download
■ Design Festival 2026, exclusive for visitors
■ Drone school discount

Seminar and event calendar
Upcoming seminars
11/26  Metavernia F8 VPS experience
11/27  Introduction to Structural Analysis
12/2  Engineer programming
  Introduction to yoga experience
12/3  DesignBuilder experience
12/4  Reinforced concrete foundation

Software/Support Services
VR software(Virtual reality)
《UC-win series》
Road simulator
• Driving simulator
• Micro-simulation
Evacuation analysis and simulation
>> Other VR software
FEM analysis software
・3-dimensional plate dynamic nonlinear analysis
・2-dimensional dynamic nonlinear analysis
・A comprehensive finite element analysis system
>> Other FEM analysis software
Civil engineering, architecture, and design software
《UC-1 Series》
・Structural analysis/cross-section
Bridge superstructure
・Bridge substructure components
Foundation work
Temporary construction
Road construction and earthworks
・Harbors
・Hydraulic engineering
・Subsurface investigation and analysis
・CAD/CIM systems, construction accounting
• Maintenance and management, earthquake risk
Architecture
・Ships/Evacuation
>> Other civil engineering, construction, and design software
Cloud
《Supercomputer Cloud®》
・Supercomputer cloud services
《VR-Cloud®》
・Real-time VR system
Analytical support services/support
・UC-win/Road support system
・Design verification support service
・Engineer's Studio® analysis support
・Ground investigation analysis support services
・EXODUS/SMARTFIRE analysis support
・XPSWMM analysis support services
Building energy simulation
• 3D laser scanning and modeling
・3D modeling services
• 3D report and drawing services
>> Other support services
Various solutions
Seismic resistance assessment/analysis
・Design of steel bridges
・New bridge construction methods
Architectural design
・Local governments
・Medical VR systems
・Parking solutions
・ECO solutions
>> Other solutions