Azzera filtri
Azzera filtri

Shadows in 3d simulation

24 visualizzazioni (ultimi 30 giorni)
Sjoerd Quist
Sjoerd Quist il 7 Mar 2024
Modificato: Nishan Nekoo il 3 Lug 2024 alle 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).

Risposte (2)

Sarthak
Sarthak il 18 Apr 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 il 3 Lug 2024 alle 14:40
Modificato: Nishan Nekoo il 3 Lug 2024 alle 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

Categorie

Scopri di più su View and Analyze Simulation Results in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by