Effacer les filtres
Effacer les filtres

Shadows in 3d simulation

23 vues (au cours des 30 derniers jours)
Sjoerd Quist
Sjoerd Quist le 7 Mar 2024
Modifié(e) : Nishan Nekoo le 3 Juil 2024 à 14:41
Right now I'm making a simulation in which I drop an onion. I want to process the images taken by cameras. However, I am having trouble with shadows because the sun only shines on one side in the simulation environment. Is there a possibility to add a second sun or a second light source? When I check the box 'overide scene wheather' in my 3D scene configuration, my simulation crashes every time and I get a fatal error. I hope someone can help me
This is the error i get when i override the weather scene configuration and run the simulation:
Error:MATLAB System block 'TestopstellingSimulinkV4/Simulation 3D Scene Configuration/Simulation 3D Engine' error occurred when invoking 'resetImpl' method of 'Simulation3DEngine'. The error was thrown from ' 'C:\Program Files\MATLAB\R2023b\toolbox\shared\sim3dblks\sim3dblks\Simulation3DEngine.p' at line 0 'C:\Program Files\MATLAB\R2023b\toolbox\simulink\ui\studio\config\m\+SLStudio\StartPauseContinue.p' at line 0 'C:\Program Files\MATLAB\R2023b\toolbox\simulink\ui\studio\config\m\+SLStudio\ToolBars.p' at line 0'. Caused by: 3D Simulation engine was terminated by the user (error code: 4).

Réponses (2)

Sarthak
Sarthak le 18 Avr 2024
Hey Sjoerd,
As per my understanding I think you should be able to add multiple light sources. Maybe using the 'position' argument while creating your light object would help. Please refer to the documentation below:
The error you mentioned is usually driven by improper setup. If this is setup correctly, I would suggest making sure MATLAB is on its latest release.
You can reach out to MathWorks Technical Support if you are still facing this error

Nishan Nekoo
Nishan Nekoo le 3 Juil 2024 à 14:40
Modifié(e) : Nishan Nekoo le 3 Juil 2024 à 14:41
Hi Sjoerd,
Starting in R2024a, there is a light actor in Simulink 3D Animation: https://www.mathworks.com/help/sl3d/sim3d.light.html
You can use this to add multiple light sources to your 3D Unreal scene.
Please tell me more about this crash you are seeing. Does it happen everytime you check the override weather scene configuration or is it only when you change certain weather parameters? Is this repeatable each time you open MATLAB?
Nishan

Catégories

En savoir plus sur View and Analyze Simulation Results dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by