全站通知:

道路编辑器

阅读

    

2023-11-30更新

    

最新编辑:Lu_23333

阅读:

  

更新日期:2023-11-30

  

最新编辑:Lu_23333

来自城市:天际线WIKI_BWIKI_哔哩哔哩
(重定向自道路编辑器
跳到导航 跳到搜索
页面贡献者 :
Lu_23333
xl123071
hana_提不起劲
魔十四
蓝习米
施工中:欢迎协助编辑本页,请参考帮助:编辑帮助帮助:编辑规范。请从以下方面协助编辑:
  • 需要从官方Wiki翻译此页面

道路编辑器是资产编辑工具中用于修改和创建道路的工具。

该页面PWIKI官方与BWIKI两者皆未完成编辑。请根据您的实际情况加以参考。

概述

道路编辑器可以用来定制许多游戏中的 "网格 "物体,包括道路、火车/电车/单轨铁路、运河、码头等。由于游戏中的网状物体的几乎所有属性都可以编辑,变量的数量似乎令人困惑,其中一些只在某些情况下有意义,而且所有的配置都不能保证有效。这里解释了可编辑的属性,你可以随时参考模板中的设置方式。所有的“网格”在这里将被称为道路。

道路通常由5个高度组成。 “基础”指的是地面高度,高架是有一定高度之间时使用的版本,桥梁拥有更高的高度的属性,坡度是从地面通往隧道的部分,而隧道是道路的地下版本。每个高度都是独立编辑的,可以包含在不同情况下使用的多个不同模型。你可以从道路编辑器主面板的标签中选择你要编辑的高度。

这些立面所使用的三维模型被分为路段和节点。路段通常用于连续的道路,而节点则用于交叉口、不同道路类型之间的过渡,以及扭曲成道路的末端。路段和节点也包含了何时使用的条件,并且多个模型可以同时使用,如有轨电车的地面段、有轨电车的轨道和穿过电车轨道的电线。路段和节点模型都是简单的直路桩,游戏会负责弯曲和匹配它们。隧道高度通常不需要任何额外的建模。段落和节点模型不一定只是道路,也可以是任何你想要缩放的东西,并随着道路的弯曲而弯曲。

车道还包含有关车道的位置、车辆限行、限速等属性和支撑的信息。但车道不一定需要允许任何东西使用它们,可以设定成普通的容器,用于支撑或中间平台等。车道摆件也包含了摆件的额外属性和摆件使用的条件。

Modeling

文件:Basic.png
Example screenshot of the basic mesh for Two-Lane road
文件:Elevated.png
Example screenshot of the elevated/bridge mesh for Two-Lane Road
文件:Slope.png
Example screenshot of the slope mesh for Two-Lane Road

Roads are usually modeled as straight 64 units long and 16-32 units wide road stubs. Any width and length can be used and set up in Half-Width and Segment Length fields in Properties menu, although widths lesser than 8 are known to cause issues. It’s important to have the model sliced in grid-like layout and in the middle parallel to its length to have free vertices the game can move around. Make sure that the mesh is aligned parallel to z-axis length-wise and to center the mesh to scene origin. If your road has pavement make it 0.3 units high to match built-in roads and set the pavement’s level to 0 in y-axis so that the road is slightly sunken.

On your node model, make sure there is only 1 edge on each side of the centerline between the sidewalks (pavement) at the end of the node or it will not snap into place properly (this is especially important with the transition between yours and other roads - having too many edges on the side of the road connected to other roads can cause holes in the terrain - using an edited mesh and Transition/Junction node flags can help fix this issue).

The textures used by roads are

  • diffuse (_d, RGB)
  • normal (_n, RGB)
  • specular (_s, grayscale)
  • alpha (_a, grayscale)
  • pavement map (_p, grayscale)
  • road map (_r, grayscale)

White areas in pavement and road maps are used to automatically generate texturing that is uniform from road type to another. Diffuse usually only contains some road markings and details, and can be blended into the road and pavement textures by adding some gray to corresponding areas in these mappings. On elevated versions, the diffuse is also used for areas such as the bottom of the bridge, and on slope the texturing for the tunnel opening. Alpha is used for grassy areas when using the Basic shader, and transparency on other shaders. Nodes are usually heavily stretched and bent so avoid using diffuse details in those and instead use automatic texturing by road and pavement maps.

As the mesh is stretched the UV-mappings “scroll” along the V-axis to avoid stretching the texels. Magenta vertex color (255, 0, 255) can be used to disable stretching the UV-mapping for bits where this is undesirable, for instance in fence posts. It’s usually a good idea to split the textures horizontally and add statically mapped UV-islands on their own side. Note that .obj-files don’t store vertex coloring, so you'll have to export your model as .fbx to use any vertex colors.

文件:Net UV.gif
Example showing UV-mapping of different parts of a mesh. 1. whole model, 2. stretching UV-mappings, 3. static UV-mappings, 4. vertex colors


There are four different shaders to choose from. Basic is usually used on ground level roads, and can be used to mix terrain textures to the model’s pavement mapped area (pavement, gravel, or ruining, set in properties) or alpha mapped areas (grass). Shadows are also optimized for ground level.

Rail and Bridge shaders work quite similarly to each other, but can differ a bit on their look. Rail always produces gravel and Bridge produces pavement on pavement-mapped areas.

The wire shader doesn’t use any textures, and models using it will sway in the wind. The amount of sway can be set per vertex on the blue channel of the vertex color (0 for no sway, 255 for full), and the phase of the sway can be controlled with the red channel.

Editor

Here are listed all the different editable fields of the roads.

Road Properties

  • Half Width: half the width of the road. Having different width on the road’s base mesh can cause clipping or z-fighting around the road. Used to smoothly match road’s sides with other road types and many other things.
  • Pavement Width: width of the pavement of the road. Used to smoothly match pavements between different road types. Pavement should be 0.3 units high in the mesh to match built in roads.
  • Segment Length: length of a segment, usually 64. Wrong sized mesh can result in clipping or z-fighting between the segment meshes when they are tiled.
  • Min Height / Max Height: the vertical bounds of the road. Used for collision detection for water when Block Water is checked, and to prevent building other nets too low above the road.
  • Max Slope: maximum angle of a slope that the road can be built on.
  • Max Build Angle: Maximum angle at which the road can connect to another.
  • Max Turn Angle: Maximum angle of the road until a node is used instead of segment. Can be overridden by checking Enable Bending Nodes.
  • Min Corner Offset: amount to offset (or “smoothen”) corners towards the inside of the turn. Large numbers (> 40) can mess up collision detection and make the road hard to build.
  • Build Height: vertical offset of the road from base line
  • Surface Level: level of the road’s surface. Used by vehicles and citizens to move at the correct height. Individual lanes can also be offset from this with their property Vertical Offset.
  • Create Pavement / Gravel / Ruining: Which terrain texture is used on pavement-mapped areas. Used by Basic shader when Lower Terrain is unchecked. Bridge shader always generates pavement and Rail shader always generates gravel.
  • Flatten Terrain: flatten terrain around the road
  • Lower Terrain: lower the terrain to the bottom of the mesh.
  • Clip Terrain: Clip the terrain under the road. Use if your road is on ground level or slightly sunken. Uses Half Width to determine the width of clipped area.
  • Follow Terrain: Follow the terrain level. Usually unchecked for elevated and bridge to have straight bridges instead of slightly wobbling along terrain level.
  • Flat Junctions: Force junctions to be flat.
  • Clip segment ends: Use smartly bent nodes in junctions instead of straight overlapping segments. Usually only unchecked for wall ruins.
  • Twist Segment Ends: –
  • Straight segment ends: don’t bend segment ends in sharply angled junctions.
  • Enable bending segments: automatically bend a segment when trying to build it in too sharp angle from another road
  • Enable bending nodes: –
  • Can Cross Lanes: uncheck to disable crossing the oncoming traffic’s lanes, for instance when the road has a middle platform.
  • Can Collide: Check the road for collisions. Usually left checked.
  • Block Water: checked in canals, quays and flood walls. Uses Min Height and Max Height to determine vertical bounds of the blocking area, and Half Width for horizontal.
  • Auto Remove: automatically remove the road if something is built over it (requires checking Can Collide). Usually only used in some beautification nets, such as pedestrian paths and wall ruins.
  • Connect Group: restrict connecting the road to other road types of the chosen group.

There might also be other fields depending on the template type.

Lane Properties

  • Position: horizontal position of the lane along the width of the road, from the middle point of the road.
  • Width: width of the lane.
  • Vertical Offset: vertical position of the lane from the road’s Surface Level.
  • Stop Offset: position where a vehicle can pull up to stop, calculated from lane’s Position.
  • Speed Limit: for vehicles usually from 0.8 (two lane road) to 2 (highway). Usually 0.25 for pedestrian lanes.
  • Direction: forward for right hand lanes, backward for left. Will be automatically flipped if using left-hand traffic.
  • Lane Type: General type of the road. Leave to None if the lane isn’t meant to be used, for example if you want the lane simply to be container for props or to represent the middle platform such as in 4 lane roads. Any types that aren’t listed here are meant for internal use and might not work in custom roads.
    • Vehicle: lane is used by vehicles. You can choose allowed vehicle types in Vehicle Types field.
    • Pedestrian: allow only pedestrians
    • Parking: lane is used for parking
    • CargoVehicle: allow vehicles that move cargo
    • TransportVehicle: allow public transport
    • EvacuationTransport: allow evacuation vehicles.
  • Vehicle Type: allowed vehicle types if Lane Type is set to Vehicle.
  • Stop Type: Vehicle types that can use this lane for stopping.
  • Allow Connect: –
  • Use Terrain Height: override vertical offset and surface level with terrain height
  • Center Platform: is the lane used as center platform
  • Elevated: –

Lane Prop Properties

  • Flags: conditions required for the prop to be used. Refer to templates.
  • Color Mode: –
  • Position: prop’s position from the lane’s middle point, it has three values. First value says the desired position sideways from the road axis, the second value says height from the terrain surface, the third value says offset along the road axis.
  • Angle: angle of the prop
  • Segment Offset: –
  • Repeat Distance: how often to repeat the prop
  • Min Length: –
  • Corner Angle: –
  • Probability: Probability of the prop showing

Segment Properties

  • Backward/Forward Required/Forbidden: conditions required for this segment model to be rendered. For example if you don’t want this segment to be rendered when the next segment of placed road is collapsed, check the Collapsed flag in Forward Forbidden. Check how templates use these to get general idea of how they work.
  • Disable Bend Nodes: Check to disable the segment from being used in sharp angles (Max Turn Angle in road’s Properties menu)
  • Road Color: color applied to road mapped areas
  • Shader: shader the segment model uses
  • Model: click to import model

Node Properties

  • Flags: conditions required for this node model to be shown. Refer to templates.
  • Connect Group: which connect groups to use this node with
  • Direct Connect: Allows a node to connect in a straight line between segments rather than spreading to cover the area between segments. For example, rails need direct connect to connect directly between rail segments whereas a road node should have it off for roadway junctions which spread and take up an area.

(一些草稿)

Position: 车道中心点对于道路中心点的坐标
Width: 该车道的宽度(例如位置0宽3,就是-1.5~1.5属于这辆车)
Stop Offset:在堵车情况时后面的车会停在前车后多少距离
Speed Limit: 车道常用数值0.8 (2道车)到2 (高速). 【地铁为3,如果你想逮虾户的话】人行道常用0.25。
Direction: 如果设置了右侧通行(默认),那么forward就是靠右向前通行, backward靠左向后通行. 在“左侧通行”被选择时自动调整
(例子:如果不是单行道,你position为正,方向为forward。position为负,方向backward即可。如果单行道就不用设定)
Lane Type: 设定大类的车道类型。如果为none说明该车道不会被使用(例如4车道的中央路灯区),有些道路类型可能是专门给某种道路的,设定可能不起作用
Vehicle: 车道一般被设定为vehicles小类,你可以选择几乎所有车在车道上开
Pedestrian: 只有行人可以走,方向一般both(双向)
Parking: 该车道只能用来停车
CargoVehicle: 货车专用道
TransportVehicle: 公共交通专用道
tip:一般来说人行道宽度2-4,停车道2,其他为3,道路半宽(half width)4为1格(整格为8)
所以一般这样:先在player common里把各项噪音(noise pollution、radius)调0,降费用(consume、maintain)
然后缩小人行道,把中央none区域开启使用,拓展basic(辅道)上的车道,于是乎便可以客货分离【要么有mod,客货不分堵了别怪我。】
日本都分客铁和货铁的,所以这是现实世界的有用经验。或者你可以把城区规划成住宅→商业和工业货物→商业2条线路不交集的样子。
如果你想让道路浮空的话,下面pillar把各项打叉,这样它们都会变成“new project”(但无法修改坡度逻辑,这点还需move it)
当然,除了basic,高级、bridge、slope这几个都要调。
然后,不建议使用辅道+浮空铁路、地铁、单轨,首先,铁路和地铁由于“平交道口”的设定是没法像单轨一样叠加在辅道上浮空的。
其次是单轨,你要叠加上辅道上会导致“单轨十字路口”不好调节,所以单设一个浮空单轨的资产,使得调静音和费用,最后去掉pillar。
既然提到公共交通了,静音客铁、静音地铁、静音公交都可以资产搞一手,但是静音单轨站千万不要自己来,不装mod单轨站就废了!或者自己去工坊弄一个搜“silent”。
【以上适用于成就玩家,有mass tran DLC】

说明

请帮助检查更新本页。最后检查:版本1.12

本页内容最初译自官方Wiki:Road Editor,经双方编辑后内容可能与来源不同。