Chapter 17 | Modifying Terrain Elevation Using Measurements | Virtual CRASH 3


In Virtual CRASH 3 the user can import .dxf files into the simulation environments. These .dxf files can contain measurements captured during laser surveys of accident scenes. In this write-up we demonstrate how one can easily import total station measurements to modify simulation terrain.


Note, in Virtual CRASH 4, surface terrains can be created directly from total station points using the Total Station Surface Builder tool. See Chapter 20 for more information on the Total Station Surface Builder.

In both version 3 and version 4, one can also explicitly define the road surface profile using the diagram tool. This is shown in the blog post:

 You can see a video of the final simulation below: 

Obtain Aerial Photograph and Import

First, we obtained an aerial photograph of our accident scene using Google Earth [1]. This was imported into Microsoft Paint by performing a simple screen capture. Background vehicles were removed, and the image was cropped to focus on the road itself (see next two figures below).

Import Total Station Measurements into DXF Utility

While you can import your total station measurements directly into Virtual CRASH 3 [2], there are users who prefer to import points directly from .dxf format. In this chapter, we demonstrate how to import directly from a .dxf file.

Import Total Station points to spreadsheet and format

For this reconstruction, a Northwest Instrument, Inc. [3] total station was used to conduct a scene survey. The data points were easily imported into spreadsheet format using Google Sheets to remove extraneous data columns (small sample of points shown in figure below). The points were ultimately saved in .dxf format, though Virtual CRASH 3 can also import ASCII data saved with a .pts file extension (see Chapter 16).

Import DXF file into Simulation Environment

Import the .dxf file into Virtual CRASH by going to Project > Import and select the appropriate units used for your measurements from the pulldown menu.

Once you select and import the file, you should see it displayed in the Virtual CRASH environment.

Orient Your Points

Now that the measurements are imported, change the point color to red for better contrast against the Google Earth background.

Next, using the top down orthographic view, rotate and translate your points until you’ve aligned them with various key features within your scene. In this example, measurements were taken of the lane lines as well as utility poles. Using the utility poles as fixed references, it is easy to ensure proper alignment of our points with respect to the aerial photo. Once you are satisfied with the alignment of your measurements with your aerial photo, freeze the Total Station measurement points.

It’s best to try to orient your points to run parallel with the x-axis. This will make subsequent steps easier.

Make the Terrain

 Draw Plane

Next, create a plane object within your scene. Do this by going to “Create > Extended Primitive 3D > Plane.”

Draw the plane such that it covers your aerial photograph.

Modify Segmentation

Switch to Wireframe view to visualize the plane object segmentation. Increase the number of segments to give sufficient granularity to match your measurement points’ spacing.

This will be important because we are going to modify the mesh itself to match the elevation measurements.

Convert to Mesh

Once you are satisfied with the segmentation of your grid, left-click on “to mesh” in the left side control panel. This converts your plane object into a mesh which can be deformed.

Switch to Vertices Select Mode

Change to Vertices object select mode.

We are going to modify the positions of the vertices in elevation. 

Move Vertices

Next, restrict your mouse cursor movements to z-axis motion.

Then, select the rectangular selection region tool.

Switch to the right or left side orthographic view. 

Enclose the desired vertices with the rectangular selection tool. Because you are in an orthographic view, and the plane was created with yaw = 0 degrees, when we highlight the region around one point, all points behind it along the y-axis are also selected. Additionally, because we aligned our measurements to run along the x-axis, we should be easily able to match the z-positions of all the vertices within our mesh to the corresponding positions in our measurements without needing to worry about the relative orientation of our road measurements to our mesh vertices. Note, for a curved section of road this would not be the case, and other techniques would be needed. Once you have selected the vertices, move them up along the z-axis until you have good agreement with your measurements (see next two figures below). 

Moving down the roadway, adjust the z-positions of your mesh to give good agreement with your total station measurements using the same procedure.

Once you are finish switch from the Vertices to Object selection type. You can also adjust the x-positions if needed.

Use the Terrain in Simulation

 Project Map onto Mesh

In the left side control panel, select “receive projection” to allow the mesh object to show the aerial photograph beneath it.

Note, once the plane receives projections from the objects beneath it, the images are mapped onto the polygons of the mesh itself.

Make Mesh an Unyielding Terrain

We would like to simulate vehicles driving on top of our new terrain. To do this, first select the mesh object, then select Create > Physics > Make Unyielding / Terrain From Selection.

You can now place objects on top of the mesh. In this case, a small child was struck at the bottom of a slight hill by a low profile car traveling well over the posted speed limit.

The driver claimed the hill obstructed his line-of-sight to the child. An obvious question was posed: from what distance would the line-of-sight to the child have become unobstructed by the hill assuming the child was in the road throughout the pre-impact phase of the event?

Evaluate the Line-of-Sight

 Create a Camera Object

Place a camera in the scene by first selecting Create > Extended Primitives 3D > Camera.

Left-click and hold the mouse button in the scene at your camera’s target location. In this case we’re going to place the target near our pedestrian. Drag the mouse to your camera’s location and release. In this case, we’re going to attach the camera to the car’s reference frame; after first clicking on the target location, drag the mouse cursor to hover over the car until the car turns blue.

Then release the left mouse button. The blue highlight is an indication that you are fixing the camera to the car. Note, you can also attach the target to an object by hovering over the object before left-clicking. This is very useful when studying sight-lines between two moving vehicles.

Position the Camera within the Occupant Cabin

Select the camera object. Then use the “position-local” sliders in the left side control panel to adjust the camera’s position until it reasonably matches the expected position of the driver’s head.

When you select the camera object, a small preview window will appear to show you the current view from the camera’s position.

Position the Camera’s Target 

Select the camera’s target object in the left side control panel. Adjust the target’s position using the sliders in the left side control panel. Below we have positioned the target to the torso of the pedestrian.

Use the Camera’s Sight line

Now that we’ve adjusted the positions of the camera and target, we can already see that the sight line drawn between the two goes through the terrain itself, indicating that there is a line-of-sight obstruction caused by the hill when our vehicle is at its starting point within the simulation.

To help see this, switch to an orthographic side view. Select your terrain plane object, and select the “use height map” feature under “optimization.” This feature generally helps improve the simulator’s use of the terrain itself. Select “show height map” to visualize the height map. It should now be much easier to see the height profile of your terrain. Adjust the height map segmentation to the maximum possible values. In this case, one can easily see the camera’s sight line intersect with the terrain map.

Use the time slider to move the vehicle forward, until the sight line no longer intersects with the terrain. Around this time the pedestrian becomes unobstructed by the hill (see next two figures).

At this moment, the vehicle is about 900 feet from the pedestrian according to this analysis.


[1] The process of importing Google Earth (or scale diagrams) is described in Chapter 9 | Scaling Images.

[2] See Chapter 16 | Importing Total Station Measurements


© 2016 vCRASH, Americas, Inc. All Rights Reserved