Simulation 3D Environment Upgrade: Run 3D simulations using Unreal Engine 5.3
The 3D simulation engine that comes installed with Simulink® 3D Animation™ has been updated to Unreal Engine® 5.3. Previously, the product used Unreal Engine 5.1.
For more information, see Unreal Engine Simulation Environment Requirements and Limitations.
sim3d classes: Use environment, actor, and sensor classes to create
and interact with 3D environment
Use these sim3d classes to create and interact with the 3D
environment.
| Type | Class | Description |
|---|---|---|
| Environment | sim3d.World | Create a 3D environment that is rendered by using the Unreal Engine from Epic Games®. |
sim3d.environment.WeatherConfiguration | (new for R2024b) Configure the weather conditions, including rain, fog, and snow, and set the position of the sun and clouds in a scene. | |
sim3d.environment.GeospatialConfiguration (Aerospace Blockset) | (new for R2024b) Stream 3D maps and configure the Cesium® ion™ stream. Simulations with the
| |
| Actors | sim3d.Actor | Create an empty actor in 3D environment. |
sim3d.vehicle.ground.PassengerVehicle | (new for R2024b) Create a four-wheeled passenger vehicle that follows ground. | |
sim3d.person.Bicyclist | (new for R2024b) Create a bicyclist that follows ground. | |
sim3d.person.Pedestrian | (new for R2024b) Create a pedestrian that follows ground. | |
| Sensors | sim3d.sensors.MainCamera | Define perspective in the Simulation 3D Viewer window. |
sim3d.sensors.IdealCamera | Implement an ideal camera. Use the | |
sim3d.sensors.Camera | (new for R2024b) Implement a camera with a lens. Use the | |
sim3d.sensors.FisheyeCamera | (new for R2024b) Implement a camera with a fisheye lens. Use the Simulations with the
| |
sim3d.sensors.RaytraceSensor | (new for R2024b) Implement ray tracing to get the positions, surface normals, surface identifiers, and distances for objects in the scene. Use the | |
sim3d.sensors.Lidar | (new for R2024b) Implement a lidar sensor. Use the | |
sim3d.sensors.UltrasonicSensor | (new for R2024b) Generate detections from range measurements taken by an ultrasonic sensor. Use the
|
3D Environment: Use sim3d.World functions to implement custom
views
Starting in R2024b, you can create multiple views with the createViewport
function. The createViewport function now creates a viewport structure
that includes the default view of the Simulation 3D Viewer and any custom views as fields.
Previously, the createViewport function created a viewport structure with
a single field, Main.
Additionally, you can also use these functions of the sim3d.World
object to manage the views:
setView —
Set one of the views in the viewport structure as the current view in the Simulation
3D Viewer window.
deleteViewport — Remove a custom view from the viewport
structure.
3D Simulation: Programmatically control and interact with simulations
Starting in R2024b, you can use simulation pacing to slow down a 3D simulation and
investigate system behavior. Use these properties of the sim3d.World object
to control simulation pacing.
You can also programmatically interact with the simulation using new functions:
Simulation 3D Actor Block: Create light and annotations in 3D environment
You can now create these actors in the 3D environment using the Simulation 3D Actor block:
Light — Use the sim3d.Light
object to create custom lighting.
Arrow — Use the sim3d.graphics.Arrow object to view vector data during simulation.
Text — Use the sim3d.graphics.Text object to view relevant information during
simulation.
Light Actor: Project pattern, texture, or image onto surfaces
Starting in R2024b, you can use these properties of the sim3d.Light object
to project a pattern, texture, or image onto surfaces, using the light source as a projector
and adjusting the size of the projection.
LightFunction
LightFunctionScale