Customize Scene with Unreal Engine failed in R2020b
Show older comments
Back in MATLAB R2020a, I was able to follow the guide at https://www.mathworks.com/help/driving/ug/customize-scenes-using-simulink-and-unreal-editor.html to get my vehicle simulation to work with a 3D scene created by modification from an existing AutoVrtlEnv project level. Now I cannot seem to do the same thing with the newly shipped MATLAB R2020b. There's something not right. Tried the guide on both my Windows PCs, didn't work, need some help.
After click RUN in my Simulink model, and click PLAY in the UE4 editor, I got static image in UE4 window, and black screen on the 3D Camera Read block popped up window. The diagnostic viewer throws repretead warning message below:
> In sim3d/CameraReader/read
In sim3d/AbstractCameraSensor/read
In Simulation3DVisionSensor/stepImpl
Warning: The block 'DriftDemoBicycle/3D Visualization/Simulation 3D Camera Get/Simulation 3D Camera Read' returned no data (error code: -1). Make sure that the block sample time is greater than the Simulation 3D Scene Configuration block sample time.
1 Comment
Answers (1)
Nishan Nekoo
on 7 Apr 2026
Hi Tong Zhao,
Apologies for the late response here but I wanted to provide some suggestions in case anyone else is running into these issues.
For the first error:
> In sim3d/CameraReader/read
In sim3d/AbstractCameraSensor/read
In Simulation3DVisionSensor/stepImpl
Warning: The block 'DriftDemoBicycle/3D Visualization/Simulation 3D Camera Get/Simulation 3D Camera Read' returned no data (error code: -1). Make sure that the block sample time is greater than the Simulation 3D Scene Configuration block sample time.
Place all the Sim3D blocks into the same subsystem and pay close attention to the block execution order: https://www.mathworks.com/help/driving/ug/how-3d-simulation-for-automated-driving-works.html#mw_a02d2ce7-796c-491f-aeda-5f8082811e29
For the second issue, make sure to include the map when packaging the project. In the List of maps to include in a packaged build option, click the Adds Element button. See detailed instructions here: https://www.mathworks.com/help/sl3d/package-custom-scenes-into-executable.html
Nishan
Categories
Find more on Simulink 3D Animation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
