The Surface Tool models surfaces around roads, such as walkways, driveways, parking lots, and natural terrain.
Terrain Surface Model
Terrain surfaces are region graphs bounded by curves. Some of these curves are created automatically (such as the curves on the boundaries of roads). Other curves can be created manually using the Surface Tool.
Here is an example of a single terrain surface bounded by manually created surface curves:
The points on the graph edge curve are curve end nodes, which can be shared by multiple curves. In most regards, these curves use the same UI concepts outlined in the Curve Editing and Polygon Editing pages.
In particular, each curve has a tangent direction that can be modified to change the shape of the curve, as shown in this image:
Each surface curve can have one surface connected to each side. The nodes can be shared by any number of surface curves. In this manner, the surface curves form a contiguous (nonoverlapping) patchwork of surfaces called a surface graph.
For example, you can split an initial surface into two surfaces by digitizing new surface curves in the interior (taking care to share end nodes on the perimeter of the surface):
Surfaces also support enclosed surfaces (surfaces within surfaces). Any time a loop of surface curves lies entirely within the interior of another surface, it creates a new surface in the interior.
The following image shows two nested levels of enclosed surfaces:
It is important that surfaces do not overlap. Surfaces that overlap (in the XY dimension) cause visual artifacts ("z-fighting" artifacts).
These artifacts can be seen in the following example, where a new loop of surface curves crosses the existing surface curves:
To correct this situation, you must split the original surface curves to introduce nodes. These nodes are then shared by multiple surface curves.
The example below includes corrected nodes.
Surfaces and Roads
Roads automatically participate in the surface graph.
Roads that lie entirely within a terrain surface behave much like enclosed surfaces. Terrain surface curves are automatically created around the perimeter of the roads, forming an enclosed road surface.
In the following image, a simple intersection has been digitized (using the Road Plan Tool) in the interior of the surface:
As with overlapping surfaces, roads that overlap a surface curve can cause visual artifacts.
For example, dragging the end of a road such that it crosses a surface curve causes artifacts:
One way to correct this issue is to adjust the containing surface such that the roads are fully enclosed:
Surfaces can also be connected directly to roads. This enables surfaces to automatically move when the roads are moved, helping to avoid overlaps.
In the following image, the three nodes are attached to the roads. Some of these nodes (such as the two at the end of the road) are created automatically and cannot be removed or deleted in the Surface Tool. Nodes can also be added parametrically along the side of a road. These points can be inserted anywhere along a road, dragged along the road, or deleted.
When surfaces are attached to these road surface nodes, moving the road automatically adjusts the surfaces.
In the following image, the end of the road is moved toward the right:
Only nonbridge portions of road surfaces participate in the surface graph (refer to the Road Construction Tool). The surface graph ignores road construction spans that are marked as bridges.
For example, the selected construction span in the following image is marked as a bridge:
Note: A bridge span that has similar elevation to the surfaces underneath it can produce visual artifacts. To avoid artifacts, ensure that the elevation of the bridge span is above the ground surface beneath it (using the Road Height Tool).
Surfaces have an optional height attribute. If the height is nonzero, the surface is vertically extruded upwards. This can be used to create simple mock buildings, as shown here:
Surfaces and Elevation
By default, the heights within a surface are automatically interpolated from the heights of the surrounding surface curves.
For example, this image shows a surface whose curves have a nonzero height (Z coordinate):
In scenes with Elevation Maps, each surface can optionally use the elevation maps to define the interior elevations of the surface. This is illustrated in the images in the following sections. For more details, see Control Whether a Surface Uses Elevation Samples.
Terrain Surface Attributes
|Material||The Material Asset to apply to the surface.|
|Offset||An XY offset to apply to the texture coordinates of the surface.|
An XY scale to apply to the texture coordinates of the surface.
|Rotation||An additional rotation to apply to the texture coordinates of the surface.|
|Height||If nonzero, the surface is extruded upward by this amount.|
If a terrain surface's curves are not flat, then this option forces the extruded top of the surface to be flat.
This attribute affects only surfaces with nonzero "Height" values.
|Extrude Inner Regions||
If true, any enclosed surfaces form either holes or raised areas (depending on the elevation of their surface curves). If false, the outer surface slopes downwards (or upwards) to meet the height of the enclosed surface.
Only impacts surfaces with nonzero "Height" values.
Edit Terrain Surface Curves and Regions
See Region Graph Editing.
Insert a Terrain Surface Node Along a Road Boundary
- Click the Surface Tool button.
- Right-click a terrain surface curve along a road boundary.
Note: You can slide these types of nodes along the road using click and drag.
Change the Material Assigned to a Terrain Surface
- Click the Surface Tool button.
- Select a terrain surface.
- Assign a Material Asset to the "Material" widget in the Attributes Panel.
Control Whether a Surface Uses Elevation Samples
By default, the interior of a surface is smoothly interpolated from its boundaries. Surfaces can optionally use the elevation maps in the scene to determine the heights of interior points as follows:
- Configure the elevation maps through the Elevation Map Tool as desired, using the previous instructions.
- Click the Surface Tool button.
- Select a surface.
- Enable the Sample Global Elevation option in the Attributes Panel.
Sample Global Elevation: Off
Sample Global Elevation: On
Note: This setting affects only the interior of the surface. The heights along the perimeter of the surface are still defined by the surface curves, which are independent from the elevation map.
You can better align the perimeter of a surface to the elevation map by first inserting additional nodes along the perimeter of the surface (where needed). Then, project the nodes to the surface using the Project Nodes button in the Sub-Tool Bar.