Main Content

3D Environment

Create, view, and interact with a 3D environment; configure prebuilt scenes and scenarios; co-simulate with Unreal Engine®

The 3D environment is a digital space designed to simulate real-world phenomena to explore and manipulate objects within the environment. You can use the MATLAB® or Simulink® interface to create, view, and interact with the 3D environment.

  • Visualize the 3D environment using the Unreal Engine from Epic Games® for photorealistic rendering. You can access advanced features, such as lighting and atmospheric conditions.

  • Programmatically create and view a 3D environment using MATLAB or a Simulink model.

  • Use MATLAB and Simulink to communicate with the 3D environment during run-time through the co-simulation framework with the Unreal Engine.

  • Import custom scenes and scenarios designed and built in RoadRunner and visualize using the Unreal Engine environment.

  • View the 3D environment in the Simulation 3D Viewer using the prebuilt scenes and you can navigate in the 3D environment using keyboard shortcuts and mouse control.

Classes

sim3d.WorldCreate 3D environment in Unreal Engine (Since R2022b)
sim3d.environment.WeatherConfigurationControl scene weather and sun position (Since R2024b)
sim3d.environment.GeospatialConfigurationCreate 3D environment in Unreal Engine (Since R2024b)

Functions

expand all

addAdd actor to 3D environment (Since R2022b)
loadLoad 3D models or actors into world object (Since R2024a)
saveSave world object to MAT file (Since R2024a)
removeRemove actor added to world or remove all actors in world (Since R2023a)
createViewportCreate custom view of 3D environment (Since R2022b)
setViewSet view of 3D environment (Since R2024b)
deleteViewportDelete viewport from 3D environment (Since R2024b)
viewView 3D environment in Simulation 3D Viewer window (Since R2024b)
runRun co-simulation with the 3D simulation engine (Since R2022b)
pausePause co-simulation with 3D simulation engine (Since R2024a)
resumeResume co-simulation with 3D simulation engine (Since R2024a)
closeEnd simulation and close simulation window (Since R2024b)

Blocks

Simulation 3D Scene ConfigurationScene configuration for 3D simulation environment (Since R2022b)

Scenes

Empty SceneEmpty environment
Curved RoadCurved road 3D environment
Straight RoadStraight road 3D environment

Topics

Simulation Basics

Visualize Scenario

Featured Examples