Simulation 3D Scene Configuration

Libraries:
Offroad Autonomy Library /
Simulation 3D
Aerospace Blockset /
Animation /
Simulation 3D
Automated Driving Toolbox /
Simulation 3D
Robotics System Toolbox /
Simulation 3D
Simulink 3D Animation /
Simulation 3D /
Environment
UAV Toolbox /
Simulation 3D
Vehicle Dynamics Blockset /
Vehicle Scenarios /
Sim3D /
Sim3D Core
Description
Note
Simulating models with the Simulation 3D Scene Configuration block requires Simulink® 3D Animation™.
The Simulation 3D Scene Configuration block implements a 3D simulation environment that is rendered by using the Unreal Engine® from Epic Games®. UAV 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. Using this block, you can also control the position of the sun and the weather conditions of a scene. For more details, see Sun Position and Weather.
You can simulate from a set of prebuilt scenes or from your own custom scenes. Scene customization requires the UAV Toolbox Interface for Unreal Engine Projects support package. For more details, see Customize Unreal Engine Scenes for UAVs.
You can also simulate custom scenes designed and built in RoadRunner. To do so, you must first export scenes from RoadRunner and specify the path to the exported scene artifacts in the Project parameter of the Simulation 3D Scene Configuration block.
Tip
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, Priority must be set to
-1
so the blocks can prepare their data before the 3D environment receives it.For the Simulation 3D Scene Configuration block in your model, Priority must be set to
0
.For blocks that receive data from the 3D environment, Priority must be set to
1
so the 3D environment can prepare the data before these blocks receive it.
For more information about execution order, see How Unreal Engine Simulation for UAVs Works.
Examples
Simulate Simple Flight Scenario and Sensor in Unreal Engine Environment
Visualize sensors in a simulation environment that uses Unreal Engine® from Epic Games®.
Depth and Semantic Segmentation Visualization Using Unreal Engine Simulation
Visualize depth and semantic segmentation data captured from a camera sensor in a simulation environment. This environment is rendered using the Unreal Engine® from Epic Games®.
Parameters
Scene
Scene Selection
Source of the scene in which to simulate, specified as one of the options in the table.
Option | Description |
---|---|
Default Scenes | Simulate in one of the default, prebuilt scenes specified in the Scene name parameter. |
RoadRunner | Simulate in a RoadRunner scene. To import the RoadRunner scene, specify the corresponding file in the Project parameter. You can use these file formats.
|
Unreal Executable | Simulate in a scene that is part of an Unreal Engine executable file. Specify the executable file in the Project name parameter. Specify the scene in the Scene parameter. Select this option to simulate in custom scenes that have been packaged into an executable for faster simulation. |
Unreal Editor | Simulate in a scene that is part of an Unreal Engine project ( Select this option when developing custom scenes. By clicking Open Unreal Editor, you can co-simulate within Simulink and the Unreal Editor and modify your scenes based on the simulation results. |
Name of the prebuilt 3D scene in which to simulate, specified as one of these options. For details about a scene, see its listed corresponding reference page.
US city block
– US City BlockSuburban scene
– Suburban scene
Dependencies
To enable this parameter, set Scene source to
Default Scenes
.
Name of the Unreal Engine executable file, specified as a valid executable project file name. You can either browse for the file or specify the full path to the project file, using backslashes. To specify a scene from this file to simulate in, use the Scene parameter.
By default, Project name is set to
VehicleSimulation.exe
, which is on the MATLAB® search path.
Note
If you select a custom Unreal executable file built with a version of Unreal Engine that is not compatible with the current version of MATLAB, you receive one of these error messages:
"Incompatible version of 3D Simulation engine: Undefined"
: For Unreal executable built for a MATLAB release prior to R2023b"Incompatible version of 3D Simulation engine: 23.2.0"
: For Unreal executable built for MATLAB R2023b or later
To resolve these errors, you must migrate the Unreal project and rebuild the executable with the latest support package installed. For more information, see .
Example: C:\Local\WindowsNoEditor\AutoVrtlEnv.exe
Dependencies
To enable this parameter, set Scene source to
Unreal Executable
.
Name of the Unreal Engine project file or RoadRunner file, specified as a valid project file name. You can either browse for the file or specify the full path to the file, using backslashes. The file name must contain no spaces.
To simulate scenes from Unreal Engine project file in the Unreal Editor, click Open Unreal Editor. If you have an Unreal Editor session open already, then this button is disabled.
To run the simulation, in Simulink, click Run. Before you click Play in the Unreal Editor, wait until the Diagnostic Viewer window displays this confirmation message:
In the Simulation 3D Scene Configuration block, you set the scene source to 'Unreal Editor'. In Unreal Editor, select 'Play' to view the scene.
To simulate a RoadRunner scene, you can import files in Filmbox (.fbx
), Universal Scene Description (USD), RoadRunner scene (.rrscene
), or RoadRunner scenario (.rrscenario
) formats.
To simulate scenes in Filmbox (
.fbx
) format, browse for the folder containing the exported RoadRunner scene files and specify the.fbx
file. You can export a RoadRunner scene using the option CARLA Filmbox in Export Using CARLA Filmbox (RoadRunner). This option exports these three files to a folder:Filmbox (
.fbx
) fileASAM OpenDrive (
.xodr
) fileXML (
.rrdata.xml
) file
To simulate scenes in Universal Scene Description (USD) format, browse for the folder containing the exported RoadRunner scene files, and select the
.usd
,.usdc
, or.usda
files. The actors imported from USD files are not compatible with collision detection. To export a RoadRunner scene in USD format, see Export to USD (RoadRunner).To simulate scenes in RoadRunner scene or scenario (
.rrscene
or.rrscenario
) formats, browse for the folder containing the RoadRunner files, and select the corresponding file. Before simulation, you must configure RoadRunner integration with MATLAB using theroadrunnerSetup
(RoadRunner) function.Enter the
roadrunnerSetup
function in the MATLAB Command Window.The RoadRunner Setup dialog box opens.
Specify the RoadRunner Project Folder and RoadRunner Installation Folder locations.
For more information on exporting and simulating RoadRunner scenes, see Simulate in RoadRunner Scene.
Note
USD and RoadRunner scene or scenario (.rrscene
or
.rrscenario
) file import are not supported on Linux®.
Dependencies
To enable this parameter, set
Scene source to Unreal Editor
or
RoadRunner
.
Scene Parameters
Configure the placement of the virtual camera to set the viewpoint that displays the scene during simulation. The Scene view parameter list is populated with all the Name parameter values of the vehicle and actor blocks in your model, along with any additional custom viewpoints you have created. If you add a Simulation 3D Scene Configuration block to your model, the virtual camera remains positioned at the scene origin. To reposition the camera to a custom viewpoint or to follow a vehicle, or actor, update this parameter.
The table lists the Scene view parameter options if your model contains no vehicle blocks, actor blocks, or custom viewpoints.
Option | Description |
---|---|
Custom |
|
Scene Origin |
|
The table lists the additional options if your model contains vehicle blocks, actor blocks, or custom viewpoints.
Option | Description |
---|---|
Vehicle name |
|
sim3d actor name |
|
Viewpoint name |
|
Scene Controls
When Scene view is set to Scene Origin
or
Custom
, you can change the location of the camera to navigate in
the scene during simulation using keyboard and mouse control. You can also change the
camera location when the simulation is paused.
To navigate in the 3D environment, use these keyboard shortcuts.
Keyboard Shortcut | Camera Control |
---|---|
W | Move forward. |
Shift+W | Move faster in the forward direction. |
S | Move backward. |
Shift+S | Move faster in reverse direction. |
A | Move left. |
Shift+A | Move faster toward left. |
D | Move right. |
Shift+D | Move faster toward right. |
Q | Move up. |
Shift+Q | Move faster in the upward direction. |
E | Move down. |
Shift+E | Move faster in the downward direction. |
Mouse scroll wheel | Control the camera distance from the cursor point. |
Shift+mouse scroll wheel | Camera moves faster. |
Mouse right-click and drag | Orbit around the cursor point. |
O | Attach camera to actor under the cursor point. |
Mouse left-click and drag | Orbit around the actor after camera attaches to the actor. |
P | Detach camera from the actor. |
L | Record the current viewpoint and display |
1 to 9 | Access the stored viewpoints, if available. |
Tab | Cycle the view between all vehicles in the scene and the viewpoint at the start of the simulation, in the forward direction. |
Shift+Tab | Cycle the view between all vehicles in the scene and the viewpoint at the start of the simulation, in the reverse direction. |
I | Toggle the display of keyboard shortcuts on the screen. Press once to show and again to hide. |
Vehicle Views
When Scene view is set to a vehicle name, during simulation, you can change the location of the camera around the vehicle. You can also set the view to a vehicle during simulation by pressing Tab.
To smoothly change the camera views, use these keyboard shortcuts.
Keyboard Shortcut | Camera View | |
---|---|---|
1 | Back left |
|
2 | Back | |
3 | Back right | |
4 | Left | |
5 | Internal | |
6 | Right | |
7 | Front left | |
8 | Front | |
9 | Front right | |
0 | Overhead |
For additional camera controls, use these keyboard shortcuts.
Keyboard Shortcut | Camera Control |
---|---|
Tab | Cycle the view between all vehicles in the scene. |
Mouse scroll wheel | Control the camera distance from the vehicle. |
L | Toggle a camera lag effect on or off. When you enable the lag effect, the camera view includes:
This lag improves visualization of overall vehicle acceleration and rotation. |
F | Toggle the free camera mode on or off. When you enable the free camera mode, you can use the mouse to change the pitch and yaw of the camera. This mode allows you to orbit the camera around the vehicle. |
Since R2025a
Specify the name of the custom viewpoint as a character array or string scalar.
Example: View1
Dependencies
To enable this parameter, set Scene view to
Custom
.
Data Types: char
| string
Since R2025a
Specify the viewpoint translation (x,y,z) as a real 1-by-3 vector, in m.
Dependencies
To enable this parameter, set Scene view to
Custom
.
Data Types: double
Since R2025a
Specify the viewpoint rotation (roll, pitch, yaw) as a real 1-by-3 vector, in deg.
Dependencies
To enable this parameter, set Scene view to
Custom
.
Data Types: double
Since R2025a
Specify the viewpoint translation
(x,y,z) relative to
sim3d
actor origin as a real 1-by-3 vector, in m.
Dependencies
To enable this parameter, set Scene view to the
sim3d
actor name.
Data Types: double
Since R2025a
Specify the viewpoint rotation (roll, pitch,
yaw) relative to sim3d
actor origin as a real
1-by-3 vector, in deg.
Dependencies
To enable this parameter, set Scene view to the
sim3d
actor name.
Data Types: double
Sample time, Ts, of the visualization engine, specified as a real positive scalar. 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
complexity.
By default, blocks that receive data from the visualization engine inherit this sample rate.
Select whether to run simulations in the 3D visualization environment without visualizing the results, that is, in headless mode.
Consider running in headless mode in these cases:
You want to run multiple 3D simulations in parallel to test models in different Unreal Engine scenarios.
Dependencies
To enable this parameter, set Scene source to
Default Scenes
or Unreal
Executable
.
Weather
Select whether to control the scene weather and sun position during simulation. Use the enabled parameters to change the sun position, clouds, fog, rain, and snow.
This table summarizes sun position settings for specific times of day.
Time of Day | Settings | Unreal Editor Environment |
---|---|---|
Midnight | Sun altitude: -90 Sun azimuth: 180 | |
Sunrise in the north | Sun altitude: 0 Sun azimuth: 180 | |
Noon | Sun altitude: 90 Sun azimuth: 180 |
This table summarizes settings for specific cloud conditions.
Cloud Condition | Settings | Unreal Editor Environment |
---|---|---|
Clear | Cloud opacity: 0 | |
Heavy | Cloud opacity: 85 | |
Heavy | Enable Volumetric clouds: Selected Cloud Coverage: 50 Cloud layer altitude: 6 |
|
This table summarizes settings for specific fog conditions.
Fog Condition | Settings | Unreal Editor Environment |
---|---|---|
None | Fog density: 0 | |
Heavy | Fog density: 100 |
This table summarizes settings for specific rain conditions.
Rain Condition | Settings | Unreal Editor Environment |
---|---|---|
Light | Cloud opacity: 10 Rain density: 25 | |
Heavy | Cloud opacity: 10 Rain density: 80 |
This table summarizes settings for specific snow conditions.
Snow Condition | Settings | Unreal Editor Environment |
---|---|---|
Heavy | Snow density: 50 |
Sun
Azimuth angle in the horizontal plane measured from the south to the horizontal projection of the sun rays, in deg.
Use the Sun altitude and Sun azimuth parameters to control the time of day in the scene. For example, to specify sunrise in the north, set Sun altitude to 0 deg and Sun azimuth to 180 deg.
Dependencies
To enable this parameter, select Override scene weather.
Altitude angle in a vertical plane between the sun's rays and the horizontal projection of the rays, in deg.
Use the Sun altitude and Sun azimuth parameters to control the time of day in the scene. For example, to specify sunrise in the north, set Sun altitude to 0 deg and Sun azimuth to 180 deg.
Dependencies
To enable this parameter, select Override scene weather.
Select this check box to enable geospatial sun. Enabling geospatial sun is useful to simulate conditions near the poles or at locations with disproportionate lengths of day versus night.
Dependencies
To enable this parameter, select Override scene weather.
Latitude of geolocation on earth, specified as a scalar, in deg.
Dependencies
To enable this parameter, select Override scene weather and Enable geospatial sun.
Longitude of geolocation on earth, specified as a scalar, in deg.
Dependencies
To enable this parameter, select Override scene weather and Enable geospatial sun.
Date, specified as an integer in the format YYYY-MM-DD
.
Dependencies
To enable this parameter, select Override scene weather and Enable geospatial sun.
Time, specified as an integer in the format HH:MM:SS
.
Dependencies
To enable this parameter, select Override scene weather and Enable geospatial sun.
Time zone specifies the number of hours offset from the Coordinated Universal Time (UTC) or Greenwich Mean Time (GMT).
Dependencies
To enable this parameter, select Override scene weather and Enable geospatial sun.
Select this check box to enable daylight saving time.
Dependencies
To enable this parameter, select Override scene weather and Enable geospatial sun.
Cloud
Parameter that corresponds to the Unreal Editor Cloud Speed global actor target value. The clouds move from west to east for positive values and east to west for negative values.
Use the Cloud opacity and Cloud speed parameters to control clouds in the scene.
Dependencies
To enable this parameter, select Override scene weather.
Parameter that corresponds to the Unreal Editor Cloud Opacity global actor target value, in percent. Zero is a cloudless scene.
Use the Cloud opacity and Cloud speed parameters to control clouds in the scene.
Dependencies
To enable this parameter, select Override scene weather.
Select this check box to enable volumetric clouds.
Dependencies
To enable this parameter, select Override scene weather.
Parameter that corresponds to the Unreal Editor Cloud Density global actor target value, in percent.
Use the Cloud coverage parameter to control clouds in the scene.
Dependencies
To enable this parameter, select Override scene weather and Enable volumetric clouds.
Parameter that corresponds to the Unreal Editor Layer Bottom Altitude global actor target value, in km.
Dependencies
To enable this parameter, select Override scene weather and Enable volumetric clouds.
Fog
Parameter that corresponds to the Unreal Editor Set Fog Density and Set Start Distance target values, in percent.
Dependencies
To enable this parameter, select Override scene weather.
Rain
Parameter corresponding to the Unreal Editor local actor that controls rain density, wetness, rain puddles, and ripples, in percent.
Use the Cloud opacity and Rain density parameters to control rain in the scene.
Dependencies
To enable this parameter, select Override scene weather.
Select this check box to enable raindrops on the camera lens.
Dependencies
To enable this parameter, select Override scene weather.
Snow
This parameter corresponds to the Unreal Editor global actor that controls snow density, in percent.
Dependencies
To enable this parameter, select Override scene weather.
Geospatial
Select this check box to enable geospatial parameters and a variant subsystem.
ID of stored token, specified as a string. To create this token, create a Cesium Ion® account, then generate the token through this account. The Authentication Manager stores the token from Cesium Ion. For more information, see Visualize with Cesium (Aerospace Blockset) and https://ion.cesium.com/.
Dependencies
To enable this parameter, select the Enable geospatial configuration check box.
Select this check box to position aerospace vehicles with respect to the Earth center. Use this option with the ECEF coordinate frame selection in the pack blocks.
Height at georeference point on the globe, specified as a real scalar. This parameter represents the height above the 1984 World Geodetic System (WGS84) ellipsoid model of the Earth at the latitude and longitude specified in Origin latitude and Origin longitude.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Clear the Use Earth center as origin (ECEF) check box.
Latitude, specified as a real scalar in decimal degrees.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Clear the Use Earth center as origin (ECEF) check box.
Longitude, specified as a real scalar in decimal degrees.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Clear the Use Earth center as origin (ECEF) check box.
Raster overlay type, specified as Aerial
,
Aerial with labels
, or
Road
.
Dependencies
To enable this parameter, select the Enable geospatial configuration check box.
Local dataset IDs, specified as an array or vector.
Dependencies
To enable this parameter, select the Enable geospatial configuration check box.
Select this check box to add a georeferenced, location-accurate Sun Sky actor in simulation.
Dependencies
To enable this parameter, select the Enable geospatial configuration check box.
Current solar time, specified as scalar hours from midnight.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Time zone, specified as hours offset from Greenwich Mean Time (GMT). To specify
hours before GMT, use a minus sign (-
).
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Day, specified as a scalar from 1
to
31
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Month, specified as a scalar from 1
to
12
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Year, specified as a scalar real.
Select this check box to enable daylight saving time.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Start day of daylight saving time, specified as a scalar from 1
to 31
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Start month of daylight saving time, specified as a scalar from
1
to 12
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Last day of daylight saving time, specified as a scalar from 1
to 31
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Last month of daylight saving time, specified as a scalar from
1
to 12
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Hour when daylight saving time switches, specified as a scalar from
1
to 24
.
Dependencies
To enable this parameter:
Select the Enable geospatial configuration check box.
Select the Use advanced Sun sky check box.
Click to manage access tokens, such as create, update, and delete tokens.
Dependencies
To enable this parameter, select the Enable geospatial configuration check box.
Tileset source, specified as one of 'Earth Terrain'
,
'URL'
, or 'None'
.
Dependencies
To enable this parameter, select the Enable geospatial configuration check box.
Data Types: string
File path of locally stored 3d tileset data, specified as a string.
Dependencies
To enable this parameter, select the Enable geospatial
configuration check box and set the
TilesetSource parameter to URL
.
Data Types: string
More About
To control the scene weather and sun position, on the Weather tab, select Override scene weather. Use the enabled parameters to change the sun position, clouds, fog, and rain during the simulation.
Use Sun altitude and Sun azimuth to control the sun position.
Sun altitude — Altitude angle in a vertical plane between the sun rays and the horizontal projection of the rays.
Sun azimuth — Azimuth angle in the horizontal plane measured from the south to the horizontal projection of the sun rays.
Alternatively, select Enable geospatial sun to use Latitude, Longitude, Date, Time, and Time zone to control sun position. Enabling geospatial sun is useful to simulate conditions near the poles or at locations with disproportionate lengths of day versus night.
This table summarizes sun position settings for specific times of day.
Time of Day | Settings | Unreal Editor Environment |
---|---|---|
Midnight | Sun altitude: -90 Sun azimuth: 180 | |
Sunrise in the north | Sun altitude: 0 Sun azimuth: 180 | |
Noon | Sun altitude: 90 Sun azimuth: 180 |
Use Cloud opacity and Cloud speed to control clouds in the scene.
Cloud opacity — Unreal Editor Cloud Opacity global actor target value. Zero is a cloudless scene.
Cloud speed — Unreal Editor Cloud Speed global actor target value. The clouds move from west to east for positive values and east to west for negative values.
Select Enable volumetric clouds to use Cloud coverage and Cloud layer altitude to control volumetric clouds in the scene.
Cloud coverage — Unreal Editor Cloud Density global actor target value.
Cloud layer altitude — Unreal Editor Layer Bottom Altitude global actor target value.
This table summarizes settings for specific cloud conditions.
Cloud Condition | Settings | Unreal Editor Environment |
---|---|---|
Clear | Cloud opacity: 0 | |
Heavy | Cloud opacity: 85 | |
Heavy | Enable Volumetric clouds: Selected Cloud Coverage: 50 Cloud layer altitude: 6 |
|
Use Fog density to control fog in the scene. Fog density corresponds to the Unreal Editor Set Fog Density.
This table summarizes settings for specific fog conditions.
Fog Condition | Settings | Unreal Editor Environment |
---|---|---|
None | Fog density: 0 | |
Heavy | Fog density: 100 |
Use Cloud opacity and Rain density to control rain in the scene.
Cloud opacity — Unreal Editor Cloud Opacity global actor target value.
Rain density — Unreal Editor local actor that controls rain density, wetness, rain puddles, and ripples.
This table summarizes settings for specific rain conditions.
Rain Condition | Settings | Unreal Editor Environment |
---|---|---|
Light | Cloud opacity: 10 Rain density: 25 | |
Heavy | Cloud opacity: 10 Rain density: 80 |
Use Snow density to control snow in the scene.
Snow density — Unreal Editor global actor that controls snow density.
This table summarizes settings for specific snow conditions.
Snow Condition | Settings | Unreal Editor Environment |
---|---|---|
Heavy | Snow density: 50 |
To simulate a RoadRunner scene, you can import these file formats:
Filmbox (
.fbx
)Universal Scene Description (USD)
RoadRunner scene or scenario (
.rrscene
or.rrscenario
)
To export a RoadRunner scene in .fbx
format, use the option CARLA
Filmbox in Export Using CARLA Filmbox (RoadRunner). This option exports
these three files to a folder:
Filmbox (
.fbx
) fileASAM OpenDrive (
.xodr
) fileXML (
.rrdata.xml
) file
To export a RoadRunner scene in USD format, see Export to USD (RoadRunner). When you export the scene, select these options in the Export USD dialog box:
Split by Segmentation
Power Of Two Texture Dimensions
Export Only Highest LODs
Selecting these options enables compatibility with semantic segmentation, optimizes system performance, and provides high-quality rendering of objects in the 3D environment with mesh improvement and high level of details. The RoadRunner scene in the USD file also requires these metadata files:
XML (
.rrdata.xml
) file for semantic segmentation in Simulation 3D Camera and Simulation 3D Lidar blocksASAM OpenDRIVE® (
.xodr
) file for the Simulation 3D Vision Detection Generator block to generate detections using object data and lane ground truth data
To export the metadata files, use the option CARLA Filmbox in Export Using CARLA Filmbox (RoadRunner).
When you simulate a model with a RoadRunner scene using the .rrscene
or .rrscenario
file, the software performs these actions:
Opens the scene in RoadRunner
Exports the scene as a USD file from RoadRunner to a temporary folder
Exports the metadata files from RoadRunner to the same folder
Closes the RoadRunner
Opens the scene in the Simulation 3D Viewer window
Version History
Introduced in R2020bThe UAV Toolbox now offers additional support for offline dataset loading in
Cesium® to allow Air-Gap use-cases. The Simulation 3D Scene
Configuration block has two new parameters TilesetSource
and
Url
.
You can use the TilesetSource
parameter to select the value of the
URL
parameter as the source, where you can specify the file path of
your offline tileset data.
You can import these RoadRunner scene files:
Universal Scene Description (
.usd
,.usdc
, and.usda
) fileRoadRunner scene or scenario (
.rrscene
or.rrscenario
) files
To specify the source of scene, set the Scene source
parameter as RoadRunner
. Then, in the Project
parameter, specify the corresponding RoadRunner scene file.
You can create custom viewpoints using the Custom
option from
the Scene view parameter. This option enables these parameters.
Name
Translation
Rotation
You can save the viewpoint to populate the Scene view parameter list with the viewpoint name. Select the viewpoint to set the view of the scene. You can also edit or delete the viewpoint.
You can set the Scene view parameter to the Name parameter of the Simulation 3D Actor block contained in your model. This option enables these parameters to set the location of the camera relative to the actor origin.
Viewer relative translation [X, Y, Z] (m)
Viewer relative rotation [Roll, Pitch, Yaw] (deg)
In addition to the default scenes, you can download and install any prebuilt 3D scenes available in the Unreal Engine environment for 3D simulation.
To select and download a scene, click Install. MATLAB restarts after the scene is installed. You can now select the installed scene from the Scene view parameter list.
Simulating models with the Simulation 3D Scene Configuration block requires Simulink 3D Animation.
Use new weather parameters to simulate additional weather conditions.
Weather | Parameters |
---|---|
Sun |
|
Cloud |
|
Rain |
|
Snow |
|
Use the Simulation 3D Scene Configuration block to import a RoadRunner scene and simulate in the scene. To specify the source of scene, select the
Scene source parameter as RoadRunner
. Then, in the
Project parameter, specify the Filmbox (.fbx)
file
corresponding to the RoadRunner scene. For an example, see Import RoadRunner Scene into Unreal Engine Using Simulink (Simulink 3D Animation).
Use the Simulation 3D Scene Configuration block to view the virtual world
from a camera positioned at a custom viewpoint. To set the custom viewpoint, select
Scene view as Custom
and set the Initial
viewer translation and Initial viewer rotation values. You
can also use keyboard shortcuts and mouse controls to navigate in the virtual world
scene.
You can select the Enable geospatial configuration parameter to enable the parameters of the Geospatial tab, such as Access token ID and Georeference parameters. You can use the parameters on the Geospatial tab to specify geospatial origin coordinates using a Cesium access token ID.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)