Scene configuration for 3D simulation environment
Automated Driving Toolbox / Simulation 3D
Vehicle Dynamics Blockset / Vehicle Scenarios / Sim3D / Sim3D Core
The Simulation 3D Scene Configuration block implements a 3D simulation environment that is rendered by using the Unreal Engine® from Epic Games®. Automated Driving Toolbox™ integrates the 3D simulation environment with Simulink® so that you can query the world around the vehicle and virtually test perception, control, and planning algorithms.
The Simulation 3D Scene Configuration block must execute after blocks that send data to the 3D environment and before blocks that receive data from the 3D environment. To verify the execution order of such blocks, right-click the blocks and select Properties. Then, on the General tab, confirm these Priority settings:
For blocks that send data to the 3D environment, such as Simulation 3D
Vehicle with Ground Following blocks, Priority must be
-1. That way, these blocks prepare their data before the
3D environment receives it.
For the Simulation 3D Scene Configuration block in your model,
Priority must be set to
For blocks that receive data from the 3D environment, such as Simulation 3D Camera blocks, Priority must be set to
1. That way, the 3D environment can prepare the data before
these blocks receive it.
For more information about execution order, see How 3D Simulation for Automated Driving Works.
Scene description— 3D scene
Straight road(default) |
Double lane change|
US city block|
Large parking lot
Specify the name of the 3D scene in which to simulate. To learn more about a scene, see these reference pages:
Scene view— Configure placement of virtual camera that displays scene
Scene Origin(default) | vehicle name
Configure the placement of the virtual camera that displays the scene in the AutoVrtlEnv window during simulation.
If your model contains no Simulation 3D Vehicle with Ground Following blocks, then during simulation, you view the scene from a camera positioned at the scene origin.
If your model contains at least one vehicle block, then by default, you view the scene from behind the first vehicle that was placed in your model. To change the view to a different vehicle, set Scene view to the name of that vehicle. The Scene view parameter list is populated with all the Name parameter values of the vehicle blocks contained in your model.
If you add a Simulation 3D Scene Configuration block to your model before adding any vehicle blocks, the virtual camera remains positioned at the scene. To reposition the camera to follow a vehicle, update this parameter.
When Scene view is set to a vehicle name, during simulation, you can change the location of the camera around the vehicle.
To change the camera views in the AutoVrtlEnv window, use these key commands.
Sample time— Sample time of visualization engine
1/60(default) | scalar greater than or equal to 0.01
Sample time, Ts, of the visualization engine, specified as a scalar greater than or equal to 0.01. Units are in seconds.
The graphics frame rate of the visualization engine is the inverse of the sample
time. For example, if Sample time is
1/60, then the visualization engine solver tries to achieve a
frame rate of 60 frames per second. However, the real-time graphics frame rate is
often lower due to factors such as graphics card performance and model
By default, blocks that receive data from the visualization engine, such as Simulation 3D Camera blocks, inherit this sample rate.