[Cityengine tutorial documentation]-02 street tutorial

Source: Internet
Author: User

This document is an ESRI cityengine learning document. It is an official example of cityengine_2011_tutorials tutorial 2 --
The Chinese Translation of "tutorial_02_street_generation _ 2011_2" is prepared by the Chinese translation of netizens in winter and winter.



Tutorial Introduction

This tutorial describes how to create a street network and a fine-grained street model in cityengine. The automatically generated street chart can reflect the effects of various obstacles, such as lakes and terrain. The second part of this tutorial describes how to create a street layer based on a street chart. When road rules are applied to road data, a precise street model can be generated. In the last part of this article, we show how to generate road networks of different styles under certain attributes.



Part 1: Create a street network tutorial to import the project "tutorial_02_streets" to your cityengine workspace. Use [file] → [new ].. → cityengine scene: Create a new scenario file in the scenario (Scenes) folder of the street Tutorial Project in the new Wizard and name it "mystreets. cej ".
Create obstacle Layer

In urban environments, road placement is subject to many restrictions. Such as lakes, rivers, or parks, there may be no road network distribution in these areas. In cityengine, you can create an obstacle layer to control the expression.

Create a new map layer [layer] → [new map layer ...];

Select obstacle and click Next;

Select the “obstacles.png file from the map folder (maps)) as the obstacle file;

Set the alignment position to the center point and press the proportional button;

Set X size (the size of X) to 3000;

Click Finish to complete the settings.


Tip: If no obstacle layer is displayed in the viewport window, use the view settings menu to switch to the texture shadow mode.


Create topographic map layer

The street we created must follow the elevation terrain. This is achieved by creating a topographic map layer generated by the grayscale elevation map.

In the map folder of the file navigation (navigator.pdf window, select the image file “elevation.jpg ";

Drag the image to your 3D window;

Select “topo.png as the texture map file from the map folder;

Set max. elevation (highest altitude) to 250;

As before, set the alignment position to the center point and press the keep ratio button;

Set X size to 3000;

Click Finish;


In the scenario window, select an obstacle layer. In the Inspector window (which can be opened through window> inspector), change its elevation offset to-15. This prevents two layers from overwriting each other in the viewport window.


Generate a street network

Now you can start to generate a street network.

Click the blank area in the viewport window to cancel the selection of the obstacle layer;

Run graph → grow streets... to start the street growth dialog box;

Change the street count to 1500;

In the "Environment Settings" group, select your topographic map layer from the "heightmap" drop-down list;

Select your obstacle layer from the drop-down menu of "obstaclemap;

Click Apply and close the window.



Resolve road shape conflicts

When a road model is generated or imported, the shape of a street may conflict with that of a cross. These conflicts are displayed in a line segment with a red dot in the diagram.


These conflicts are caused by overlapping images. Generally, they are caused by the short distance between the online nodes on the road center. You can try to solve the conflict by manually editing the road network, or use the "resolve conflicts (conflict resolution)" option ([graph]-> [cleanup graph ]).




Make block (lot) Creation unavailable

We are only interested in streets now, so:

Right-click the "viewport" window, select> select all, and select all elements in the scenario;

Select the "blocks" tab in the Inspector window;

Set the "shapecreation" attribute to "false" and click "Off/on.

This operation sets the block shape feature to unavailable in blocks (blocks.


TIPS: when you are dealing with a road network with a large amount of data, this function can be used to prevent street shape creation to improve software performance. Select some roads and nodes, and set the shapecreation parameter to false in the "shapes" tab in their "Inspector" window, these street lines and nodes cannot generate roads and intersections.


Interactive street editing

Interactive Optimization of the generated Road Network:

Create more streets in the blank area, select one or more adjacent streets, and adjust the number of streets you want to generate in the street growth dialog box, click the Apply button to automatically generate the corresponding number of streets (randomly generated) on the road section ).

Select the street you want to delete and click Edit> edit in the menu bar to delete the street;

Create a new street manually and use the "Create Street" tool (shortcut: G );

Convert the road, set the road width, modify the road bend, and use the "Edit Street" tool;

Transform regulators are used to convert, rotate, and scale a single or group of roads.



Modify the attributes of a road chart in the Inspector window

Select one or more road sections;

Open the "segment" tab in the "Inspector" window;

Modify the road width by setting the "streetwidth" parameter;


 


Adjust height

The Terrain elevation in the scenario looks a little high.

In the scene editor window, select the topographic map layer;

Open the layer attribute "layer attributes" group;

Change the maximum height value "max height" of the elevation attribute from 250 to 220.


TIPS: You can also modify attributes of other layers. If you have another different elevation chart, select your new map, and the terrain in the "viewport" window will also change.

Now you need to adapt the street network to the terrain based on the new terrain:

In the scene editor window, select the street network layer;

Open the graphic terrain adaptation dialog box: [graph]-> [align graph to terrain ...];

Select "project all" to adapt the image to the terrain ";

Select the topographic map layer;

Click Finish to arrange the graphic elements.



Adapt terrain to shape

Use the [layer]-> [align terrain to shapes...] function, the terrain will change and fit with the shape.

Select all street charts in the scenario;

Open the image alignment dialog box: [layer]-> [align terrain to shapes ...];

Use the default settings and click Finish.


After the line chart of the topographic map layer is activated, the changes of the topographic map become more obvious.

In the scene window, click the eye icon in front of the street grid layer to make it invisible, and then select the topographic map layer.

In the layer Attribute Group of the inspector window, set wireframe Alpha to 0.3.

In 3D window settings, make the wiremap model Active (toolbar above the viewport window) or press the "7" key.

TIPS: changing the direction of light can also make the details of the terrain clearer.



TIPS: The method to quickly verify the modification effect is to switch the activation status of "elevationdelta" in the "Inspector" window (under the selected status on the topographic map layer)


TIPS: the original elevation map used to build the terrain is not modified.


Terrain resolution

When an elevation chart is used to create a terrain, the resolution of the elevation chart determines the resolution of the topographic map. You can manually adjust the resolution in the "layer attribute" group in the "Inspector" window (when the topographic map layer is selected)


Higher resolution helps improve the accuracy of the alignment topographic map.

TIPS: setting a high resolution on the topographic map layer will reduce the display performance of 3D windows (depending on the graphics card performance of your computer)

 

You can directly open "tutorial_02_streets/scenes/streettutorial_01.cej" to view the results of the first part of this tutorial.

 

Part 2: Use CGA rules to generate street model tutorial settings

You can continue the next learning in the completed scenario, or directly open the "tutorial_02_streets/scenes/streettutorial_01.cej" scenario.

TIPS: to better understand the road layer, click the eye icon in the "scene" window to hide the topographic map layer.



Road shape type

We can see that five different street shapes have been created, and these shapes have been assigned "Start rule (initial rule )", the "Start rule" (initial rule) of the selected shape is displayed in the "Inspector" window ).

Different types of road models are distinguished by different demonstrations. Initial rules are an important part of the Rule file.



Application rule File

Now proceed to the last step: create a real 3D street model. Apply the CGA rule "rules/simplestreets. CGA" to the street shape. Each street shape of different types has a unique initial CGA rule. The initial rules are described as follows.

Street ):Apply street maps based on the road width;

Sidewalk (sidewalk ):Use sidewalk textures to distribute road sketches, such as street trees and street lamps;

Crossing ):Apply the road background color map;

Intersection (junction ):At The Same Crossroads;

Connection entry (junctionentry ):At The Same Crossroads.

View the details and rule syntax of the "simplestreets. CGA" rule file. Refer to the CGA model syntax tutorial to learn more about this syntax.

Select the "streetnetwork" layer in the "scene" Window

[Shapes]-> [Assign rule file...] Select the "tutorial_02_streets/RULES/simplestreets. CGA" rule File

Select some street models

Click Generate In the toolbar above


You can also open the "tutorial_02_streets/scenes/streettutorial_02.cej" scenario to generate a street and view the results of the examples in this section.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.